1 2003-01-02 Mark Mitchell <mark@codesourcery.com>
3 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
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.
12 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
14 * lex.c: Remove superfluous include of cpplib.h.
15 (CONSTRAINT): Define without conditions.
16 (init_cp_pragma): Use c_register_pragma.
18 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
22 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
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
30 * lex.h: parse.y is dead, so don't mention it. Also replace the
31 copyright header with the default GNU copyright header.
33 2002-12-31 Mark Mitchell <mark@codesourcery.com>
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.
56 * parser.c (cp_parser_dependent_type_p): Fix thinko.
58 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
62 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
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.
69 * decl2.c (finish_file): Mark undefined inlines as extern.
71 2002-12-31 Mark Mitchell <mark@codesourcery.com>
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,
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.
104 2002-12-31 Mark Mitchell <mark@codesourcery.com>
107 * parser.c (cp_parser_direct_declarator): Handle erroneous
108 parenthesized declarators correctly.
110 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
112 * cp-tree.h (pending_lang_change): Declare.
114 2002-12-30 Mark Mitchell <mark@codesourcery.com>
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
131 (cp_parser_parse_definitely): Place free'd contexts on the free
134 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
136 2002-12-30 David Edelsohn <edelsohn@gnu.org>
138 * parser.c (cp_parser_parameter_declaration_clause): Treat system
139 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
141 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
143 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
146 2002-12-30 Mark Mitchell <mark@codesourcery.com>
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.
160 (lastiddecl): Likewise.
161 (token_count): Likewise.
162 (reduce_count): 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.
172 * semantics.c (finish_id_expr): Remove.
174 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
177 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
179 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
180 end, not the C front end.
182 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
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.
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.
204 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
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):
265 (strip_underscore): Change type from 'int' to 'bool'.
266 (main): Use boolean constants.
268 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
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.
284 2002-12-27 Mark Mitchell <mark@codesourcery.com>
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.
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.
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
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
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.
389 (make_reference_declarator): Remove error-generating code.
391 (cxx_init): Do not call init_spew.
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
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
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
428 (adjust_result_of_qualified_name_lookup): Pay attention to the
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.
450 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
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.
459 * call.c (build_new_op): Make sure template class operands are
462 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
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.
473 * decl.c (duplicate_decls): Templates may be disambiguated by
477 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
478 conversion operators on failure.
480 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
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.
507 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
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.
516 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
522 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
524 * ChangeLog: Fix a typo.
525 * class.c: Fix comment typos.
526 * cp-tree.h: Likewise.
528 2002-12-18 Jason Merrill <jason@redhat.com>
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.
547 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
550 * friend.c (make_friend_class): Allow partial specialization
551 when declaration is not a template friend.
553 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
556 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
557 TREE_PROTECTED to created decl nodes.
559 2002-12-18 Mark Mitchell <mark@codesourcery.com>
561 * class.c (build_base_field): Do not set DECL_PACKED on the
564 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
566 * cp-tree.h (struct tree_srcloc): Use location_t.
568 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
570 2002-12-17 Jason Merrill <jason@redhat.com>
572 * decl.c (finish_function): Also complain about no return in
574 * semantics.c (finish_return_stmt): Also call check_return_expr in
576 * typeck.c (check_return_expr): In a template, just remember that we
579 2002-12-16 Jason Merrill <jason@redhat.com>
581 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
584 * semantics.c (do_pushlevel): Call pushlevel after adding the
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.
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
594 2002-12-14 Jason Merrill <jason@redhat.com>
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.
604 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
607 * cvt.c (convert_to_pointer_force): Don't try comparing against
610 2002-12-13 Geoffrey Keating <geoffk@apple.com>
612 * cp-tree.h: Have the multiple-include guards around
615 2002-12-10 David Edelsohn <edelsohn@gnu.org>
617 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
619 (snarf_method): Same.
620 (snarf_defarg): Same.
622 2002-12-10 Mark Mitchell <mark@codesourcery.com>
625 * pt.c (tsubst_copy): Handle destructor names more correctly.
627 2002-12-10 Matt Austern <austern@apple.com>
629 * cp-tree.h: get rid of needs_virtual_reinit bit.
631 2002-12-09 Mark Mitchell <mark@codesourcery.com>
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
637 * decl2.c (grokfield): Do not call digest_init when processing
640 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
642 * error.c (dump_expr): Fix format specifier warning.
644 2002-12-04 Geoffrey Keating <geoffk@apple.com>
646 * class.c (finish_struct_1): Correct comment.
647 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
649 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
652 * error.c (dump_expr): Don't ever try to dump a non-existent
655 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
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.
686 2002-12-03 Jason Merrill <jason@redhat.com>
689 * call.c (build_over_call): Check specifically for TARGET_EXPR
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):
697 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
698 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
700 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
701 an ambiguous conversion.
703 2002-12-03 Mark Mitchell <mark@codesourcery.com>
706 * decl.c (reshape_init): Handle erroneous initializers.
708 2002-12-02 Mark Mitchell <mark@codesourcery.com>
711 * spew.c (remove_last_token): Make sure that last_chunk is set
715 * error.c (dump_expr): Handle character constants with
718 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
721 * decl.c (grokdeclarator): Require class-key for all friend class.
722 Output the correct type and context in the error message.
724 2002-12-01 Mark Mitchell <mark@codesourcery.com>
727 * pt.c (unify): Use variably_modified_type_p to test validity of
728 template argument types.
731 * cp-tree.h (lang_type_class): Add typeinfo_var.
732 (CLASSTYPE_TYPEINFO_VAR): New macro.
733 * rtti.c (get_tinfo_decl): Use it.
736 * init.c (expand_member_init): Always get the main variant of a
739 2002-12-01 Mark Mitchell <mark@codesourcery.com>
743 * decl.c (cxx_init_decl_processing): Use size_type_node, not
745 * decl2.c (coerce_new_type): Likewise.
746 * except.c (do_allocate_exception): Likewise.
748 2002-11-30 Zack Weinberg <zack@codesourcery.com>
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.
757 2002-11-30 Mark Mitchell <mark@codesourcery.com>
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.
766 * typeck.c (convert_for_assignment): Do not use
767 decl_constant_value on the operand.
770 * pt.c (instantiate_decl): Handle template friends defined outside
771 of the class correctly.
773 2002-11-29 Joe Buck <jbuck@synopsys.com>
775 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
778 2002-11-29 Mark Mitchell <mark@codesourcery.com>
780 * class.c (walk_subobject_offsets): Recur on binfos as well as on
782 (layout_nonempty_base_or_field): Pass it a binfo when processing a
784 (layout_empty_base): Likewise.
785 (build_base_field): Likewise.
787 2002-11-27 Mark Mitchell <mark@codesourcery.com>
789 * class.c (build_base_field): Make sure we get the canonical base
790 when descending through primary bases.
792 2002-11-26 Geoffrey Keating <geoffk@apple.com>
794 * decl.c (check_initializer): Don't error on initialisation of
795 a scalar with a brace-enclosed expression.
797 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
799 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
800 (template_parms_equal): Remove prototype.
801 * typeck.c (buuld_indirect_ref): Reformat.
803 2002-11-25 Jason Merrill <jason@redhat.com>
805 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
808 2002-11-25 Mark Mitchell <mark@codesourcery.com>
810 * tree.c (cp_build_qualified_type_real): Correct handling of
812 * class.c (walk_subobject_offsets): Fix thinko.
813 (build_base_field): Record offsets of empty bases in primary
815 (layout_class_type): Record offsets of empty bases in fields.
817 * search.c (is_subobject_of_p_1): Fix thinko.
818 (lookup_field_queue_p): Likewise.
820 2002-11-24 Mark Mitchell <mark@codesourcery.com>
822 * class.c (layout_class_type): Reuse tail padding when laying out
825 2002-11-22 Mark Mitchell <mark@codesourcery.com>
827 * rtti.c (qualifier_flags): Fix thinko.
829 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
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.
838 * method.c (do_build_assign_ref, do_build_copy_constructor,
839 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
841 (synthesize_method): Use 'bool' type and constants instead of
843 (locate_copy): Likewise.
844 (implicitly_declare_fn): Likewise.
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.
850 2002-11-21 Glen Nakamura <glen@imodulo.com>
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.
857 2002-11-19 Mark Mitchell <mark@codesourcery.com>
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.
863 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
865 * g++spec.c (lang_specific_spec_functions): New.
867 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
869 * ChangeLog: Follow spelling conventions.
873 2002-11-14 Zack Weinberg <zack@codesourcery.com>
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
880 2002-11-14 Mark Mitchell <mark@codesourcery.com>
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.
888 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
891 * pt.c (instantiate_template): Push class scope for member
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.
898 2002-11-07 Mark Mitchell <mark@codesourcery.com>
900 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
901 vcall offfsets. Split out ...
902 (add_vcall_offset): ... new function.
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
911 (uses_template_parms): Adjust call to for_each_template_parm.
913 2002-11-07 Mark Mitchell <mark@codesourcery.com>
915 * class.c (add_implicitly_declared_members): Put implicitly
916 declared functions at the end of TYPE_METHODs when -fabi-version
919 2002-11-05 Geoffrey Keating <geoffk@apple.com>
921 * decl2.c (finish_file): Correct spelling.
923 2002-11-03 Mark Mitchell <mark@codesourcery.com>
925 * call.c (build_special_member_call): Do not try to lookup VTTs by
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
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.
960 2002-11-01 Zack Weinberg <zack@codesourcery.com>
963 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
965 2002-10-30 Jason Merrill <jason@redhat.com>
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.
972 2002-10-31 Mark Mitchell <mark@codesourcery.com>
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.
981 2002-10-30 Mark Mitchell <mark@codesourcery.com>
984 * typeck2.c (process_init_constructor): Call complete_array_type.
987 * decl.c (make_typename_type): Issue errors about invalid results.
989 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
1008 2002-10-29 Mark Mitchell <mark@codesourcery.com>
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.
1015 2002-10-25 Zack Weinberg <zack@codesourcery.com>
1018 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
1019 SCOPE_REF is not null before dereferencing it.
1021 2002-10-25 Mark Mitchell <mark@codesourcery.com>
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
1033 (finish_struct_1): Adjust calls to modified functions. Set
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.
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.
1054 2002-10-24 David Edelsohn <edelsohn@gnu.org>
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.
1066 2002-10-24 Mark Mitchell <mark@codesourcery.com>
1068 * class.c (end_of_base): New method.
1069 (end_of_class): Use it. Check indirect virtual bases.
1071 * class.c (check_field_decls): Fix typo.
1073 2002-10-23 Mark Mitchell <mark@codesourcery.com>
1076 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
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.
1086 2002-10-23 Zack Weinberg <zack@codesourcery.com>
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.
1094 2002-10-22 Mark Mitchell <mark@codesourcery.com>
1097 * spew.c (snarf_parenthesized_expression): New function.
1098 (snarf_block): Use it.
1100 2002-10-22 Richard Henderson <rth@redhat.com>
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.
1106 2002-10-21 Mark Mitchell <mark@codesourcery.com>
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.
1114 * class.c (include_empty_classes): Use normalize_rli.
1115 (layout_class_type): Likewise.
1117 * decl.c (reshape_init): Tweak handling of character arrays.
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.
1128 2002-10-20 Mark Mitchell <mark@codesourcery.com>
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.
1134 2002-10-18 Zack Weinberg <zack@codesourcery.com>
1136 * decl.c (start_decl): Point users of the old initialized-
1137 typedef extension at __typeof__.
1139 2002-10-18 Mark Mitchell <mark@codesourcery.com>
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.
1145 2002-10-18 Mark Mitchell <mark@codesourcery.com>
1147 * class.c (base_derived_from): Make sure return value is a bool.
1149 2002-10-18 Mark Mitchell <mark@codesourcery.com>
1151 * class.c (find_final_overrider_data_s): Remove overriding_fn and
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.
1158 2002-10-18 Jason Merrill <jason@redhat.com>
1161 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
1162 with condition decls in a template.
1164 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
1166 * class.c (add_method): Compare template parms too.
1168 2002-10-17 Mark Mitchell <mark@codesourcery.com>
1171 * class.c (handle_using_decl): Allow the declaration used to be
1172 from an ambiguous base.
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.
1179 * init.c (expand_default_init): Handle brace-enclosed initializers
1182 2002-10-16 Mark Mitchell <mark@codesourcery.com>
1184 * mangle.c (write_expression): Correct handling of enumeration
1186 (write_template_arg): Likewise.
1187 * pt.c (convert_template_argument): Do not fold non-type template
1188 arguments when inside a template.
1191 * cvt.c (convert_to_reference): Allow references as the incoming
1194 2002-10-16 Mark Mitchell <mark@codesourcery.com>
1197 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
1198 build_qualified_type.
1200 2002-10-15 Richard Henderson <rth@redhat.com>
1202 * error.c (dump_expr): Use real_to_decimal directly, and with
1205 2002-10-15 Mark Mitchell <mark@codesourcery.com>
1207 * decl.c (reshape_init): Fix typo.
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
1217 2002-10-15 Jason Merrill <jason@redhat.com>
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
1224 2002-10-14 Mark Mitchell <mark@codesourcery.com>
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
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.
1241 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
1243 * init.c (build_delete): Do not apply save_expr for arrays.
1244 (build_vec_delete): Likewise.
1246 2002-10-14 Mark Mitchell <mark@codesourcery.com>
1248 * decl.c (layout_var_decl): Call layout_decl even for variables
1249 whose type is an array with unspecified bounds.
1252 * lex.c (do_identifier): Add another option for the parsing
1254 * parse.y (do_id): Use it.
1256 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
1258 PRs C++/6803, C++/7721 and C++/7803
1259 * decl.c (grokdeclarator): Gracefully handle template-name as
1262 2002-10-11 Jason Molenda <jmolenda@apple.com>
1264 * init.c (build_field_list): Provide uses_unions_p with a default
1267 2002-10-11 Mark Mitchell <mark@codesourcery.com>
1270 * cp-tree.h (variably_modified_type_p): New function.
1271 (grokdeclarator) Tighten check for variably modified types as
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.
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
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.
1308 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1310 * decl.c (typename_hash): Use htab_hash_pointer.
1312 2002-10-10 Jim Wilson <wilson@redhat.com>
1314 * decl.c (duplicate_decls): Don't call decl_attributes.
1316 2002-10-09 Zack Weinberg <zack@codesourcery.com>
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'.
1324 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1326 * decl2.c (prune_vtable_vardecl): Delete unused function.
1328 2002-10-03 Mark Mitchell <mark@codesourcery.com>
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.
1337 2002-10-07 Richard Henderson <rth@redhat.com>
1339 * decl2.c, pt.c: Revert c++/7754 fix.
1341 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1344 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
1346 2002-10-03 Mark Mitchell <mark@codesourcery.com>
1349 * pt.c (for_each_template_parm_r): Handle BASELINKs.
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.
1358 2002-10-03 Mark Mitchell <mark@codesourcery.com>
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
1368 (write_prefix): Handle typename types correctly.
1369 (write_template_prefix): Handle template template parameters
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.
1381 2002-10-02 Mark Mitchell <mark@codesourcery.com>
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
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.
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.
1411 2002-10-02 Roger Sayle <roger@eyesopen.com>
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
1420 2002-10-02 Matt Austern <austern@apple.com>
1422 * class.c (check_field_decls): Changed warning about const member
1423 variables so that it doesn't get issued for a class aggregate.
1425 2002-10-01 Mark Mitchell <mark@codesourcery.com>
1427 * decl.c (cp_finish_decl): Make sure array types are laid out,
1428 even if the array bounds are unknown.
1430 2002-10-01 Steve Ellcey <sje@cup.hp.com>
1432 * class.c (build_vtbl_initializer): Change build_c_cast
1435 2002-10-01 Mark Mitchell <mark@codesourcery.com>
1437 * decl.c (cp_finish_decl): Make sure array types are laid out,
1438 even if the array bounds are unknown.
1440 * decl.c (cp_finish_decl): Correct check for dynamic
1441 initialization of thread-local storage.
1443 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
1445 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
1448 2002-09-30 Steve Ellcey <sje@cup.hp.com>
1450 * class.c (build_vtbl_initializer): Add cast.
1451 (add_vcall_offset_vtbl_entries_1):
1452 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
1454 2002-09-30 Mark Mitchell <mark@codesourcery.com>
1456 * class.c (walk_subobject_offsets): Correct the calculation of
1457 offsets for virtual bases. Correct the counting of array
1459 (layout_nonempty_base_or_field): Simplify. Correct the
1460 calculation of offsets to be propagated through the binfo
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
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
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
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.
1513 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
1516 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
1518 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
1520 * cp-tree.h: Fix comment typos.
1524 2002-09-25 Mark Mitchell <mark@codesourcery.com>
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.
1531 2002-09-23 Mark Mitchell <mark@codesourcery.com>
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
1539 * cp/cp-tree.h (abi_version_at_least): New macro.
1541 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
1543 * ChangeLog: Follow spelling conventions.
1544 * ChangeLog.2: Likewise.
1546 * class.c: Likewise.
1547 * cp-tree.h: Likewise.
1550 * decl2.c: Likewise.
1551 * except.c: Likewise.
1552 * friend.c: Likewise.
1553 * g++spec.c: Likewise.
1556 * mangle.c: Likewise.
1557 * method.c: Likewise.
1558 * operators.def: Likewise.
1559 * optimize.c: Likewise.
1562 * search.c: Likewise.
1563 * semantics.c: Likewise.
1566 * typeck.c: Likewise.
1568 2002-09-18 Devang Patel <dpatel@apple.com>
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
1581 * cp/decl2.c (finish_file): Use walk_vtables() instead of
1582 walk_globals() to walk vtable decls.
1584 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
1586 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
1587 ICE with invalid pointers & references.
1589 2002-09-17 Zack Weinberg <zack@codesourcery.com>
1591 * Make-lang.in: Remove all references to the demangler.
1592 * cxxfilt.c: Moved to binutils.
1594 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
1597 * pt.c (tsubst_decl): Remove assert.
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.
1604 * search.c (lookup_member): Correct documentation.
1606 2002-09-16 Geoffrey Keating <geoffk@apple.com>
1608 * cp-tree.h (union lang_tree_node): Add chain_next option.
1610 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
1612 * parse.y (parse_finish_call_expr): Check lookup_member result.
1615 * semantic.c (finish_asm_stmt): Fix operand/output_operands
1617 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
1619 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
1622 * call.c (build_over_call): Convert this pointer for fns found by
1625 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
1627 * ChangeLog: Follow spelling conventions.
1628 * ChangeLog.1: Likewise.
1630 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
1633 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
1635 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
1637 * error.c: Fix comment formatting.
1638 * except.c: Likewise.
1640 * friend.c: Likewise.
1641 * g++spec.c: Likewise.
1644 * mangle.c: Likewise.
1645 * method.c: Likewise.
1646 * optimize.c: Likewise.
1649 * search.c: Likewise.
1650 * semantics.c: Likewise.
1653 * typeck.c: Likewise.
1654 * typeck2.c: Likewise.
1656 2002-09-13 Matt Austern <austern@apple.com>
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.
1664 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
1666 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
1668 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
1670 * decl.c: Fix comment formatting.
1671 * decl2.c: Likewise.
1673 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
1675 * call.c: Fix comment formatting.
1676 * class.c: Likewise.
1677 * cp-lang.c: Likewise.
1678 * cp-tree.h: Likewise.
1681 2002-09-11 Zack Weinberg <zack@codesourcery.com>
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)
1689 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1691 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
1693 2002-09-05 Jason Merrill <jason@redhat.com>
1695 * typeck2.c (add_exception_specifier): Only pedwarn for an
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.
1704 2002-09-04 Jakub Jelinek <jakub@redhat.com>
1706 * decl.c (start_cleanup_fn): Clear interface_only before
1707 start_function, restore it afterwards.
1709 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
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.
1717 2002-08-31 Jason Merrill <jason@redhat.com>
1719 * cp-lang.c (cp_expr_size): Allow initialization from a
1722 2002-08-30 Richard Henderson <rth@redhat.com>
1725 * tree.c: Include target.h.
1726 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
1728 * Makefile.in (tree.o): Update.
1730 2002-08-27 Mark Mitchell <mark@codesourcery.com>
1732 * class.c (layout_virtual_bases): Warn about bugs in G++ that
1733 result in incorrect object layouts.
1734 (layout_class_type): Likewise.
1736 2002-08-24 Matt Austern <austern@apple.com>
1738 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
1740 (real_lvalue_p): Update caller.
1742 (non_cast_lvalue_or_else): New.
1743 * tree.h: Declare it.
1744 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
1746 2002-08-22 Mark Mitchell <mark@codesourcery.com>
1748 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
1749 and COND_EXPR specially; fix error message output.
1751 2002-08-22 Jason Merrill <jason@redhat.com>
1753 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
1754 * semantics.c (nullify_returns_r): Likewise.
1756 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1759 * typeck.c (finish_class_member_access_expr): Diagnose cases where
1760 name lookup finds nothing.
1762 2002-08-15 Jason Merrill <jason@redhat.com>
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
1770 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
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.
1778 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
1781 * parse.y (parse_finish_call_expr): Handle incomplete
1782 type used to name a scope.
1784 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
1787 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
1788 regression caused by my 2002-08-08 patch.
1790 2002-08-13 Mark Mitchell <mark@codesourcery.com>
1792 * decl.c (pushdecl_class_level): Honor requests to bind names to
1795 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
1801 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
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.
1810 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
1812 * lang-specs.h: Remove -ansi.
1814 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
1816 * tree.c (maybe_dummy_object): Replace // with /* */
1818 2002-08-09 Mark Mitchell <mark@codesourcery.com>
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
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.
1834 2002-08-08 Mike Stump <mrs@apple.com>
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.
1872 2002-08-08 Mark Mitchell <mark@codesourcery.com>
1874 * typeck.c (build_class_member_access_expr): Do not return
1875 error_mark_node when no error has occurred.
1877 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1879 * typeck.c (build_component_addr): Remove.
1880 (build_unary_op): Just check it's not a bitfield, and then build
1883 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1885 * class.c (convert_to_base): Correct check for error_mark_node.
1886 (create_vtable_ptr): Remove unused VFUNS_P parm.
1888 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1890 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
1892 2002-08-07 Mark Mitchell <mark@codesourcery.com>
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.
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
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
1944 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
1945 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
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.
1962 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
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.
1970 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
1972 * typeck.c (build_x_unary_op): Handle pointer-to-member.
1974 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
1976 * class.c: Don't include obstack.h.
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.
1985 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
1988 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
1989 expressions to pointer-to-data-member of pointer-to-member-functions.
1991 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
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.
2000 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
2002 * cp-tree.h (VF_DERIVED_VALUE): Remove.
2003 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2005 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
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.
2018 2002-08-02 Mark Mitchell <mark@codesourcery.com>
2020 * init.c (build_member_call): Use build_new_method_call, not
2023 2002-08-02 Krister Walfridsson <cato@df.lth.se>
2025 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2027 2002-08-02 Mark Mitchell <mark@codesourcery.com>
2029 * call.c (build_method_call): Issue a more helpful error message
2030 about ambiguous method names.
2032 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
2034 * tree.c (build_shared_int_cst): Make cache file scope, and
2037 2002-08-02 Jason Merrill <jason@redhat.com>
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.
2045 * semantics.c (expand_body): Do tree optimization in the function
2048 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
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.
2056 2002-07-31 Mark Mitchell <mark@codesourcery.com>
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
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
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.
2118 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
2120 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
2122 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
2124 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
2126 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
2128 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
2131 2002-07-29 Alan Modra <amodra@bigpond.net.au>
2133 * cp-tree.h: Comment typo fix.
2135 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
2137 * spew.c (space_for_token): Allocate zeroed memory for a new token
2140 2002-07-27 Roger Sayle <roger@eyesopen.com>
2142 * decl.c (builtin_function_1): No need to explicitly mark
2143 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
2145 2002-07-27 Roger Sayle <roger@eyesopen.com>
2147 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
2149 2002-07-26 Jason Merrill <jason@redhat.com>
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):
2165 * cp-tree.h: Declare new fns.
2167 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
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
2179 2002-07-26 Jason Merrill <jason@redhat.com>
2181 * dump.c (cp_dump_tree): Call c_dump_tree.
2182 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2184 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
2186 * error.c (print_whitespace): Remove.
2187 * g++spec.c (LIBUNWIND): Move.
2188 * mangle.c (mangled_position, write_signed_number): Remove.
2190 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
2192 * decl2.c (cxx_decode_option): Similarly.
2194 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
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
2203 (c_sizeof_nowarn): Remove definition.
2204 (build_unary_op): Use cxx_sizeof_nowarn.
2206 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
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.
2212 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
2214 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
2216 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
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.
2230 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
2232 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
2234 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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
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
2252 * search.c (type_access_control): Do type access for TEMPLATE_DECL
2255 2002-07-20 Roger Sayle <roger@eyesopen.com>
2257 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
2258 test by using positive_option. Make whitespace consistent.
2260 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
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 *'.
2267 (snarf_defarg): Use error(), not error_with_file_and_line().
2269 2002-07-19 Chris Demetriou <cgd@broadcom.com>
2271 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
2272 cpp_options is included.
2274 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2276 PR c++/2862, c++/2863
2277 * pt.c (determine_specialization): Compare the length of
2278 TYPE_ARG_TYPES. Tidy.
2280 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
2287 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2289 PR c++/4802, c++/5387
2290 * decl.c (make_typename_type): Use enforce_access.
2292 2002-07-17 Scott Snyder <snyder@fnal.gov>
2295 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
2297 2002-07-12 Mark Mitchell <mark@codesourcery.com>
2299 * class.c (add_method): Correct handling of conversion operators.
2301 2002-07-11 Mark Mitchell <mark@codesourcery.com>
2304 * class.c (add_method): Simplify.
2306 2002-07-11 Jason Merrill <jason@redhat.com>
2309 * tree.c (cp_copy_res_decl_for_inlining): Also copy
2312 2002-07-10 Graham Stott <graham.stott@btinternet.com>
2314 * pt.c (template_parm_this_level_p, push_template_decl_real):
2315 Pass depth as int pointer.
2317 2002-07-11 Tim Josling <tej@melbpc.org.au>
2319 Remove front end hard coding from gengtype.c.
2321 * config-lang.in (gtfiles): Add files needed for this front end.
2323 2002-07-10 Mark Mitchell <mark@codesourcery.com>
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
2329 (do_identifier): ... here.
2330 * parse.y (parse_begin_function_definition): New function.
2332 * semantics.c (begin_function_definition): Accept decl-specifiers
2333 and attributes as separate parameters.
2335 2002-07-10 Jason Merrill <jason@redhat.com>
2338 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
2339 modifying the old one.
2341 2002-07-09 Mark Mitchell <mark@codesourcery.com>
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.
2353 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2355 * pt.c (can_complete_type_without_circularity): Add static to
2356 function definition.
2358 2002-07-08 Mark Mitchell <mark@codesourcery.com>
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.
2369 2002-07-07 Mark Mitchell <mark@codesourcery.com>
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
2379 2002-07-07 Roger Sayle <roger@eyesopen.com>
2381 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
2382 constructor and destructor tests when passed a TEMPLATE_DECL.
2384 2002-07-05 Jason Merrill <jason@redhat.com>
2386 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
2389 PR optimization/7145
2390 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
2392 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
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
2398 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
2399 import_export_tinfo.
2401 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2404 * init.c (build_aggr_init): Remove qualifiers of init before calling
2406 (build_vec_init): Flatten multi-dimensional array during cleanup.
2407 (build_vec_delete_1): Abort if the type of each element is array.
2409 2002-07-03 Graham Stott <graham.stott@btinternet.com>
2411 * pt.c (instantiate_class_template): Fix typo.
2413 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2415 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
2416 by CVS conflict in my last patch.
2418 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
2426 2002-07-01 Mark Mitchell <mark@codesourcery.com>
2429 * mangle.c (write_expression): Add mangling for sizeof when
2431 * operators.def: Remove stale comment.
2433 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
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.
2465 2002-06-27 Mark Mitchell <mark@codesourcery.com>
2468 * pt.c (tsubst_friend_class): Substitute into the context of the
2469 friend before using it.
2471 2002-06-26 Mark Mitchell <mark@codesourcery.com>
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.
2495 2002-06-25 Mark Mitchell <mark@codesourcery.com>
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.
2517 2002-06-24 Mark Mitchell <mark@codesourcery.com>
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.
2534 2002-06-23 Mark Mitchell <mark@codesourcery.com>
2536 * parse.y (parse_scoped_id): New function.
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.
2544 2002-06-23 Matt Thomas <matt@3am-software.com>
2546 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
2549 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2551 * mangle.c (integer_type_codes): Const-ify.
2553 2002-06-20 Richard Henderson <rth@redhat.com>
2556 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
2557 Call put_var_into_stack.
2559 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2561 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
2562 array size calculation.
2564 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2567 * pt.c (tsubst_expr): Handle FILE_STMT.
2569 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2572 * pt.c (lookup_template_class): Don't build complete argument of
2573 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
2576 2002-06-19 Akim Demaille <akim@epita.fr>
2578 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
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.
2584 2002-06-14 Jason Merrill <jason@redhat.com>
2586 * semantics.c (begin_for_stmt): Push the 'for' scope before
2587 adding the FOR_STMT.
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
2595 2002-06-16 Richard Henderson <rth@redhat.com>
2598 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
2599 after template instantiation.
2601 2002-06-16 Richard Henderson <rth@redhat.com>
2603 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
2605 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
2607 * cp-tree.h (compiler_error): Remove declaration.
2608 * lex.c (compiler_error): Remove definition.
2610 2002-06-14 Steve Ellcey <sje@cup.hp.com>
2612 * g++spec.c (LIBUNWIND): New.
2613 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
2615 2002-06-13 Jessica Han <jessica@cup.hp.com>
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.
2624 2002-06-12 Stan Shebs <shebs@apple.com>
2626 * mpw-config.in: Remove file, no longer used.
2627 * mpw-make.sed: Ditto.
2629 2002-06-07 Zack Weinberg <zack@codesourcery.com>
2631 * decl2.c: Update call to cpp_handle_option.
2633 2002-06-07 H.J. Lu (hjl@gnu.org)
2635 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
2637 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
2639 * error.c (cp_error_at): Fix typo.
2641 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
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.
2654 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
2656 * pt.c (inline_parm_levels): Mark for GC.
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
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.
2679 * decl.c (typename_compare): Don't use same_type_p.
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.
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.
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.
2725 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
2726 Correct typo. Patch from k_fukui@highway.ne.jp.
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.
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
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.
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
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.
2835 * repo.c: Use gengtype for roots.
2836 * spew.c: Use gengtype for roots.
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.
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
2855 * decl.c (mark_cp_function_context): Update calling sequence.
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'.
2864 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
2866 * lang-specs.h: Use cpp_debug_options.
2868 2002-05-28 Zack Weinberg <zack@codesourcery.com>
2870 * mangle.c, tree.c: Include real.h.
2871 * Make-lang.in: Update dependency lists.
2873 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
2875 * lex.c: Don't include c-lex.h.
2876 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
2878 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
2880 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
2882 2002-05-22 Richard Henderson <rth@redhat.com>
2884 * decl.c (obscure_complex_init): Check for VAR_DECL
2885 before using DECL_THREAD_LOCAL.
2887 2002-05-22 Richard Henderson <rth@redhat.com>
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.
2895 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
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.
2901 2002-05-21 Richard Henderson <rth@redhat.com>
2903 * lex.c (rid_to_yy): Add RID_THREAD.
2905 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
2907 * init.c (build_vec_init): Test for trivial copy-assignment when
2908 copy-assigning arrays.
2910 2002-05-20 Andreas Jaeger <aj@suse.de>
2912 * init.c (build_default_init): Remove unused variable.
2914 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
2916 * call.c (any_strictly_viable): New.
2917 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
2919 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2921 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
2923 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2926 * pt.c (do_decl_instantiation): Don't complain explicit
2927 instantiation after explicit specialization.
2928 (do_type_instantiation): Likewise.
2930 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
2932 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
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
2944 (cxx_incomplete_type_error): ... this. New implementation in
2945 terms of cxx_incomplete_type_diagnostic.
2947 2002-05-18 Jason Merrill <jason@redhat.com>
2950 * decl2.c (import_export_decl): If we clear
2951 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
2953 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
2961 2002-05-14 Jason Merrill <jason@redhat.com>
2963 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
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.
2970 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
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.
2989 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
2991 * lang-specs.h: Remove redundant -lang-c++.
2993 2002-05-13 Jason Merrill <jason@redhat.com>
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.
3000 2002-05-12 Jason Merrill <jason@redhat.com>
3002 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
3005 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
3007 * cp-tree.h (flag_ansi): Remove.
3008 * decl2.c (flag_ansi): Remove.
3009 (cxx_decode_option): Set flag_iso and flag_undef.
3011 2002-05-09 Jason Merrill <jason@redhat.com>
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.
3017 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
3019 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3026 2002-05-03 Jason Merrill <jason@redhat.com>
3028 * tree.c (build_cplus_array_type): Only const and volatile get
3031 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
3033 2002-04-30 Mark Mitchell <mark@codesourcery.com>
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.
3040 2002-04-30 Jason Merrill <jason@redhat.com>
3043 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
3044 anonymous class with a typedef if there are attributes.
3046 2002-04-29 Paul Eggert <eggert@twinsun.com>
3048 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
3050 2002-04-29 Jakub Jelinek <jakub@redhat.com>
3053 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
3056 2002-04-29 Mark Mitchell <mark@codesourcery.com>
3059 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
3060 enter that scope before name lookup.
3063 * method.c (do_build_copy_constructor): Avoid building
3064 cv-qualified reference types.
3066 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
3069 * decl.c (grok_op_properties): Assignment ops don't have to return
3070 by value. operator% should.
3072 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
3075 * decl.c (duplicate_decls): Call merge_weak.
3077 2002-04-26 Richard Henderson <rth@redhat.com>
3079 * parse.y (malloced_yyss, malloced_yyvs): New.
3080 (yyoverflow): Re-add. Set them.
3081 (free_parser_stacks): New.
3083 2002-04-26 Mark Mitchell <mark@codesourcery.com>
3086 * method.c (do_build_assign_ref): Pass a derivation to
3087 build_method_call when calling base class assignment operators.
3089 2002-04-26 Richard Henderson <rth@redhat.com>
3091 * parse.y (yyoverflow): Revert.
3093 2002-04-26 Richard Henderson <rth@redhat.com>
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.
3103 2002-04-25 Richard Henderson <rth@redhat.com>
3106 * parse.y (yyoverflow): New.
3108 2002-04-25 Jason Merrill <jason@redhat.com>
3111 * search.c (check_final_overrider): No longer static.
3112 * class.c (update_vtable_entry_for_fn): Call it.
3113 * cp-tree.h: Adjust.
3115 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3124 2002-04-24 Mark Mitchell <mark@codesourcery.com>
3127 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
3130 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
3132 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
3133 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
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.
3140 2002-04-24 Jason Merrill <jason@redhat.com>
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.
3150 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
3153 2002-04-23 Jakub Jelinek <jakub@redhat.com>
3155 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
3156 node with attributes.
3158 2002-2-23 David O'Brien <obrien@FreeBSD.org>
3160 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
3161 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
3163 2002-04-23 Mark Mitchell <mark@codesourcery.com>
3166 * pt.c (tsubst_friend_class): Handle templates with explicit
3170 * typeck.c (merge_types): Remember the cv-qualification of pointer
3171 types when merging them.
3173 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3183 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3190 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3203 2002-04-18 Jason Merrill <jason@redhat.com>
3206 * search.c (setup_class_bindings): A class template qualifies as a
3209 2002-04-17 Jakub Jelinek <jakub@redhat.com>
3212 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
3215 2002-04-16 Mark Mitchell <mark@codesourcery.com>
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.
3222 2002-04-15 Mark Mitchell <mark@codesourcery.com>
3224 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
3225 dso_handle itself, to __cxa_atexit.
3227 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
3229 * error.c (cxx_print_error_function): Adjust call to macros.
3231 2002-04-14 Jakub Jelinek <jakub@redhat.com>
3233 * class.c (layout_virtual_bases): Do all dsize computation on trees.
3235 2002-04-14 Jason Merrill <jason@redhat.com>
3237 * typeck.c (get_member_function_from_ptrfunc): Don't do
3238 gratuitious division and multiplication on
3239 ptrmemfunc_vbit_in_delta targets.
3241 2002-04-12 Mark Mitchell <mark@codesourcery.com>
3244 * semantics.c (finish_expr_stmt): Remember the type of the
3245 expression before any conversions are performed.
3247 2002-04-12 Mark Mitchell <mark@codesourcery.com>
3250 * call.c (add_template_candidate_real): Do not treat member
3251 templates as copy constructors.
3253 2002-04-12 Mark Mitchell <mark@codesourcery.com>
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
3258 (complete_vars): Do not call layout_decl for completed variables.
3260 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
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.
3268 2002-04-11 Andrew Haley <aph@redhat.com>
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.
3277 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
3280 * decl.c (make_typename_type): Remove implicit typenameness.
3282 2002-04-09 Jason Merrill <jason@redhat.com>
3284 PR optimization/6189
3285 * semantics.c (genrtl_start_function): Don't free
3286 DECL_SAVED_FUNCTION_DATA for inline functions.
3288 * init.c (build_member_call): For now, don't convert to
3289 intermediate base if it would cause an error.
3291 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
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.
3299 2002-04-06 Mark Mitchell <mark@codesourcery.com>
3302 * class.c (layout_class_type): Remember incomplete static
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.
3322 2002-04-06 Jason Merrill <jason@redhat.com>
3325 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
3326 set before checking it.
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
3334 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
3335 * cp-tree.h: Adjust.
3337 * init.c (push_base_cleanups): Just use build_scoped_method_call.
3340 * method.c (implicitly_declare_fn): Pass unqualified type to
3341 synthesize_exception_spec.
3343 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3351 2002-04-04 Jason Merrill <jason@redhat.com>
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
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.
3366 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
3369 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
3373 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
3375 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
3377 2002-04-03 Richard Henderson <rth@redhat.com>
3379 * cp-lang.c (cxx_warn_unused_global_decl): New.
3380 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
3382 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
3384 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
3385 * tree.c (init_tree): Don't set hook.
3387 2002-04-03 Roger Sayle <roger@eyesopen.com>
3390 * decl.c (duplicate_decls): Don't mess with assembler names when
3391 redeclaring builtin functions as static.
3393 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3409 2002-04-01 Roger Sayle <roger@eyesopen.com>
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.
3416 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3424 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
3426 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
3427 * lex.c (cxx_init): Don't set hook.
3429 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3439 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
3441 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
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.
3450 2002-03-28 Roger Sayle <roger@eyesopen.com>
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.
3473 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3481 2002-03-29 Jakub Jelinek <jakub@redhat.com>
3484 * class.c (finish_struct_1): Update static field's DECL_MODE even
3485 if its type is a variant of t.
3487 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3493 2002-03-27 Mark Mitchell <mark@codesourcery.com>
3496 * call.c (build_op_delete_call): Allow for the fact the placement
3497 may be a COMPOUND_EXPR.
3499 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
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,
3506 (init_cplus_expand): Remove.
3507 * lex.c (cxx_init): Don't call init_cplus_expand.
3509 2002-03-26 Mark Mitchell <mark@codesourcery.com>
3512 * init.c (build_new_1): Allow for the fact the result of
3513 build_function_call may be a COMPOUND_EXPR.
3515 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
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.
3527 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3533 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3541 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3547 2002-03-23 Jakub Jelinek <jakub@redhat.com>
3550 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
3552 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
3554 * error.c (dump_type): Be careful about implicit typenames.
3556 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
3559 * semantics.c (finish_base_specifier): Handle erronous base
3562 2002-03-22 Zack Weinberg <zack@codesourcery.com>
3564 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
3567 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
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.
3573 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
3575 * tree.c (cp_cannot_inline_tree_fn): Same.
3577 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
3579 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3580 insert_block, getdecls, global_bindings_p): New.
3582 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
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.
3589 2002-03-20 Jason Merrill <jason@redhat.com>
3592 * init.c (build_delete): Check access for a member op delete here.
3593 * decl2.c (delete_sanity): Not here.
3595 2002-03-19 Jason Merrill <jason@redhat.com>
3598 * class.c (get_vfield_name): Use the constructor_name.
3600 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3609 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
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.
3616 2002-03-18 Jason Merrill <jason@redhat.com>
3619 * init.c (resolve_offset_ref): Hand off to build_component_ref.
3621 PR c++/4222, c++/5995
3622 * call.c (build_over_call): Fix empty class logic.
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.
3630 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
3634 * pt.c (tsubst_friend_function): Use decl_namespace_context.
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.
3640 2002-03-17 Jason Merrill <jason@redhat.com>
3643 * class.c (build_base_path): Virtual base layout is fixed in
3646 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
3648 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3649 * parse.y (yyparse): Remove macro.
3651 2002-03-17 Jason Merrill <jason@redhat.com>
3654 * init.c (build_new_1): Pass the right pointer to op delete.
3656 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
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
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
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.
3680 2002-03-15 Richard Henderson <rth@redhat.com>
3682 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
3684 2002-03-15 Mark Mitchell <mark@codesourcery.com>
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.
3694 2002-03-15 Jason Merrill <jason@redhat.com>
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.
3707 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
3709 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
3711 2002-03-14 Richard Henderson <rth@redhat.com>
3713 * decl.c: Include c-pragma.h.
3714 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
3715 * Make-lang.in: Update dependencies.
3717 2002-03-14 Jakub Jelinek <jakub@redhat.com>
3720 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
3721 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
3723 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
3725 * mangle.c (write_builtin_type): Handle 128-bit integers even if
3726 they are not a standard integer type.
3728 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
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.
3734 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3736 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
3738 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
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
3746 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
3749 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
3750 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
3753 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
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
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.
3766 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
3768 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
3770 * typeck.c (build_static_cast): Compare non-qualified types
3771 with pointer to member conversions.
3773 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
3774 Daniel Berlin <dan@dberlin.org>
3776 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
3777 (cxx_get_alias_set): Use it.
3779 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3781 * cp-tree.h (stabilize_expr): Prototype.
3783 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
3785 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
3786 conditional return void.
3788 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3795 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
3802 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
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.
3810 2002-03-01 Michael Matz <matz@suse.de>
3812 * typeck.c (cp_pointer_int_sum): Complete inner type which is
3813 used later by size_in_bytes().
3815 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
3817 * cp-tree.h: Require __GNUC__ to be #defined.
3818 (build_init): Add missing prototype.
3820 2002-03-01 Jason Merrill <jason@redhat.com>
3822 * except.c: Don't include decl.h or obstack.h. Do include
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.
3833 2002-02-28 Jason Merrill <jason@redhat.com>
3835 * search.c (lookup_base_r): Don't clear is_non_public just because
3836 we found a friendly scope.
3838 * decl.c (finish_function): Only warn about missing return
3839 statement with -Wreturn-type.
3841 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
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.
3850 2002-02-27 Zack Weinberg <zack@codesourcery.com>
3852 * decl2.c: Delete traditional-mode-related code copied from
3853 the C front end but not used, or used only to permit the
3856 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
3859 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
3862 2002-02-22 Jakub Jelinek <jakub@redhat.com>
3865 * semantics.c (finish_switch_cond): Don't call get_unwidened
3868 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
3871 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
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
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
3889 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
3891 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
3893 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
3895 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
3896 unless DECL_ALWAYS_INLINE.
3898 2002-02-20 Jakub Jelinek <jakub@redhat.com>
3900 * typeck.c (cp_pointer_int_sum): Renamed from
3901 pointer_int_sum, call pointer_int_sum.
3903 2002-02-20 Jakub Jelinek <jakub@redhat.com>
3905 * decl.c (duplicate_decls): Return 0 if issued error about
3908 2002-02-19 Jason Merrill <jason@redhat.com>
3910 ABI change: Mangle `void (A::*)() const' as
3911 M1AKFvvE, not MK1AFvvE.
3912 * mangle.c (write_function_type): Write cv-quals for member
3914 (write_pointer_to_member_type): Not here.
3916 2002-02-18 Jason Merrill <jason@redhat.com>
3918 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
3919 (do_decl_instantiation): Likewise.
3921 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
3924 * decl.c (duplicate_decls): Make warning unconditional
3925 if duplicate default argument declarations are present.
3927 2002-02-17 Jakub Jelinek <jakub@redhat.com>
3929 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
3932 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
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.
3938 2002-02-13 Jason Merrill <jason@redhat.com>
3940 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
3941 (finish_function): Don't warn if current_function_returns_null.
3943 * typeck2.c (digest_init): Do handle values of vector type.
3945 * typeck2.c (digest_init, process_init_constructor): Treat vectors
3948 2002-02-11 Jason Merrill <jason@redhat.com>
3950 * parse.y (reserved_declspecs): Don't handle attributes.
3951 (reserved_typespecquals): Handle them here.
3952 * Make-lang.in (parse.c): Adjust expected conflicts.
3954 2002-02-08 Jakub Jelinek <jakub@redhat.com>
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.
3961 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
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
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.
4001 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
4004 * decl.c (grokdeclarator): Allow friend declarations from
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
4010 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
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
4016 * Make-lang.in: Adjust deps.
4018 2002-02-05 Jason Merrill <jason@redhat.com>
4020 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
4022 2002-02-04 Jakub Jelinek <jakub@redhat.com>
4024 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
4025 (finish_switch_cond): Set SWITCH_TYPE.
4027 2002-02-04 Richard Henderson <rth@redhat.com>
4029 * method.c (use_thunk): Always initialize the block tree. Reindent.
4030 * semantics.c (expand_body): Emit thunks after function, not before.
4032 2002-02-04 Jason Merrill <jason@redhat.com>
4034 * decl.c (start_function): Call cplus_decl_attributes immediately
4035 after grokdeclarator.
4037 * decl.c (start_function): Combine DECL_RESULT handling code.
4039 2002-02-03 Jason Merrill <jason@redhat.com>
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.
4050 2002-02-01 Jason Merrill <jason@redhat.com>
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.
4059 * typeck.c (build_component_ref): Always complain about offsetof
4060 constructs on non-PODs. Only make it an error for members of
4063 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
4064 (dump_function_decl): Always dump parms.
4066 * decl2.c (finish_static_data_member_decl): Complain about a local
4067 class with a static data member.
4070 * search.c (lookup_field_1): Don't xref a static data member
4071 just because we looked it up.
4073 2002-01-31 Jason Merrill <jason@redhat.com>
4075 * Make-lang.in (parse.c): Handle .output file.
4078 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
4080 * semantics.c (finish_class_definition): Adjust.
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.
4090 2002-01-29 Jakub Jelinek <jakub@redhat.com>
4092 * decl2.c (cxx_decode_option): Pass 0 as last argument to
4094 * lang-specs.h: Use cpp_unique_options instead of cpp_options
4095 when used together with cc1_options.
4097 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
4100 * typeck2.c (digest_init): Make sure non-array core type is
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.
4107 2002-01-23 Zack Weinberg <zack@codesourcery.com>
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.
4129 2002-01-23 Zack Weinberg <zack@codesourcery.com>
4131 * typeck2.c (friendly_abort): Delete definition.
4132 * cp-tree.h (friendly_abort): Don't prototype.
4133 (my_friendly_assert): Use fancy_abort.
4135 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
4137 * cp-tree.h (my_friendly_abort): Remove.
4139 2002-01-23 Jakub Jelinek <jakub@redhat.com>
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.
4152 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
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().
4159 2002-01-23 Jason Merrill <jason@redhat.com>
4162 * class.c (fixed_type_or_null): Fix thinko.
4165 * init.c (resolve_offset_ref): Use build_indirect_ref.
4167 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
4169 2002-01-22 Jason Merrill <jason@redhat.com>
4171 * parse.y (function_body): Suppress the block for the outermost
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.
4177 * class.c (build_base_path): Tweak formatting.
4179 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
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.
4185 2002-01-17 Jason Merrill <jason@redhat.com>
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.
4198 * error.c (dump_type_suffix): Print the exception specs before
4200 (dump_function_decl): Here, too.
4202 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
4204 2002-01-10 Ira Ruben <ira@apple.com>
4207 * decl.c (start_method): Handle attrlist.
4209 2002-01-10 Jakub Jelinek <jakub@redhat.com>
4211 * decl2.c (max_tinst_depth): Increase default limit to 500.
4213 2002-01-10 Graham Stott <grahams@redhat.com>
4215 * spew.c (YYCHAR): Uppercase macro parameter and add
4218 (NAME): Uppercase macro parameter.
4220 2002-01-09 Graham Stott <grahams@redhat.com>
4222 * decl.h (grokdeclarator): Wrap long line.
4224 * semantics.c (FINISH_COND): Uppercase macro paramaters and
4227 2002-01-08 Graham Stott <grahams@redhat.com>
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
4234 (STREQL): Uppercase macro parameter and whitespace.
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.
4246 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
4248 (VTT_MARKED_BINFO_P): Likewise.
4250 * decl.c (BINDING_LEVEL): Add parenthesis.
4251 (DEF_OPERATOR): Likewise.
4253 * mangle.c (MANGLE_TRACE): Add parenthesis.
4254 (MANGLE_TRACE_TREE): Likewise.
4255 (write_signed_number): Likewise.
4256 (write_unsigned_number): Likewise.
4258 * pt.c (ccat): Uppercase macro parameter.
4261 * search.c (SET_BINFO_ACCESS): Add parenthesis.
4263 2002-01-07 Jason Merrill <jason@redhat.com>
4265 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
4269 * method.c (make_thunk): If !flag_weak, give the thunk the
4271 (use_thunk): Here, too.
4273 2002-01-07 Graham Stott <grahams@redhat.com>
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.
4290 2002-01-06 Graham Stott <grahams@redhat.com>
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.
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.
4494 2002-01-05 Richard Henderson <rth@redhat.com>
4496 * semantics.c (expand_body): Revert last change.
4498 2002-01-04 Jason Merrill <jason@redhat.com>
4501 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
4504 * class.c (build_vtbl_initializer): Check for a lost primary
4505 before calculating the vtable entry to throw away.
4507 2002-01-02 Jason Merrill <jason@redhat.com>
4509 * semantics.c (expand_body): Call outlining_inline_function when
4510 emitting an inline function out of line.
4512 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4514 PR c++/5116, c++/764 reversion
4515 * call.c (build_new_op): Revert the instantiations. They are
4518 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4521 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
4523 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
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.
4531 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
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
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.
4542 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4545 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
4546 (build_x_function_call): Cope with a COMPONENT_REF containing a
4549 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4552 * pt.c (convert_template_argument): Be more careful determining
4553 when RECORD_TYPE templates are or are not templates.
4555 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
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
4568 (structsp): Adjust class definition and class declaration
4570 (maybe_base_class_list): Give diagnostic on empty list.
4572 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
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.
4580 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4583 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
4584 are processing a template decl.
4586 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
4588 PR c++/5116, c++/764
4589 * call.c (build_new_op): Make sure template class operands are
4590 instantiated. Simplify arglist construction.
4592 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
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.
4600 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
4603 * pt.c (push_template_decl_real): Make sure DECL has
4606 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
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).
4613 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
4616 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
4618 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
4621 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
4622 up. Don't stabilize_references when initializing a reference.
4624 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4626 * decl2.c (lang_f_options): Const-ify.
4628 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
4630 * config-lang.in (diff_excludes): Remove.
4632 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
4635 * typeck.c (build_function_call_real): Use original function
4636 expression for errors.
4638 2001-12-18 Jason Merrill <jason@redhat.com>
4641 * class.c (add_method): Do compare 'this' quals when trying to match a
4642 used function. Don't defer to another used function.
4644 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
4646 * pt.c (instantiate_clone): Remove, fold into ...
4647 (instantiate_template): ... here. Simplify by removing mutual
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.
4653 2001-12-18 Jason Merrill <jason@redhat.com>
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.
4660 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
4662 * call.c (build_new_method_call): Use '%#V'.
4663 * error.c (cv_to_string): Use V parameter to determine padding.
4665 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
4667 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
4668 spellings in messages.
4670 2001-12-17 Zack Weinberg <zack@codesourcery.com>
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.
4681 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
4683 * decl2.c (finish_file): Remove back_end_hook.
4685 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
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.
4691 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
4693 * lang-options.h: Use American spelling in messages.
4695 2001-12-13 Jason Merrill <jason@redhat.com>
4697 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
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
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.
4720 * optimize.c (maybe_clone_body): Fix parameter updating.
4722 2001-12-12 Jason Merrill <jason@redhat.com>
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.
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
4736 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
4738 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
4740 * decl.c (finish_function): Check VMS_TARGET, not VMS.
4742 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
4743 (end_cleanup_fn): And poplevel.
4745 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
4746 if we're in a template.
4748 2001-12-12 Jakub Jelinek <jakub@redhat.com>
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.
4758 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
4760 * decl.c (grokdeclarator): Deprecated implicit typename use.
4762 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
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
4770 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
4773 * decl.c (add_binding): Don't reject duplicate typedefs involving
4774 template parameters.
4776 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
4778 * parse.y, semantics.c: Similarly.
4780 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
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
4792 (copy_args_p): Rename to ...
4793 (copy_fn_p): ... here. Reject template functions. Check for pass
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.
4806 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
4808 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
4809 RID_TYPES_COMPATIBLE_P.
4811 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
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.
4817 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
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.
4824 2001-12-05 Jason Merrill <jason@redhat.com>
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.
4832 * init.c (resolve_offset_ref): Don't check access for the base
4833 conversion to access a FIELD_DECL.
4835 * cp-tree.h (TYPE_REFFN_P): New macro.
4836 * decl.c (bad_specifiers): Check it, too.
4838 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
4839 on the __*_type_info type if we haven't seen a definition.
4841 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
4843 * decl.c: Include c-common.h.
4844 (shadow_warning): Move to c-common.c.
4846 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4848 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
4850 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
4852 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
4854 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
4857 * init.c (sort_base_init): Allow binfos to be directly specified.
4858 * method.c (do_build_copy_constructor): Explicitly convert to the
4860 (do_build_assign_ref): Likewise.
4862 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
4864 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
4865 declaration and initialization.
4867 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
4869 * typeck2.c: Remove leading capital from diagnostic messages, as
4870 per GNU coding standards.
4872 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
4875 * decl.c (xref_basetypes): Handle attributes between
4878 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
4881 * parse.y (named_complex_class_head_sans_basetype): Add new
4883 * Make-lang.in (parse.c): Adjust expected conflict count.
4885 2001-12-03 Jason Merrill <jason@redhat.com>
4887 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
4888 immediate binfos for our virtual bases.
4890 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
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.
4897 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
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.
4904 2001-11-29 Mark Mitchell <mark@codesourcery.com>
4907 * cp-tree.h (ovl_member): Remove.
4908 * decl2.c (merge_functions): Handle extern "C" functions
4910 * tree.c (ovl_member): Remove.
4912 2001-11-29 Mark Mitchell <mark@codesourcery.com>
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.
4920 2001-11-29 Mark Mitchell <mark@codesourcery.com>
4923 * call.c (convert_like_real): Do not build additional temporaries
4924 for rvalues of class type.
4926 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
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.
4959 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
4961 * Make-lang.in (c++.generated-manpages): New dummy target.
4963 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
4971 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
4973 * decl2.c (c_language): Move to c-common.c.
4974 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
4978 2001-11-26 Jason Merrill <jason@redhat.com>
4980 * call.c (joust): Remove COND_EXPR hack.
4982 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
4984 * search.c (lookup_base_r): Declare bk in variable declaration
4987 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
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.
5030 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
5044 2001-11-21 Mark Mitchell <mark@codesourcery.com>
5047 * pt.c (lookup_template_class): Ensure that all specializations
5048 are registered on the list corresponding to the most general
5051 2001-11-20 Mark Mitchell <mark@codesourcery.com>
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.
5059 2001-11-19 John Wilkinson <johnw@research.att.com>
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,
5066 2001-11-19 Mark Mitchell <mark@codesourcery.com>
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.
5075 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
5077 * lex.c (cxx_finish): Call c_common_finish.
5078 (finish_parse): Remove.
5080 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5082 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
5083 when displaying error message about missing array bounds.
5085 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5087 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
5089 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
5091 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
5093 * cp-tree.h (print_class_statistics): Restore.
5095 2001-11-15 Jason Merrill <jason@redhat.com>
5097 * method.c (use_thunk): Don't emit debugging information for thunks.
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
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
5110 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
5113 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
5116 * init.c (sort_base_init): Remove unreachable code.
5117 (expand_member_init): Adjust comment to reflect reality. Simplify
5118 and remove unreachable code.
5120 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
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.
5130 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
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
5136 (cp_finish_decl): Build the hierarchical constructor before
5137 calling maybe_deduce_size_from_array_init.
5139 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
5141 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
5143 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
5146 * parse.y (already_scoped_stmt): Remove.
5147 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
5149 2001-11-12 H.J. Lu <hjl@gnu.org>
5151 * cvt.c (ocp_convert): Don't warn the address of a weak
5152 function is always `true'.
5154 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
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.
5167 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5169 * class.c (dump_array): Fix format specifier warning.
5171 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
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.
5179 2001-11-08 Andreas Franck <afranck@gmx.de>
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.
5187 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5189 * Make-lang.in: Update.
5190 * cp-lang.c: Include langhooks-def.h.
5192 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5194 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
5196 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5198 * lex.c (copy_lang_type): Add static prototype.
5200 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5202 * pt.c (unify): Handle SCOPE_REF.
5204 2001-11-01 Jakub Jelinek <jakub@redhat.com>
5206 * tree.c (cp_copy_res_decl_for_inlining): Adjust
5207 DECL_ABSTRACT_ORIGIN for the return variable.
5209 2001-10-31 Zack Weinberg <zack@codesourcery.com>
5211 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5213 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
5215 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
5216 semantics.c, spew.c: Fix spelling errors.
5218 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5220 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
5222 2001-10-25 Zack Weinberg <zack@codesourcery.com>
5224 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
5227 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5229 * cp-lang.c (cxx_get_alias_set): New function.
5230 Point LANG_HOOKS_GET_ALIAS_SET to it.
5232 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
5244 (tsubst_copy): Likewise.
5246 * tree.c (walk_tree): Likewise.
5247 * typeck.c (comptypes): Likewise.
5249 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5251 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
5252 extra calls into fewer ones.
5254 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
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.
5261 2001-10-16 H.J. Lu <hjl@gnu.org>
5263 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
5264 for tree checking disabled.
5266 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
5268 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
5269 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
5271 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
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.
5278 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
5280 * decl.c (bad_specifiers): Don't allow exception specifications
5283 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
5285 * cp/lex.c (init_cp_pragma): Similarly.
5287 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5289 * pt.c (lookup_template_class): Build complete template arguments
5290 for BOUND_TEMPLATE_TEMPLATE_PARM.
5292 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
5308 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5310 * pt.c (determine_specialization): Ignore functions without
5313 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
5316 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
5318 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
5320 * typeck2.c (store_init_value): Don't re-digest a bracketed
5323 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
5326 2001-10-11 Richard Henderson <rth@redhat.com>
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.
5335 2001-10-10 Richard Henderson <rth@redhat.com>
5337 * parse.y (asm_operand): Allow named operands.
5338 * semantics.c (finish_asm_stmt): Tweek for changed location
5339 of the operand constraint.
5341 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
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.
5354 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
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.
5364 2001-10-08 Richard Henderson <rth@redhat.com>
5366 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
5367 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
5369 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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):
5378 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
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.
5391 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
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
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.
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.
5431 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
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.
5436 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
5438 * decl2.c (cxx_decode_option): Add 'else'.
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.
5444 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
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.
5451 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
5453 * decl.c (init_decl_processing): Don't call
5454 init_function_format_info. Initialize lang_attribute_table
5456 (builtin_function): Call decl_attributes.
5457 (insert_default_attributes): New.
5459 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
5461 * decl.c (grokdeclarator): Copy array typedef handling from C
5464 * decl.c (grokdeclarator): Copy too-large array handling from C
5467 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
5469 * config-lang.in (target_libs): Added target-gperf, so that we
5470 don't try to build it if C++ is disabled.
5472 2001-09-23 Zack Weinberg <zack@codesourcery.com>
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.
5499 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5501 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
5503 2001-09-21 Richard Henderson <rth@redhat.com>
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.
5513 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
5515 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
5517 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
5519 Table-driven attributes.
5520 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
5521 * decl2.c (cplus_decl_attributes): Only take one attributes
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
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.
5540 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
5541 * decl.c (grokdeclarator): Embedded attrs bind to the right,
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.
5557 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5559 * Make-lang.in (cp/error.o): Depend on real.h
5560 * error.c: #include "real.h"
5562 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5564 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
5565 xmalloc/strcpy/strcat.
5567 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5569 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
5571 * pt.c (tsubst_decl): Likewise.
5573 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5575 * decl2.c (lang_f_options): Const-ification.
5576 * lex.c (cplus_tree_code_name): Likewise.
5577 * spew.c (yyerror): Likewise.
5579 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
5582 * class.c (force_canonical_binfo_r): Check & move an indirect
5584 (force_canonical_binfo): Check that it's not already
5586 (mark_primary_virtual_base): Remove BINFO parameter.
5587 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
5589 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
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.
5599 2001-09-04 Mark Mitchell <mark@codesourcery.com>
5601 * decl.c (duplicate_decls): Remove code deadling with
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
5610 (genrtl_finish_function): Likewise.
5612 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
5615 * call.c (build_over_call): Do not optimize any empty base
5618 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
5625 2001-08-30 Kurt Garloff <garloff@suse.de>
5627 * optimize.c (inlinable_function_p): Allow only smaller single
5628 functions. Halve inline limit after reaching recursive limit.
5630 2001-08-30 Joern Rennecke <amylaar@redhat.com>
5631 Jason Merrill <jason_merrill@redhat.com>
5633 * class.c (build_vtable_entry_ref): Subtract in char*, not
5636 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
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.
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.
5649 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
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.
5655 2001-08-19 Jakub Jelinek <jakub@redhat.com>
5657 * typeck2.c (add_exception_specifier): Only require complete type if
5658 not in processing template declaration.
5660 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
5665 * tree.c (TYPE_HASH): Moved to ../tree.h.
5667 2001-08-16 Mark Mitchell <mark@codesourcery.com>
5669 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
5672 2001-08-14 Richard Henderson <rth@redhat.com>
5674 * class.c, cp-tree.h (build_vfn_ref): Remove.
5675 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
5677 2001-08-13 Mark Mitchell <mark@codesourcery.com>
5679 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
5680 empty class assignment as having side-effects to avoid
5683 2001-08-13 Zack Weinberg <zackw@panix.com>
5685 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
5686 * except.c: Include libfuncs.h.
5688 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5690 * decl.c (grokdeclarator): Clarify diagnostic message.
5692 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5694 * decl2.c (do_nonmember_using_decl): Replace using directive
5695 with using declaration in the error message.
5697 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
5703 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
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
5714 * typeck.c (check_return_expr): Be more flexible on alignment check.
5715 Ignore cv-quals when checking for a matching type.
5717 2001-08-09 Richard Henderson <rth@redhat.com>
5719 * decl2.c (finish_objects): Use target hooks instead of
5720 assemble_constructor and assemble_destructor.
5722 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
5724 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
5726 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
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_
5740 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
5742 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
5744 2001-08-06 Richard Henderson <rth@redhat.com>
5746 * decl2.c (finish_objects): Pass a symbol_ref and priority to
5747 assemble_{constructor,destructor}. Remove priority handling.
5749 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
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.
5755 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5757 * cp/spew.c (read_token): No need to pop buffers.
5759 2001-08-02 Stan Shebs <shebs@apple.com>
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.
5765 2001-08-01 Andrew Cagney <ac131313@redhat.com>
5767 * repo.c (get_base_filename): Change return value to const char
5770 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
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
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.
5800 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
5802 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
5803 operand while calling cp_tree_equal.
5805 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
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.
5815 The 3.0 ABI always has a vtable pointer at the start of every
5817 * rtti.c (build_headof_sub): Remove.
5818 (build_headof): Adjust.
5819 (get_tinfo_decl_dynamic): No need to check flag_rtti
5821 (create_real_tinfo_var): Explain why we need a hidden name.
5823 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
5826 * class.c (update_vtable_entry_for_fn): The fixed adjustment
5827 of a virtual thunk should be from declaring base.
5829 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
5831 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
5832 the shared virtual base, so preserving inheritance graph order.
5834 2001-07-30 Andreas Jaeger <aj@suse.de>
5836 * decl2.c: Remove unused var global_temp_name_counter.
5838 2001-07-28 Richard Henderson <rth@redhat.com>
5840 * method.c (pending_inlines): Remove.
5842 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
5844 * class.c (mark_primary_virtual_base): Don't adjust base
5846 (dfs_unshared_virtual_bases): Adjust them here.
5847 (mark_primary_bases): Explain why we adjust at the end.
5849 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
5851 * class.c (finish_struct_1): When copying the primary base's
5852 VFIELD, make sure we find it is at offset zero.
5854 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5856 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
5857 tsubst_expr for default template arguments.
5859 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
5862 * spew.c (yylex): Only copy the token's lineno, if it is
5865 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
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.
5873 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
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.
5882 * decl.c (grokdeclarator): Detect when a function typedef is
5883 declaring a function, and create last_function_parms correctly.
5885 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
5887 * call.c (joust): Only prefer a non-builtin candidate to a builtin
5888 one if they have the same signature.
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
5899 (grok_reference_init): Always use DECL_INITIAL.
5901 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5904 * call.c (build_conditional_expr): Recheck args after
5906 * cp-tree.h (build_conditional_expr): Move to correct file.
5907 * typeck.c (decay_conversion): Diagnose any unknown types
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.
5913 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5916 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
5917 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
5919 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5921 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
5922 (create_vtbl_ptr): ... here.
5924 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5926 * class.c (build_vbase_offset_vbtl_entries): Look for
5927 non-primary base of which we are a sub vtable.
5929 2001-07-24 Phil Edwards <pme@sources.redhat.com>
5931 * semantics.c (finish_this_expr): Remove unused code.
5933 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
5935 Simplify rtti, now we've only one ABI.
5936 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
5938 (tinfo_decl_id, tinfo_var_id): Remove.
5939 (get_typeid_1): Remove.
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.
5952 2001-07-23 Graham Stott <grahams@redhat.com>
5954 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
5955 variable has_two_argument_delete_p.
5957 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
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
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.
5998 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
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.
6040 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
6042 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
6045 2001-07-19 Mark Mitchell <mark@codesourcery.com>
6047 * class.c (finish_struct_anon): Forbid nested classes.
6049 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
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.
6057 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
6059 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
6061 2001-07-18 Mark Mitchell <mark@codesourcery.com>
6063 * class.c (type_requires_array_cookie): New function.
6064 (check_methods): Don't try to figure out whether the type needs a
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.
6073 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
6074 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
6076 * NEWS (Changes in GCC 3.0): Fix typo.
6078 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
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.
6091 2001-07-12 Mark Mitchell <mark@codesourcery.com>
6093 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
6094 for `register' variables with an asm-specification.
6096 2001-07-11 Mark Mitchell <mark@codesourcery.com>
6098 * semantics.c (finish_asm_stmt): Mark the output operands
6099 to an asm addressable, if necessary.
6101 2001-07-11 Ben Elliston <bje@redhat.com>
6103 * Revert this change -- there is a subtle bug.
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.
6114 2001-07-10 Mark Mitchell <mark@codesourcery.com>
6116 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
6119 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
6121 * semantics.c (cp_expand_stmt): Fix for null
6122 current_function_return_value.
6124 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
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.
6133 2001-07-09 Erik Rozendaal <dlr@acm.org>
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.
6139 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
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.
6146 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
6148 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
6149 calls to decl_attributes.
6151 2001-07-06 Ira Ruben <ira@apple.com>
6153 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
6154 be DECL_TEMPLATE_RESULT.
6156 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
6167 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
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.
6175 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
6176 DECL_USER_ALIGN. Check flag_elide_constructors instead of
6178 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
6180 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
6182 * optimize.c (optimize_inline_calls): New function, broken out
6184 (optimize_function): ... here. Call it. Don't inline if it is
6186 (dump_function): Print name of dump flag causing this dump.
6187 * semantics.c (expand_body): Move thunk inline check to
6190 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
6192 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
6193 (comptypes): Use target.comp_type_attributes.
6195 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
6197 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
6199 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6201 * error.c (lang_print_error_function): Add a `diagnostic_context *'
6204 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
6206 * decl2.c (import_export_class): Update.
6208 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
6210 * error.c (init_error): Adjust settings.
6212 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
6214 * error.c (init_error): Adjust settings.
6216 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
6218 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
6219 return pointers to data members by reference rather than by value.
6221 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
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.
6235 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
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.
6242 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
6244 * class.c (dfs_find_final_overrider): Fix logic.
6246 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
6247 virtual thunk instead of non-virtual.
6248 (get_matching_virtual): Uncomment.
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
6254 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
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
6260 2001-06-13 Mark Mitchell <mark@codesourcery.com>
6262 * NEWS: Update release number.
6264 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
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
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
6276 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
6277 (layout_nonempty_base_or_field): Add most derived type
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
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.
6296 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
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.
6304 2001-06-11 Mark Mitchell <mark@codesourcery.com>
6306 * lang-options.h: Emit documentation for -fno-honor-std, not
6309 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
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.
6315 2001-06-10 Mark Mitchell <mark@codesourcery.com>
6316 Gabriel Dos Reis <gdr@codesourcery.com>
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.
6326 * call.c: #include diagnostic.h
6327 (convert_like_real): Remove extern declaration for warnincount and
6330 * repo.c: #include diagnostic.h
6331 * typeck2.c: #include diagnostic.h
6333 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
6335 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
6338 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
6341 * friend.c (do_friend): Use push_decl_namespace for classes at
6344 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
6345 Jason Merrill <jason_merrill@redhat.com>
6348 * class.c (build_secondary_vtable): Use assert, rather than an error
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.
6355 2001-06-07 Mark Mitchell <mark@codesourcery.com>
6357 * decl.c (duplicate_decls): Update source position information
6358 when a template function is defined.
6360 2001-06-07 Phil Edwards <pme@sources.redhat.com>
6362 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
6364 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
6367 * decl.c (pushtag): Don't push into a complete type's scope.
6369 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
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,
6389 * search.c (look_for_overrides_here): Split out from...
6390 (look_for_overrides_r): Here.
6392 * class.c (find_final_overrider): Return error_mark_node on error.
6394 * decl2.c (key_method): #if 0 accidental change.
6396 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
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.
6404 2001-06-05 Mark Mitchell <mark@codesourcery.com>
6406 * semantics.c (begin_class_definition): Robustify.
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.
6413 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
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.
6419 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
6421 * decl.c (xref_tag): Remove extraneous %s on dependent name
6424 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
6426 * class.c (layout_vtable_decl): Fix off by one error on
6428 (build_vtt): Likewise.
6429 (build_ctor_vtbl_group): Likewise.
6431 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
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
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.
6453 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
6456 Part missed from first commit
6457 * decl2.c (finish_anon_union): Copy context.
6459 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
6462 * optimize.c (remap_decl): Remap anonymous aggregate members too.
6464 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
6467 * semantics.c (expand_body): Don't optimize thunks.
6469 2001-05-25 Sam TH <sam@uchicago.edu>
6471 * cp-tree.h lex.h: Fix header include guards.
6473 2001-05-25 Mark Mitchell <mark@codesourcery.com>
6475 * decl.c (init_decl_processing): Tweak.
6477 2001-05-24 Mark Mitchell <mark@codesourcery.com>
6479 * decl.c (duplicate_decls): Tidy.
6480 (init_decl_processing): Always set flag_no_builtin.
6482 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
6485 * decl2.c (do_local_using_decl): Push the decls, even in a
6488 2001-05-22 Mark Mitchell <mark@codesourcery.com>
6490 * optimize.c (initialize_inlined_parameters): Don't set
6491 TREE_READONLY for a VAR_DECL taking the place of an inlined
6494 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
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
6500 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
6502 * parse.y: Refer to compound literals as such, not as
6503 constructor-expressions.
6505 2001-05-21 Mark Mitchell <mark@codesourcery.com>
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.
6513 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
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.
6520 (unsupported_options): Correspondingly.
6522 * decl2.c (maybe_make_one_only): Check flag_weak, not
6523 supports_one_only().
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.
6533 (expand_end_catch_block): Don't end any blocks.
6534 * parse.y (handler): Don't pass anything from finish_handler_parms
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.
6542 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
6544 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
6545 (get_vtable_decl, build_vtt): Not here.
6547 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
6550 * optimize.c (update_cloned_parm): Copy addressability and other
6553 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6555 * pt.c (determine_specialization): Ignore artificial functions.
6557 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
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.
6564 2001-05-18 Diego Novillo <dnovillo@redhat.com>
6566 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
6567 function declaration to avoid stripping the symbol's attributes.
6569 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
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.
6575 2001-05-17 Mark Mitchell <mark@codesourcery.com>
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.
6581 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
6583 * spew.c (read_token): Call yyerror on all unexpected tokens.
6585 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
6587 * init.c (member_init_ok_or_else): Take a tree rather than
6589 (expand_member_init): Adjust.
6591 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
6593 * decl.c (duplicate_decls): Suppress warning about duplicate
6594 decls if the first decl is a friend.
6596 2001-05-12 Zack Weinberg <zackw@stanford.edu>
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.
6605 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
6607 * method.c (build_mangled_C99_name): Remove unused prototype.
6609 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
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.
6616 Reverted Geoff Keating's 2001-05-03's patch.
6618 2001-05-11 Ira Ruben <ira@apple.com>
6620 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
6622 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
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.
6628 2001-05-07 Mark Mitchell <mark@codesourcery.com>
6630 * splay-tree.h (splay_tree_max): New function.
6631 (splay_tree_min): Likewise.
6633 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
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.
6654 2001-05-03 Mark Mitchell <mark@codesourcery.com>
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
6661 (save_function_data): Clear DECL_INLINE in
6662 current_function_cannot_inline is non-NULL.
6663 * decl2.c (flag_inline_trees): Update documentation.
6665 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
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.
6671 * tree.c (walk_tree): Reformat an if block.
6673 2001-05-02 Mark Mitchell <mark@codesourcery.com>
6675 * decl.c (compute_array_index_type): Don't try to do anything with
6676 the indices when processing a template.
6678 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6680 * call.c: NULL_PTR -> NULL.
6681 * class.c: Likewise.
6684 * decl2.c: Likewise.
6685 * except.c: Likewise.
6688 * search.c: Likewise.
6690 * typeck.c: Likewise.
6691 * typeck2.c: Likewise.
6693 2001-05-02 Mark Mitchell <mark@codesourcery.com>
6695 * decl2.c (do_using_directive): Revert previous patch.
6697 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
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.
6706 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
6708 * call.c (build_new_op): Convert args from reference here.
6709 (build_conditional_expr): Don't convert here.
6711 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
6713 * spew.c (last_token_id): New static variable.
6714 (read_token): Set it here.
6715 (yyerror): Use it here.
6717 2001-04-30 Richard Henderson <rth@redhat.com>
6719 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
6722 2001-04-30 Mark Mitchell <mark@codesourcery.com>
6724 * gxxint.texi: Remove.
6725 * Make-lang.in: Remove all traces of gxxint.texi.
6727 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
6729 * decl2.c (start_static_initialization_or_destruction): Correct
6730 logic to handle the -fno-use-cxa-atexit case.
6732 2001-04-30 Mark Mitchell <mark@codesourcery.com>
6734 * optimize.c (update_cloned_parm): New function.
6735 (maybe_clone_body): Use it. Update the `this' parameter too.
6737 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
6739 * decl2.c (unsupported_options): Add new-abi.
6740 * lang-options.h: Remove no longer supported options.
6742 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
6744 * except.c (can_convert_eh): Don't check template parms,
6747 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
6749 * optimize.c (maybe_clone_body): Copy parameter names and locations.
6751 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
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.
6757 2001-04-26 Mark Mitchell <mark@codesourcery.com>
6759 * method.c (use_thunk): Make sure that thunks really are emitted
6762 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
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.
6769 2001-04-25 Mark Mitchell <mark@codesourcery.com>
6771 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
6774 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
6776 * decl.c (grokdeclarator): Set context of namespace scope
6779 2001-04-24 Zack Weinberg <zackw@stanford.edu>
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
6785 (optimize_function): Initialize and free tree_pruner.
6787 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
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
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.
6819 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
6821 * pt.c (tsubst_decl): Use VOID_TYPE_P.
6822 * semantics.c: Fix some typos.
6824 2001-04-23 Phil Edwards <pme@sources.redhat.com>
6826 * cp/decl2.c (flag_honor_std): Always initialize to 1.
6828 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6830 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
6832 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
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.
6838 2001-04-20 Mark Mitchell <mark@codesourcery.com>
6840 * cp-tree.h (finish_enum): Change prototype.
6841 * decl.c (finish_enum): Reorganize.
6842 * parse.y (structsp): Adjust calls to finish_enum.
6844 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
6846 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
6849 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
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.
6862 2001-04-20 Jakub Jelinek <jakub@redhat.com>
6864 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
6867 2001-04-20 Jakub Jelinek <jakub@redhat.com>
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.
6872 2001-04-19 Mark Mitchell <mark@codesourcery.com>
6874 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
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.
6889 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
6891 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
6892 flag_access_control from uninitialized storage.
6894 2001-04-15 Mark Mitchell <mark@codesourcery.com>
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.
6900 * init.c (build_delete): Create a SAVE_EXPR for the address if
6901 we're going to use it more than once.
6903 2001-04-13 Mark Mitchell <mark@codesourcery.com>
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.
6917 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
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.
6925 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6927 * cp-tree.h (warn_return_type, yylex): Delete redundant
6930 * decl.c (current_class_depth, global_namespace): Likewise.
6932 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
6934 * repo.c (flag_use_repository): Likewise.
6936 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
6946 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
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.
6958 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
6960 * class.c (dfs_unshared_virtual_bases): New function.
6961 (mark_primary_bases): Call it.
6962 (check_bases): Ignore virtual bases when determining
6965 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
6967 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
6969 2001-04-11 Mark Mitchell <mark@codesourcery.com>
6971 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
6972 cloned function to the clone.
6974 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6976 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
6978 * semantics.c: Include expr.h.
6980 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
6982 * method.c (implicitly_declare_fn): Commonize code for copy ctor
6983 and assignment op. Set TREE_USED for parameter.
6985 2001-04-10 Mark Mitchell <mark@codesourcery.com>
6987 * class.c (find_final_overrider_data): Add `candidates'.
6988 (dfs_find_final_overrider): Don't issue error messages
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.
6995 2001-04-10 Richard Henderson <rth@redhat.com>
6997 * typeck.c (build_array_ref): Push the array reference inside
6998 COMPOUND_EXPR and COND_EXPR.
7000 2001-04-05 Mark Mitchell <mark@codesourcery.com>
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.
7013 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
7015 * lang-specs.h: Add __DEPRECATED.
7017 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
7019 * search.c (get_dynamic_cast_base_type): When building a new
7020 constant, set its type to ssizetype.
7022 2001-04-04 Jakub Jelinek <jakub@redhat.com>
7024 * optimize.c (expand_call_inline): Only add newly inlined statements
7027 2001-04-03 Mark Mitchell <mark@codesourcery.com>
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
7038 2001-04-03 Mark Mitchell <mark@codesourcery.com>
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.
7045 2001-03-28 Richard Henderson <rth@redhat.com>
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
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.
7101 2001-03-28 Richard Henderson <rth@redhat.com>
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,
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.
7118 2001-03-27 Richard Henderson <rth@redhat.com>
7120 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
7121 exceptions_via_longjmp.
7123 2001-03-27 Phil Edwards <pme@sources.redhat.com>
7125 * pt.c (check_default_tmpl_args): Make error messages clearer.
7127 2001-03-26 Phil Edwards <pme@sources.redhat.com>
7129 * error.c: Also undefine 'A' macro used for cp_printers definition.
7131 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7133 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7135 2001-03-26 Mike Yang <yang@research.att.com>
7136 Mark Mitchell <mark@codesourcery.com>
7138 * dump.c (dump_access): New function.
7139 (cp_dump_tree): Use it. Dump basetype information for class
7142 2001-03-26 Mark Mitchell <mark@codesourcery.com>
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
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
7159 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
7160 rest_of_compilation. Clear DECL_RTL for local variables
7162 (clear_decl_rtl): New function.
7164 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
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
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.
7181 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7183 * class.c (add_method): Use memcpy/memmove, not bcopy.
7185 * decl.c (duplicate_decls): Likewise.
7187 2001-03-23 Jakub Jelinek <jakub@redhat.com>
7189 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
7192 2001-03-23 Jakub Jelinek <jakub@redhat.com>
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
7225 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
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.
7238 2001-03-22 Richard Henderson <rth@redhat.com>
7240 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
7241 * except.c: Don't include it.
7243 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
7244 based on an idea from Joe Buck <jbuck@synopsys.com>
7246 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
7248 (data_def, component_decl): Add reductions to bad_decl.
7250 2001-03-22 Jakub Jelinek <jakub@redhat.com>
7252 * method.c (do_build_assign_ref): Don't use build_modify_expr for
7253 anonymous aggregates, since they don't have assignment operator
7255 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
7256 assignment operators for anonymous structure fields.
7258 2001-03-21 Jason Merrill <jason@redhat.com>
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.
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.
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.
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.
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.
7296 * error.c (GLOBAL_THING): Always use '__'.
7298 2001-03-21 Mark Mitchell <mark@codesourcery.com>
7300 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
7302 * mangle.c (mangle_decl_string): Mangle the names of overloaded
7303 operators, even when they have `extern "C"' linkage.
7305 2001-03-19 Mark Mitchell <mark@codesourcery.com>
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
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.
7367 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
7369 Correct semantics restrictions checking in throw-expression.
7370 * except.c (is_admissible_throw_operand): New function.
7371 (build_throw): Use it.
7373 2001-03-14 Mark Mitchell <mark@codesourcery.com>
7375 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
7378 2001-03-14 Mark Mitchell <mark@codesourcery.com>
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.
7402 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
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
7410 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
7412 * cp/lex.c: Delete duplicate pending_lang_change.
7414 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
7416 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
7418 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
7419 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
7421 2001-03-09 Zack Weinberg <zackw@stanford.edu>
7423 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
7425 2001-03-08 Stan Shebs <shebs@apple.com>
7427 * cp-tree.h (set_identifier_local_value): Remove unused decl.
7429 2001-03-06 Zack Weinberg <zackw@stanford.edu>
7431 * spew.c: Remove references to CPP_OSTRING.
7433 2001-03-06 Andrew Haley <aph@redhat.com>
7435 * typeck.c (convert_arguments): Check that we have an fndecl.
7437 2001-03-05 Andrew Haley <aph@redhat.com>
7439 * typeck.c (convert_arguments): Don't do ellipsis conversion for
7440 __built_in_constant_p.
7442 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
7444 * typeck.c (build_static_cast): Allow enum to enum conversions
7447 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
7449 * class.c (check_field_decls): Pointers to member do not a
7450 non-pod struct make, as per DR 148.
7452 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
7454 * call.c (joust): cp_pedwarn when using gnu extension concerning
7455 worst conversion sequences.
7457 2001-03-01 Zack Weinberg <zackw@stanford.edu>
7459 * decl.c: Replace all uses of 'boolean' with 'bool'.
7461 2001-03-01 Zack Weinberg <zackw@stanford.edu>
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
7468 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
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.
7478 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
7480 * decl2.c (do_nonmember_using_decl): Don't complain if we find
7481 same function. Do complain about ambiguating extern "C"
7484 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
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.
7491 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
7493 * except.c (call_eh_info): Revert "match_function"'s type.
7495 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
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.
7510 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
7512 * call.c (joust): Ensure more_specialized()'s argument length
7513 parameter has correct value for constructors.
7515 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
7517 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
7519 * decl.c (mark_inlined_fns): Prototype.
7521 2001-02-22 Mark Mitchell <mark@codesourcery.com>
7523 * spew.c (yylex): Correct handling of friends.
7525 2001-02-22 Mark Mitchell <mark@codesourcery.com>
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.
7534 2001-02-22 Andreas Jaeger <aj@suse.de>
7536 * optimize.c: Include toplev.h for
7537 note_deferral_of_defined_inline_function prototype.
7539 2001-02-22 Jakub Jelinek <jakub@redhat.com>
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
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.
7555 2001-02-21 Jason Merrill <jason@redhat.com>
7557 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
7558 (DECL_UNINLINABLE): Move to middle-end.
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.
7566 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
7569 2001-02-19 Mark Mitchell <mark@codesourcery.com>
7571 * decl2.c (set_decl_namespace): Allow explicit instantiations in
7574 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7576 * optimize.c (expand_call_inline): Don't walk subtrees of type
7579 2001-02-18 Mark Mitchell <mark@codesourcery.com>
7581 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
7584 2001-02-18 Jason Merrill <jason@redhat.com>
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
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.
7618 2001-02-17 Mark Mitchell <mark@codesourcery.com>
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.
7643 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
7645 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
7646 TREE_PROTECTED from the template being specialized.
7648 2001-02-17 Jason Merrill <jason@redhat.com>
7650 * decl2.c (build_artificial_parm): Set TREE_READONLY.
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
7657 2001-02-17 Mark Mitchell <mark@codesourcery.com>
7659 * call.c (check_dtor_name): Handle template names correctly.
7661 2001-02-16 Jason Merrill <jason@redhat.com>
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.
7669 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
7671 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
7672 class-type introduces at least a type-name.
7674 2001-02-16 Jakub Jelinek <jakub@redhat.com>
7676 * call.c (convert_like_real): Create a temporary for non-lvalue.
7678 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
7680 * cp-tree.h: Fix typos in comments.
7682 2001-02-16 Jason Merrill <jason@redhat.com>
7684 * optimize.c (remap_block): If we're compiling a clone, pass the
7685 new block to insert_block.
7687 2001-02-16 Mark Mitchell <mark@codesourcery.com>
7689 * semantics.c (finish_asm_stmt): Robustify.
7691 2001-02-15 Mark Mitchell <mark@codesourcery.com>
7693 * pt.c (push_template_decl_real): Don't remangle the name of a
7696 2001-02-15 Jim Meyering <meyering@lucent.com>
7698 * Make-lang.in (c++.install-common): Depend on installdirs.
7699 (c++.install-info): Likewise.
7700 (c++.install-man): Likewise.
7702 2001-02-15 Mark Mitchell <mark@codesourcery.com>
7704 * typeck2.c (build_m_component_ref): Robustify.
7706 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
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.
7712 2001-02-14 Jakub Jelinek <jakub@redhat.com>
7714 * typeck.c (build_unary_op): Clarify error message.
7716 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
7718 * parse.y (component_constructor_declarator): allow optional
7719 parentheses around constructor class name.
7721 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
7723 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
7725 * init.c (emit_base_init): Remove incorrect comment about
7727 * method.c (make_thunk): Fix comment alignment.
7729 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
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.
7741 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
7743 * pt.c (unify): Don't check cv quals of array types.
7745 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
7747 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
7748 check whether we already have the type.
7750 2001-02-13 Mark Mitchell <mark@codesourcery.com>
7752 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
7753 * call.c (build_op_delete_call): Simplify to remove duplicate
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.
7762 2001-02-13 Jason Merrill <jason@redhat.com>
7764 * lang-specs.h: Add more __EXCEPTIONS.
7766 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
7768 * typeck2.c (process_init_constructor): Check
7769 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
7771 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
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.
7777 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
7779 * errfn.c (cp_deprecated): Tweak diagnostic text.
7780 * parse.y (new_initializer): Deprecate initializer lists
7783 2001-02-12 Mark Mitchell <mark@codesourcery.com>
7785 Remove old ABI support.
7787 2001-02-11 Mark Mitchell <mark@codesourcery.com>
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.
7793 * Makefile.in (g++spec.o): Fix typo.
7795 2001-02-09 Jason Merrill <jason@redhat.com>
7797 * lang-specs.h: Restore definition of __EXCEPTIONS.
7799 2001-02-08 Jason Merrill <jason@redhat.com>
7801 * search.c (shared_member_p): New function.
7802 (lookup_field_r): Use it.
7803 * cp-tree.h (SHARED_MEMBER_P): Remove.
7805 * method.c (process_overload_item): Handle template-dependent array
7807 * pt.c (type_unification_real): If we end up with undeduced nontype
7810 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
7813 * typeck2.c (friendly_abort): Don't say anything if we have
7814 earlier errors or sorries.
7816 * decl.c (check_tag_decl): Notice attempts to redefine bool and
7817 wchar_t. Ignore if in_system_header.
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.
7824 2001-02-07 Mark Mitchell <mark@codesourcery.com>
7826 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
7829 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
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.
7835 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
7837 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
7838 from error_mark_node.
7840 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
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
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
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
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
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
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
7914 2001-02-05 Mark Mitchell <mark@codesourcery.com>
7916 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
7918 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
7927 2001-02-04 Mark Mitchell <mark@codesourcery.com>
7929 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
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
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
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.
7947 2001-02-03 Jakub Jelinek <jakub@redhat.com>
7949 * decl.c (push_class_binding): Use context_for_name_lookup instead
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.
7955 2001-02-02 Jakub Jelinek <jakub@redhat.com>
7957 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
7958 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
7960 * call.c (convert_class_to_reference, build_user_type_conversion_1,
7961 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
7963 2001-02-02 Mark Mitchell <mark@codesourcery.com>
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
7970 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
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.
7984 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
7990 * init.c (init_init_processing): Don't set minus_one_node.
7991 (build_vec_init): Use integer_minus_one_node.
7993 * rtti.c (get_tinfo_decl_dynamic): Likewise.
7995 2001-01-28 Jakub Jelinek <jakub@redhat.com>
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.
8001 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8003 * Make-lang.in: Remove all dependencies on defaults.h.
8004 * call.c: Don't include defaults.h.
8006 * decl2.c: Likewise.
8007 * except.c: Likewise.
8011 * typeck.c: Likewise.
8013 2001-01-25 Jakub Jelinek <jakub@redhat.com>
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.
8021 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
8023 * pt.c (tsubst_decl): Remove IN_DECL parameter.
8024 (tsubst_arg_types): Check parameter is not void.
8025 (tsubst): Adjust tsubst_decl call.
8027 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
8029 * call.c (add_builtin_candidate): Quote std properly, from
8032 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8034 * pt.c (check_explicit_specialization): Clone constructors and
8037 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
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.
8043 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
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.
8055 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
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
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
8079 2001-01-19 Jason Merrill <jason@redhat.com>
8081 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
8083 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
8086 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
8088 * decl2.c (arg_assoc_class): Fix double iteration logic.
8090 2001-01-19 Jason Merrill <jason@redhat.com>
8092 * init.c (build_delete): Always call convert_force to strip cv-quals.
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.
8098 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
8100 * search.c (get_vbase_1): Count only virtual bases.
8102 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
8104 * class.c (duplicate_tag_error): Robustify flag clearing.
8106 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
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.
8117 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
8119 * pt.c (copy_default_args_to_explicit_spec): Preserve
8120 object's CV quals. Reorganize.
8122 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
8124 * typeck.c (build_modify_expr): Say `initialization' for
8126 * init.c (build_default_init): Convert to enumeral type, if
8129 2001-01-18 Jakub Jelinek <jakub@redhat.com>
8131 * parse.y (nomods_initdcl0): Properly set things up for
8134 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
8136 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
8137 (type_unification_real): Set it.
8140 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
8142 * decl.c (finish_destructor_body): Convert to vbase pointer here.
8144 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
8146 * semantics.c (begin_class_definition): Check we're not inside a
8149 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
8151 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
8154 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8156 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
8157 * call.c (build_over_call): Add comment.
8159 2001-01-16 Daniel Berlin <dberlin@redhat.com>
8161 * cvt.c (ocp_convert): Handle vector type conversion
8162 * typeck2.c (digest_init): Handle vector type initializations
8164 2001-01-16 Phil Edwards <pme@sources.redhat.com>
8166 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
8169 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
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.
8176 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
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
8184 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
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.
8190 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
8192 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
8194 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
8196 * g++.1: Change to be ".so man1/gcc.1".
8198 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
8200 * Make-lang.in (c++.info, c++.install-info): Build and install g++
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.
8207 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
8209 * typeck.c (build_c_cast): Do template processing earlier.
8210 Always pedwarn on array casts.
8212 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
8214 * friend.c (make_friend_class): Make sure a templated class is
8215 actually a template.
8217 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
8219 * decl2.c (get_guard): Set linkage from guarded decl.
8221 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
8223 * call.c (convert_default_arg): Check for unprocessed
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
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.
8244 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
8246 * pt.c (unify): Check array has a domain, before checking
8247 whether it is variable sized.
8249 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
8251 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
8252 parameters with pointers to arrays of unknown bound.
8254 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
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.
8262 2001-01-10 Mark Mitchell <mark@codesourcery.com>
8264 * mangle.c (write_builtin_type): Fix thinko.
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.
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.
8285 2001-01-10 Mark Mitchell <mark@codesourcery.com>
8287 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
8288 looking at DECL_CLONED_FUNCTION for non-functions.
8290 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
8292 * error.c (dump_template_parameter): Use parm to determine how
8293 to print default value.
8295 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
8297 * class.c (duplicate_tag_error): Clear more flags.
8299 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
8301 * call.c (build_new_method_call): Use binfo_for_vbase.
8303 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
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.
8310 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
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.
8316 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
8318 * decl2.c (lang_decode_option): Handle -Wformat=2.
8320 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
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.
8333 * class.c (finish_struct): Constify saved_filename.
8335 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
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.
8341 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
8343 * decl.c (struct binding_level): Adjust class_shadowed comments
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.
8349 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
8358 2001-01-07 Mark Mitchell <mark@codesourcery.com>
8360 * decl2.c (grokfield): Don't accept `asm' specifiers for
8361 non-static data members.
8363 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8365 * expr.c (cplus_expand_expr): Don't reset `target'.
8367 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
8369 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
8371 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
8373 * parse.y (template_datadef): Check for error_mark_node.
8375 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
8377 * cp-tree.def (DEFAULT_ARG): Make `x' class.
8379 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
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.
8390 2001-01-04 Mark Mitchell <mark@codesourcery.com>
8392 * call.c (build_conv): Don't use build1 for USER_CONV.
8393 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
8395 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
8397 * lex.c (lang_init): Call c_common_lang_init.
8399 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
8401 * search.c (lookup_fnfields_here): Remove.
8402 (look_for_overrides_r): Use lookup_fnfields_1.
8403 Ignore functions from using declarations.
8405 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
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
8414 * typeck2.c (merge_exception_specifiers): New function.
8416 2001-01-03 Jason Merrill <jason@redhat.com>
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
8430 2000-12-22 Mike Stump <mrs@wrs.com>
8432 * decl2.c: (max_tinst_depth): Increase to 50.
8434 2001-01-02 Mark Mitchell <mark@codesourcery.com>
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
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
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.
8453 * rtti.c (get_vmi_pseudo_type_info): Likewise.
8455 2001-01-02 Richard Henderson <rth@redhat.com>
8457 * parse.y (asm): Set ASM_INPUT_P.
8459 2001-01-02 Jason Merrill <jason@redhat.com>
8461 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
8464 * typeck.c (cp_truthvalue_conversion): New fn.
8465 * cvt.c (ocp_convert): Use it.
8467 * cp-tree.h: Lose c-common.c decls.
8469 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
8470 * cvt.c (convert_to_void): Use type_unknown_p.
8472 * typeck.c (strip_all_pointer_quals): Also strip quals from
8473 pointer-to-member types.
8475 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
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.
8482 2001-01-02 Andreas Jaeger <aj@suse.de>
8484 * decl.c (cp_missing_noreturn_ok_p): New.
8485 (init_decl_processing): Set lang_missing_noreturn_ok_p.
8487 2000-12-29 Jakub Jelinek <jakub@redhat.com>
8489 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
8491 2000-12-29 Mark Mitchell <mark@codesourcery.com>
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
8501 2000-12-28 Mark Mitchell <mark@codesourcery.com>
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.
8509 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
8511 * search.c (binfo_for_vtable): Return least derived class, not
8512 most. Handle secondary vtables.
8514 2000-12-22 Jason Merrill <jason@redhat.com>
8516 * pt.c (more_specialized): Don't optimize len==0.
8517 (fn_type_unification): If we're adding the return type, increase len.
8519 * typeck.c (build_binary_op): Fix pmf comparison logic.
8521 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
8522 DECL_STATIC_FUNCTION_P.
8524 * semantics.c (genrtl_finish_function): Don't try to jump to
8525 return_label unless it exists.
8527 In partial ordering for a call, ignore parms for which we don't have
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',
8540 2000-12-21 Jason Merrill <jason@redhat.com>
8542 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
8543 DECL_TEMPLATE_RESULT.
8545 * search.c (lookup_field_r): Call lookup_fnfields_1, not
8546 lookup_fnfields_here.
8548 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
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.
8556 * error.c (dump_expr): Handle *_CAST_EXPR.
8558 * typeck2.c (build_scoped_ref): Always convert to the naming class.
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.
8566 2000-12-20 Richard Henderson <rth@redhat.com>
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.
8579 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
8581 * cp-tree.h: Don't declare warn_long_long.
8583 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8585 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
8588 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8590 * pt.c (unify): Handle when both ARG and PARM are
8591 BOUND_TEMPLATE_TEMPLATE_PARM.
8593 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8595 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
8596 DECL_TEMPLATE_PARM_P.
8598 2000-12-15 Jason Merrill <jason@redhat.com>
8600 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
8602 * init.c (build_new_1): Don't strip quals from type.
8604 * decl.c (pushdecl): Don't check for linkage on a non-decl.
8606 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
8608 * call.c (build_new_function_call): Lose space before paren in
8610 (build_new_method_call): Likewise.
8612 * typeck2.c (build_m_component_ref): Propagate quals from datum.
8614 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8616 * pt.c (check_explicit_specialization): Propagate default
8617 function arguments to explicit specializations.
8619 2000-12-13 DJ Delorie <dj@redhat.com>
8621 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
8624 2000-12-08 Jason Merrill <jason@redhat.com>
8626 * error.c (dump_function_name): Don't let the user see __comp_ctor.
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.
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.
8642 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
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.
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.
8654 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
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.
8662 2000-12-07 Jakub Jelinek <jakub@redhat.com>
8664 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
8666 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
8668 * decl2.c (lang_decode_option): Handle -Wformat-security.
8670 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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.
8679 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
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.
8685 2000-12-05 Will Cohen <wcohen@redhat.com>
8687 * decl.c (finish_case_label): Cleared
8688 more_cleanups_ok in surrounding function scopes.
8689 (define_label): Likewise.
8691 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
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
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
8711 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
8713 * typeck.c (get_delta_difference): If via a virtual base,
8715 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
8718 2000-12-04 Richard Henderson <rth@redhat.com>
8720 * error.c (dump_tree): Use output_add_string not OB_PUTS.
8722 2000-12-04 Jason Merrill <jason@redhat.com>
8724 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
8725 (write_builtin_type): Pass intSI_type_node and the like through
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.
8735 * Make-lang.in: Tweak top comment for emacs.
8738 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
8740 * class.c (clone_function_decl): Robustify.
8742 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
8744 * decl.c (store_bindings): Only search in the non modified
8745 old_bindings for duplicates.
8747 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
8749 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
8752 * typeck.c (build_static_cast): Remove unused variable.
8754 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8756 * pt.c: Fix typo in comment.
8758 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
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.
8764 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
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.
8774 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
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
8781 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
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
8788 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
8790 * method.c (do_build_assign_ref): Construct appropriately
8791 CV-qualified base reference. Don't allow const casts in base
8794 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
8796 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
8797 incomplete return type.
8799 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8801 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
8802 * semantics.c (finish_base_specifier): Accept a _TYPE not a
8805 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8807 * spew.c (yyerror): Cope if yylval.ttype is NULL.
8809 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8811 * decl.c (grokdeclarator): Diagnose undefined template contexts.
8813 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8815 * decl.c (grokdeclarator): Do type access control on friend
8818 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
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.
8826 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
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
8837 2000-11-26 Mark Mitchell <mark@codesourcery.com>
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.
8851 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
8853 * method.c (build_mangled_C9x_name): Rename to
8854 build_mangled_C99_name. Change C9X references in comments to
8857 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
8859 * parse.y (unary_expr): Move VA_ARG from here ...
8860 (primary): ... to here.
8862 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
8864 * semantics.c (finish_id_expr): If type is error_mark, return
8867 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
8869 * pt.c (lookup_template_class): Simplify loop exit constructs.
8870 Cope when there is no partial instantiation of a template
8873 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
8875 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
8877 2000-11-22 Mark Mitchell <mark@codesourcery.com>
8879 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
8882 * pt.c (do_decl_instantiate): Explicitly clone constructors and
8883 destructors that haven't already been cloned.
8885 2000-11-20 Richard Henderson <rth@redhat.com>
8887 * parse.y (yyparse_1): Rename the parser entry point.
8889 2000-11-20 Alex Samuel <samuel@codesourcery.com>
8891 * mangle.c (write_name): Use <unscoped-name> for names directly in
8893 (write_unscoped_name): Accept names directly in function scope.
8895 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
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.
8901 2000-11-19 Mark Mitchell <mark@codesourcery.com>
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.
8908 2000-11-18 Mark Mitchell <mark@codesourcery.com>
8910 * decl.c (grokparms): Don't even function types of `void' type,
8912 * mangle.c (write_type): Don't crash when confronted with the
8915 * decl.c (grokparms): Don't create parameters of `void' type.
8917 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
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
8923 (handle_pragma_implementation): No need to ggc_strdup main_filename.
8925 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8927 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
8929 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
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.
8940 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8942 * typeck2.c (incomplete_type_error): Reorganize to avoid
8943 excessive diagnostics.
8945 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
8947 * lex.c (struct impl_files, internal_filename): Constify a char *.
8949 2000-11-16 Mark Mitchell <mark@codesourcery.com>
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.
8956 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
8958 * call.c (op_error): Make error messages clearer.
8960 2000-11-15 Mark Mitchell <mark@codesourcery.com>
8962 * decl.c (wrapup_globals_for_namespace): Don't mark things
8963 TREE_ASM_WRITTEN when they're not.
8965 2000-11-15 Jason Merrill <jason@redhat.com>
8967 * typeck2.c (friendly_abort): Uncount the error before handing
8970 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
8972 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
8974 2000-11-14 Mark Mitchell <mark@codesourcery.com>
8976 * class.c (build_vtbl_initializer): Fix typo in comment.
8977 * typeck.c (expr_sizeof): Don't crash on errors.
8979 2000-11-14 Jim Wilson <wilson@redhat.com>
8981 * lang-specs.h: Add %2 after %(cc1_options).
8983 2000-11-14 Richard Henderson <rth@redhat.com>
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.
8989 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
8991 * typeck.c (build_unary_op): Use boolean_increment from
8992 c-common.c, moving the relevant code there.
8994 2000-11-11 Jason Merrill <jason@redhat.com>
8996 * typeck.c (mark_addressable): Don't call put_var_into_stack.
8998 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
9001 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9003 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
9004 * lex.c (copy_lang_decl): Likewise.
9006 2000-11-09 Mark Mitchell <mark@codesourcery.com>
9008 * dump.c (cp_dump_tree): Don't dump function bodies here.
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.
9029 2000-11-07 Eric Christopher <echristo@redhat.com>
9031 * decl.c (init_decl_processing): Change definition of
9032 __wchar_t to wchar_t. Remove artificial declaration of
9034 * lex.c: Change instances of __wchar_t to wchar_t.
9036 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
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.
9043 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
9045 * decl.c (grok_op_properties): Always use coerce_new_type and
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.
9051 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
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 ().
9058 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
9060 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
9062 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
9064 * Make-lang.in (c++.distdir): Remove.
9066 2000-11-04 Mark Mitchell <mark@codesourcery.com>
9068 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
9069 declarations from different namespaces to be combined.
9071 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
9073 * decl.c: Include tm_p.h.
9075 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
9077 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
9079 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
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 ()
9086 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
9088 * call.c (build_over_call): Call fold on the CALL_EXPR.
9090 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
9092 * error.c (dump_template_decl): Separate template hearders with
9095 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
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.
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.
9111 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
9112 instead of TS_PLAIN.
9114 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
9115 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
9118 2000-10-30 Mark Mitchell <mark@codesourcery.com>
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
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.
9131 2000-10-28 Mark Mitchell <mark@codesourcery.com>
9133 * pt.c (instantiate_decl): Always instantiate static data members
9134 initialized in-class.
9136 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
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.
9145 * Makefile.in: Delete.
9146 * config-lang.in: Delete outputs= line.
9148 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
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
9155 2000-10-23 Jason Merrill <jason@redhat.com>
9157 * call.c (equal_functions): Also call decls_match for extern "C" fns.
9159 2000-10-22 Jason Merrill <jason@redhat.com>
9161 * call.c (build_conditional_expr): Use ocp_convert to force
9164 2000-10-22 Mark Mitchell <mark@codesourcery.com>
9166 * call.c (standard_conversion): Use RVALUE_CONVs for all
9167 expressions that satisfy lvalue_p, not just those that satisfy
9170 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
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.
9176 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
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.
9184 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
9186 2000-10-21 Jason Merrill <jason@redhat.com>
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.
9193 2000-10-20 Jason Merrill <jason@redhat.com>
9195 * tree.c (walk_tree): Don't walk into default args.
9197 * error.c (dump_expr): Use host_integerp.
9199 2000-10-20 David Edelsohn <edelsohn@gnu.org>
9201 * typeck2.c (abstract_virtuals_error): Use "because" instead of
9202 "since" in error message.
9204 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9206 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
9208 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
9210 * decl.c (revert_static_member_fn): Fixed typo.
9212 2000-10-19 Mark Mitchell <mark@codesourcery.com>
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
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.
9234 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
9235 * decl.c (select_decl): Don't return declarations that are
9238 2000-10-18 Mark Mitchell <mark@codesourcery.com>
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.
9266 2000-10-17 Mark Mitchell <mark@codesourcery.com>
9268 * cp-tree.h (back_end_hook): Remove declaration.
9269 * decl2.c (back_end_hook): Remove definition.
9271 * dump.c (dequeue_and_dump): Dump TREE_USED.
9273 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
9275 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
9277 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
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.
9283 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
9285 * decl2.c (warn_missing_format_attribute): New variable.
9286 (lang_decode_option): Decode -Wmissing-format-attribute.
9288 2000-10-16 Mark Mitchell <mark@codesourcery.com>
9290 * typeck.c (qualify_type): Remove.
9291 (composite_pointer_type): Fix handling of conversions to `cv void*'.
9293 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9295 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
9297 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9299 * Makefile.in (parse.c, parse.h): Create atomically.
9301 2000-10-12 Mark Mitchell <mark@codesourcery.com>
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
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.
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.
9334 2000-10-09 Richard Henderson <rth@cygnus.com>
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.
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.
9346 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
9348 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
9350 (init_decl_processing): Initialize intmax_type_node and
9353 2000-10-06 Richard Henderson <rth@cygnus.com>
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.
9365 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
9367 * pt.c (lookup_template_class): Set current access for enum.
9368 (tsubst_enum): Set file & line for enum decl.
9370 * spew.c (yylex): Remove unused variable.
9372 2000-10-05 Richard Henderson <rth@cygnus.com>
9374 * semantics.c (genrtl_finish_function): Don't init or check
9375 can_reach_end; remove noreturn and return value checks.
9377 2000-10-05 Tom Tromey <tromey@cygnus.com>
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.
9382 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
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.
9389 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
9391 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
9394 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
9396 * spew.c (frob_id): New static function.
9397 (frob_opname): Use it.
9400 2000-10-01 Mark Mitchell <mark@codesourcery.com>
9402 * decl.c (lang_mark_false_label_stack): Remove.
9403 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
9405 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
9407 * gxxint.texi: Use @email for formatting email addresses.
9409 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
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.
9417 2000-09-24 Mark Mitchell <mark@codesourcery.com>
9419 * ir.texi: Move to ../c-tree.texi.
9421 2000-09-20 Jason Merrill <jason@redhat.com>
9423 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
9425 2000-09-21 Andreas Jaeger <aj@suse.de>
9427 * errfn.c: Move declaration of cp_printer and cp_printers to ...
9428 * cp-tree.h: ... here.
9430 * error.c: Remove declaration of cp_printer.
9432 2000-09-20 Mark Mitchell <mark@codesourcery.com>
9434 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
9436 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
9438 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
9441 2000-09-18 Mark Mitchell <mark@codesourcery.com>
9443 * decl.c (start_function): Robustify.
9445 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9447 * cp-tree.h (check_function_format): Accept a `status' parameter.
9449 * call.c, typeck.c: Updates calls to `check_function_format'.
9451 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
9453 * decl2.c (handle_class_head): Always push some scope even
9456 2000-09-16 Mark Mitchell <mark@codesourcery.com>
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.
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
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.
9507 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
9509 * lex.c (reswords): Add _Complex.
9511 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9513 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
9515 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
9517 * init.c (begin_init_stmts): Don't use // comments.
9519 2000-09-12 Jason Merrill <jason@redhat.com>
9521 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
9522 all non-extern arrays.
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'.
9530 2000-09-12 Mark Mitchell <mark@codesourcery.com>
9532 * decl.c (finish_case_label): Given the LABEL_DECL a
9535 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
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):
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.
9556 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
9558 * ir.texi: Add more documentation.
9560 2000-09-11 Mark Mitchell <mark@codesourcery.com>
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
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.
9603 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
9605 * error.c (cp_tree_printer, case 'P'): Append break.
9607 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
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.
9618 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
9620 * decl.c, rtti.c: Include defaults.h if not already included.
9621 Don't define the *_TYPE_SIZE macros.
9623 2000-09-09 Mark Mitchell <mark@codesourcery.com>
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
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.
9649 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
9651 * ir.texi: Document type nodes.
9653 2000-09-06 Mark Mitchell <mark@codesourcery.com>
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.
9675 * decl.c (initialize_local_var): Remove RTL-generating code.
9676 * semantics.c (genrtl_try_block): Fix formatting.
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.
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.
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.
9751 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
9753 Integrated preprocessor.
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.
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
9767 (record_builtin_type, init_decl_processing): Use RID_MAX not
9769 (grokdeclarator): Use C_IS_RESERVED_WORD.
9770 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
9772 (grok_x_components): Do not inspect pending_inlines chain.
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.
9780 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
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.
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.
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
9800 2000-09-06 Mark Mitchell <mark@codesourcery.com>
9802 * NEWS: Mention that the named return value extension has been
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
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.
9821 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9823 * pt.c (type_unification_real): Replace switch with if.
9824 (unify): Tsubst non-type parms before comparing.
9826 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
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.
9832 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9834 * init.c (build_offset_ref): Deal with namespace scoped
9837 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
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.
9846 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
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.
9857 2000-09-05 Mark Mitchell <mark@codesourcery.com>
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.
9882 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
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
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
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.
9934 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
9936 * decl.c (finish_function): Move the code for handling functions
9937 marked with the constructor and destructor attributes inside the
9940 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9942 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
9944 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9946 * pt.c (lookup_template_class): Remove abort.
9947 * tree.c (get_type_decl): Allow error_mark_node.
9949 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9951 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
9954 2000-09-03 Mark Mitchell <mark@codesourcery.com>
9956 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
9959 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
9961 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
9962 union tag mismatch error reporting.
9964 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
9966 * call.c (build_scoped_method_call): Check it is not a namespace.
9968 2000-08-30 Jason Merrill <jason@redhat.com>
9970 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
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.
9976 * decl.c (start_function): Always call make_function_rtl.
9978 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
9980 * semantics.c (prune_unused_decls): New function.
9981 (finish_stmt_tree): Call it via walk_tree.
9983 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
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.
9993 2000-08-29 Mark Mitchell <mark@codesourcery.com>
9995 * typeck.c (mark_addressable): Remove code that pokes around in
9998 2000-08-28 Jason Merrill <jason@redhat.com>
10000 * lex.c (file_name_nondirectory): Move to toplev.c.
10002 * cp-tree.h (LOCAL_CLASS_P): New macro.
10003 * class.c (finish_struct_1): Use it.
10005 2000-08-27 Alex Samuel <samuel@codesourcery.com>
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
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.
10021 2000-08-27 Jason Merrill <jason@redhat.com>
10023 * decl.c (pushdecl): Matching decls for local externs are found in
10024 the current level. Propagate linkage information from previous
10027 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
10029 * ir.texi (Expressions): Fix typo.
10031 2000-08-25 Greg McGary <greg@mcgary.org>
10033 * tree.c (init_tree): Use ARRAY_SIZE.
10035 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
10037 * error.c (cp_tree_printer): Rework.
10039 2000-08-25 Mark Mitchell <mark@codesourcery.com>
10041 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
10043 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
10044 (cp-demangle.o): Remove target.
10045 (dyn-string.o): Likewise.
10047 * decl.c (grokfndecl): Require that `main' return an `int'.
10048 * mangle.c (write_encoding): Don't mangle return types for
10049 conversion functions.
10051 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
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
10063 (init_error): Initialize lang_printer.
10065 2000-08-24 Jason Merrill <jason@redhat.com>
10067 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
10068 adjustment necessary.
10070 2000-08-24 Greg McGary <greg@mcgary.org>
10072 * cp-tree.h (MAIN_NAME_P): Remove macro.
10074 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
10076 * error.c (print_instantiation_context): Don't forget to flush the
10079 2000-08-23 Jason Merrill <jason@redhat.com>
10081 * typeck.c (build_ptrmemfunc): Save the input pmf.
10083 * method.c (process_modifiers): Use same_type_p.
10085 2000-08-23 Mark Mitchell <mark@codesourcery.com>
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.
10095 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
10097 * error.c (cp_print_error_function): Don't use embedded '\n' in
10100 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
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.
10106 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10108 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
10110 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
10112 * Makefile.in (error.o): Depends on diagnostic.h
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.
10119 * decl.c (init_decl_processing): Set print_error_function to NULL.
10120 (lang_print_error_function): Remove, since we're using a new
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.
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.
10143 2000-08-21 Nix <nix@esperi.demon.co.uk>
10145 * lang-specs.h: Do not process -o or run the assembler if
10148 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
10150 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
10152 * decl2.c (lang_decode_option): Disable gettext attributes for
10155 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
10157 * lex.c (lang_init_options): Default diagnostic message maximum
10158 length to 80, when line-wrapping.
10160 2000-08-20 Mark Mitchell <mark@codesourcery.com>
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.
10171 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
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.
10178 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
10180 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
10183 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
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
10199 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
10201 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
10203 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
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.
10212 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
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.
10221 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
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.
10234 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
10236 * class.c (instantiate_type): Reinstate local variable
10237 deleted in previous change.
10239 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
10242 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
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.
10258 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
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.
10269 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
10270 aggregate tag on the typename's context.
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.
10276 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
10278 * cvt.c (warn_ref_binding): New static function, broken out of ...
10279 (convert_to_reference): ... here. Use it.
10281 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10283 * parse.y (template_arg): Add rule for template qualified with
10286 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10288 * decl2.c (add_function): Reorganize.
10289 (arg_assoc): Do not consider function template decls.
10291 2000-08-11 Jason Merrill <jason@redhat.com>
10293 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
10296 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
10298 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
10299 (lookup_nested_tag): Likewise.
10301 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
10304 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
10306 * parse.y (named_complex_class_head_sans_basetype): Remove
10309 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
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.
10315 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
10317 * decl.c (check_tag_decl): Diagnose typename's which don't
10320 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
10322 * init.c (build_aggr_init): Reject bogus array initializers
10325 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
10327 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
10329 * cp/tinfo.cc (__dynamic_cast): Likewise.
10330 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
10332 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
10334 * cvt.c (convert_to_pointer_force): Fix error message when
10335 attempting to cast from ambiguous base.
10337 2000-08-08 Jason Merrill <jason@redhat.com>
10339 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
10340 (tsubst_template_arg_vector): Likewise.
10342 * decl2.c (build_anon_union_vars): Choose the largest field; don't
10343 assume that one will be as large as the union.
10345 2000-08-07 Kazu Hirata <kazu@hxi.com>
10347 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
10348 * decl.c (pop_labels): Likewise.
10350 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
10352 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
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.
10371 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
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).
10377 2000-08-04 Mark Mitchell <mark@codesourcery.com>
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.
10388 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
10390 * decl.c (flag_isoc94): New variable.
10392 2000-08-02 Jason Merrill <jason@redhat.com>
10394 * pt.c (do_type_instantiation): Add complain parm; don't complain
10395 if called recursively.
10396 * cp-tree.h, parse.y: Adjust.
10398 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
10400 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
10401 -Wno-strict-prototypes.
10403 * g++spec.c: Adjust type of second argument to
10404 lang_specific_driver, and update code as necessary.
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.
10410 2000-08-02 Mark Mitchell <mark@codesourcery.com>
10412 * cp-tree.h (DECL_NEEDED_P): Tweak.
10414 2000-07-28 Jason Merrill <jason@redhat.com>
10416 * lang-specs.h: Use %i in rule for .ii files.
10418 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
10420 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
10422 2000-07-30 Mark Mitchell <mark@codesourcery.com>
10424 Allow indirect primary bases.
10425 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
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
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
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
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.
10476 2000-07-30 Alex Samuel <samuel@codesourcery.com>
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
10486 (write_nested_name): Likewise.
10487 (write_prefix): Likewise.
10488 (write_template_prefix): Likewise.
10489 (write_special_name_constructor): Remove defunct production from
10491 (write_bare_function_type): Remove comment about absent parameter.
10492 (write_template_template_arg): Add missing grammar production to
10495 2000-07-27 Jason Merrill <jason@redhat.com>
10497 * decl.c (duplicate_decls): If common_type produces a non-typedef
10498 type for a typedef, just use the old type.
10500 2000-07-27 Mark Mitchell <mark@codesourcery.com>
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.
10512 2000-07-27 Jason Merrill <jason@redhat.com>
10514 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
10516 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
10518 2000-07-26 Mark Mitchell <mark@codesourcery.com>
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.
10525 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
10527 * parse.y: Add missing ';'.
10529 2000-07-26 Mark Mitchell <mark@codesourcery.com>
10531 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
10534 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
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
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.
10559 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
10561 * decl.c (poplevel): Deal with anonymous variables at for scope.
10562 (maybe_inject_for_scope_var): Likewise.
10564 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
10566 * decl.c: Remove all signal handling code, now done in toplev.c.
10568 2000-07-23 Mark Mitchell <mark@codesourcery.com>
10570 * decl.c (make_rtl_for_nonlocal_decl): Rework.
10572 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
10575 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
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
10589 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
10591 * typeck.c (comp_target_parms): Remove obsolete parameter.
10592 (comp_target_types): Adjust.
10594 2000-07-17 Jason Merrill <jason@redhat.com>
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.
10600 * typeck.c (build_binary_op): Fix grammar in warning.
10602 * exception.cc (__eh_free): Fix prototype.
10604 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
10606 * decl.c (pushdecl): Handle seeing an OVERLOAD in
10607 IDENTIFIER_NAMESPACE_VALUE.
10609 2000-07-16 Mark Mitchell <mark@codesourcery.com>
10611 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
10612 * method.c (use_thunk): Correct handling of vcall offsets.
10614 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
10616 * .cvsignore: parse.h and parse.c have no cp- prefix.
10618 2000-07-13 Mark Mitchell <mark@codesourcery.com>
10620 * .cvsignore: New file.
10622 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
10624 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
10626 2000-07-12 Mark Mitchell <mark@codesourcery.com>
10628 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
10630 * parse.h: Likewise.
10632 2000-07-11 Mark Mitchell <mark@codesourcery.com>
10634 * class.c (layout_class_type): Add pointers to virtual bases after
10635 base classes under the old ABI.
10637 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
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
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.
10673 2000-07-10 Jakub Jelinek <jakub@redhat.com>
10675 * semantics.c (expand_body): Sync interface information
10676 at the end of function body expansion.
10678 2000-07-09 Jason Merrill <jason@redhat.com>
10680 * init.c (build_new_1): Bail early if the call to new fails.
10682 * decl.c (compute_array_index_type): Check specifically for
10683 an INTEGER_CST, not just TREE_CONSTANT.
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
10690 * error.c (dump_template_bindings): Don't crash if we had an
10691 invalid argument list.
10693 * typeck.c (c_expand_start_case): Do narrowing here.
10694 * semantics.c (finish_switch_cond): Not here.
10696 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
10698 * parse.y (asm_clobbers): Do string concatenation.
10700 2000-07-09 Mark Mitchell <mark@codesourcery.com>
10702 * decl.c (pushtag): Don't put local classes in template functions
10703 on the local_classes list.
10705 2000-07-04 Scott Snyder <snyder@fnal.gov>
10707 * decl2.c (get_guard): Add missing return for old ABI local
10710 2000-07-09 Mark Mitchell <mark@codesourcery.com>
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.
10720 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
10722 * pt.c (tsubst): Don't layout type, if it's error_mark.
10724 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
10726 * pt.c (instantiate_pending_templates): Reset template level.
10728 2000-07-05 Jason Merrill <jason@redhat.com>
10730 * call.c (joust): Don't complain about `operator char *()' beating
10731 `operator const char *() const'.
10733 2000-07-04 scott snyder <snyder@fnal.gov>
10734 Jason Merrill <jason@redhat.com>
10736 * repo.c (repo_get_id): Handle the case where a class with virtual
10737 bases has a null TYPE_BINFO_VTABLE.
10739 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
10740 Jason Merrill <jason@redhat.com>
10742 * parse.y (member_init): Just pass in the type.
10743 * init.c (expand_member_init): Handle getting a type.
10745 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10746 Jason Merrill <jason@redhat.com>
10748 * decl.c (finish_function): Warn if a function has no return
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.
10754 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
10756 * decl2.c (push_decl_namespace): Push the original namespace.
10758 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
10760 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
10761 * semantics.c (begin_class_definition): Clear it.
10763 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
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.
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.
10787 * semantics.c (lang_expand_stmt): Changed call to
10788 genrtl_compound_stmt to ignore return value.
10790 2000-07-02 Mark Mitchell <mark@codesourcery.com>
10792 * mangle.c (canonicalize_for_substitution): Return the canonical
10795 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
10797 * typeck.c (commonparms): Remove obstack manipulations.
10799 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
10801 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
10803 * Makefile.in (OBJS): Added ../c-semantics.o.
10804 (OBJDEPS): Likewise.
10806 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
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.
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.
10832 * expect.c (expand_throw): Change reference to
10833 stmts_are_full_exprs_p.
10835 * init.c (build_aggr_init): Change reference to
10836 stmts_are_full_exprs_p.
10837 (build_vec_init): Likewise.
10839 * optimize.c (maybe_clone_body): Change reference to
10840 current_function_name_declared to
10841 cp_function_chain->name_declared.
10843 * pt.c (instantiate_decl): Change reference to
10844 current_function_name_declared to
10845 cp_function_chain->name_declared.
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.
10891 2000-06-30 Jason Merrill <jason@redhat.com>
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
10897 (build_vec_delete): Call it.
10899 * typeck.c (qualify_type_recursive): New fn.
10900 (composite_pointer_type): Use it.
10901 (build_binary_op): Use composite_pointer_type.
10903 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
10904 Jason Merrill <jason@redhat.com>
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.
10911 2000-06-28 Alex Samuel <samuel@codesourcery.com>
10913 * mangle.c (find_substitution): Use same_type_p.
10914 (write_encoding): Don't check for substitutions.
10916 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
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.
10925 2000-06-30 Mark Mitchell <mark@codesourcery.com>
10927 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
10928 (finish_asm_stmt): Do it here, instead.
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
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.
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
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.
10966 2000-06-28 Alex Samuel <samuel@codesourcery.com>
10968 * mangle.c (find_substitution): Use same_type_p.
10969 (write_encoding): Don't check for substitutions.
10971 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
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.
10980 2000-06-29 Mark Mitchell <mark@codesourcery.com>
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
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.
11017 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
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.
11028 2000-06-28 Mark Mitchell <mark@codesourcery.com>
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
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.
11049 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
11052 2000-06-27 Mark Mitchell <mark@codesourcery.com>
11054 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
11056 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
11058 * search.c (hides): Remove.
11059 (is_subobject_of_p): Add most_derived parameter. Use
11061 (lookup_field_queue_p): Adjust.
11062 (lookup_field_r): Adjust.
11064 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
11066 * decl2.c (handle_class_head): Bash typedefs to the type's main
11069 2000-06-25 Mark Mitchell <mark@codesourcery.com>
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.
11082 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11084 * search.c (lookup_member): Fix typo in comment.
11086 2000-06-24 Jason Merrill <jason@redhat.com>
11088 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
11089 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
11091 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11093 * parse.y (complex_direct_notype_declarator): Support global_scope.
11094 * Makefile.in: Adjust conflict count.
11096 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11098 * parse.y (template_arg): Convert TEMPLATE_DECL
11099 that is a template template parameter to
11100 TEMPLATE_TEMPLATE_PARM here.
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
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.
11118 * gxxint.texi: Document template template parameter
11121 2000-06-21 Alex Samuel <samuel@codesourcery.com>
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.
11129 2000-06-22 Mark Mitchell <mark@codesourcery.com>
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
11150 (finish_struct_1): Remove unnecssary code.
11151 (build_vtbl_initializer): Use ssize_int for the running counter of
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
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
11166 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
11168 * error.c (dump_expr): Use BV_FN.
11169 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
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.
11180 2000-06-22 Jason Merrill <jason@redhat.com>
11182 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
11183 (tsubst_friend_function): Copy it here.
11185 * decl.c (grok_op_properties): Fix typo.
11187 * decl2.c (delete_sanity): Clarify warning, avoid failure on
11190 * pt.c (check_explicit_specialization): Clarify error.
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.
11199 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
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.
11204 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
11206 * class.c (push_lang_context): TYPE_NAME gets you to the Java
11208 * decl.c (check_goto): Computed gotos assumed OK.
11210 2000-06-20 Jason Merrill <jason@redhat.com>
11212 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
11213 for which we don't need to look for instantiations.
11215 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
11217 * parse.y (program): Always call finish_translation_unit.
11218 * parse.c, parse.h: Rebuilt.
11220 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
11222 * method.c: Don't include hard-reg-set.h.
11224 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
11226 * rtti.c (get_base_offset): Cope when vbase field is in a base.
11228 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
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.
11249 * mangle.c (write_method_parms): Use direct comparison for end
11252 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
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.
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
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.
11369 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
11370 to call genrtl_expr_stmt when appropriate.
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.
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.
11386 * parse.c: Regenerated.
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.
11392 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
11394 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
11395 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
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.
11403 2000-06-16 Mark Mitchell <mark@codesourcery.com>
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.
11410 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
11411 the number of trees.
11413 (count_trees): Don't use it.
11415 2000-06-15 Jason Merrill <jason@redhat.com>
11417 * tree.c (count_trees): New debugging function.
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.
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.
11427 2000-06-15 Mark Mitchell <mark@codesourcery.com>
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
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
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.
11467 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
11469 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
11472 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
11474 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
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.
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.
11519 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
11521 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
11522 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
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"'.
11528 2000-06-14 Mark Mitchell <mark@codesourcery.com>
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.
11535 2000-06-13 Jakub Jelinek <jakub@redhat.com>
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.
11550 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
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++.
11556 2000-06-12 Mark Mitchell <mark@codesourcery.com>
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
11570 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
11571 (build_rtti_vtbl_entries): Reorganize machinery for building things
11572 at negative offsets.
11574 * optimize.c (expand_call_inline): Don't recurse into the code
11575 used to initialize the parameters more than once.
11577 2000-06-11 Mark Mitchell <mark@codesourcery.com>
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
11588 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
11589 on the regenerated declaration.
11591 2000-06-11 Chip Salzenberg <chip@valinux.com>
11592 Mark Mitchell <mark@codesourcery.com>
11594 * class.c (build_vtable): Clarify comment.
11595 (build_ctor_vtbl_group): Pass the most derived type to
11598 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11600 * decl2.c (compare_options): Don't needlessly cast away const-ness.
11602 2000-06-10 Mark Mitchell <mark@codesourcery.com>
11604 * decl.c (add_binding): Handle duplicate declarations of external
11607 2000-06-09 Chip Salzenberg <chip@valinux.com>
11608 Mark Mitchell <mark@codesourcery.com>
11610 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
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.
11630 2000-06-09 Chip Salzenberg <chip@valinux.com>
11632 * mangle.c (find_substition): Don't mangle objects with typename
11633 substitutions (e.g. "cin" as "Si").
11635 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
11637 * call.c (add_candidate): Use ggc_alloc_cleared.
11638 * decl.c (lookup_label): Likewise.
11639 * lex.c (retrofit_lang_decl): Likewise.
11641 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
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.
11647 * tinfo2.cc: Just declare abort.
11649 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
11651 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
11652 whenever @ is a symbolic name.
11654 2000-06-08 Jakub Jelinek <jakub@redhat.com>
11656 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
11658 2000-06-07 Mark Mitchell <mark@codesourcery.com>
11660 * decl.c (pushdecl): Look up functions by DECL_NAME, not
11661 DECL_ASSEMBLER_NAME.
11663 2000-06-06 Mark Mitchell <mark@codesourcery.com>
11665 * decl2.c (c_language): Define.
11667 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
11669 * lex.c (lang_init_options): Tweak.
11671 * decl2.c: Remove #inclusion of diagnostic.h
11672 (lang_decode_option): Move diagnostic formatting options to
11675 * lang-options.h: Remove documentation for diagnostic options.
11677 * Makefile.in (lex.o): Depends upon diagnostic.h
11679 2000-06-06 Mark Mitchell <mark@codesourcery.com>
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
11686 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
11688 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
11690 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
11692 * search.c (maybe_suppress_debug_info): Don't check
11693 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
11695 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
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.
11712 2000-06-05 Mark Mitchell <mark@codesourcery.com>
11714 * class.c (indirect_primary_base_p): New function.
11715 (determine_primary_base): Use it.
11717 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
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.
11726 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11728 * decl.c (init_decl_processing): Don't call record_component_aliases.
11729 * tree.c (build_cplus_array_type_1): Likewise.
11731 2000-06-04 Mark Mitchell <mark@codesourcery.com>
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.
11741 2000-06-03 Alex Samuel <samuel@codesourcery.com>
11742 Mark Mitchell <mark@codesourcery.com>
11744 * Make-lang.in (CXX_SRCS): Add mangle.c.
11745 * Makefile.in (CXX_OBJS): Add mangle.o.
11746 (mangle.o): New rule.
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.
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.
11816 2000-06-03 Mark Mitchell <mark@codesourcery.com>
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
11831 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
11833 (push_template_decl): Always register specializations of the most
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
11844 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
11845 (most_general_template): Reimplement, in a more straightforward
11847 (regenerate_decl_from_template): Tweak formatting. Use
11848 TMPL_ARGS_DEPTH for clarity.
11849 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
11851 * dump.c (dequeue_and_dump): Dump information about thunks.
11853 2000-06-01 Richard Henderson <rth@cygnus.com>
11855 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
11857 2000-06-01 Richard Henderson <rth@cygnus.com>
11859 * decl2.c (unsupported_options): Fix typo, make const.
11860 (lang_decode_option): Fix bsearch argument order.
11862 2000-06-01 Mark Mitchell <mark@codesourcery.com>
11864 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
11867 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
11877 2000-05-31 Mark Mitchell <mark@codesourcery.com>
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
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.
11896 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
11898 * method.c (mangle_expression): Adjust test for legal expression
11901 * pt.c (instantiate_decl): Save and restore the local
11902 specializations list.
11904 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
11906 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
11908 2000-05-30 Mark Mitchell <mark@codesourcery.com>
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.
11915 * ir.texi: Update thunk documentation.
11917 * call.c (joust): Fix handling of overloaded builtin operators.
11919 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
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.
11929 * tinfo2.cc: Include stdlib.h.
11931 2000-05-29 Mark Mitchell <mark@codesourcery.com>
11933 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
11934 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
11937 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
11939 * decl2.c (lang_decode_option): Use skip_leading_substring instead
11942 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
11944 * operators.def (<?): Duplicated, should have been...
11947 2000-05-27 Alex Samuel <samuel@codesourcery.com>
11948 Mark Mitchell <mark@codesourcery.com>
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
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
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
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.
12031 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
12033 * Make-lang.in (cplib2.ready): Eradicate.
12035 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
12041 2000-05-26 Mark Mitchell <mark@codesourcery.com>
12043 * class.c (layout_nonempty_base_or_field): Replace
12044 `record_layout_info' with `record_layout_info_s'.
12046 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
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.
12074 2000-05-26 Mark Mitchell <mark@codesourcery.com>
12076 * class.c (build_vtable_entry_ref): Correct usage of
12077 get_vtbl_decl_for_binfo.
12079 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
12080 * method.c (implicitly_declare_fn): Not here.
12082 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
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
12093 (create_tinfo_types): Adjust.
12095 2000-05-25 Mark Mitchell <mark@codesourcery.com>
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
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
12141 (expand_indirect_vtbls_init): Remove.
12142 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
12143 * tree.c (make_binfo): Make them bigger.
12145 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
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.
12159 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
12161 * tinfo.h (__user_type_info::contained_virtual_p): New
12163 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
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.
12169 2000-05-24 Mark Mitchell <mark@codesourcery.com>
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.
12190 * init.c (sort_member_init): Fix typo in error message generation
12193 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
12195 * semantics.c (begin_class_definition): make the packed
12196 attribute be sensitive to the "-fpack-struct" command line flag
12198 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
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
12211 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
12212 virtual base in diamond hierarchy bug.
12214 2000-05-23 Mark Mitchell <mark@codesourcery.com>
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.
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.
12250 2000-05-22 Mark Mitchell <mark@codesourcery.com>
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.
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
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".
12276 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12278 * decl2.c (qualified_lookup_using_namespace): Look through
12281 * decl.c (push_using_decl): Return the old decl on namespace level.
12283 2000-05-21 Mark Mitchell <mark@codesourcery.com>
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
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
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.
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.
12337 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
12339 * except.c: Add static prototypes.
12341 2000-05-20 H.J. Lu <hjl@gnu.org>
12343 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
12345 2000-05-19 Mark Mitchell <mark@codesourcery.com>
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.
12400 2000-05-17 Mark Mitchell <mark@codesourcery.com>
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
12411 * typeck.c (build_component_ref): Fix formatting.
12413 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
12415 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
12416 * typeck.c (build_x_compound_expr): Replace warn_unused with
12419 * decl2.c (lang_decode_option): Update -Wall unused flags by
12420 calling set_Wunused.
12422 2000-05-16 Mark Mitchell <mark@codesourcery.com>
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.
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
12449 (dfs_build_vcall_offset_vtbl_entries): Likewise.
12450 (build_rtti_vtbl_entries): Likewise.
12451 (build_vtable_entries): Handle a NULL vcall_index.
12453 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
12455 * decl2.c (lang_decode_option): Fix thinko.
12457 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
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
12467 (get_base_distance): Don't reduce watch_access.
12469 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
12471 * lex.c: #include diagnostic.h.
12472 (lang_init_options): Set default prefixing rules.
12474 * lang-options.h: Add -fdiagnostics-show-location=.
12476 * decl2.c: #include diagnostic.h.
12477 (lang_decode_option): Handle -fdiagnostics-show-location=.
12479 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
12481 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
12482 * vec.cc: Revert my 2000-05-07 change.
12484 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
12486 * class.c (check_field_decls): Complain about non-static data
12487 members with same name as class in class with constructor.
12489 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
12491 * decl.c (grokdeclarator): Allow non-static data members with
12492 same name as class.
12494 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
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
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
12516 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
12518 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
12519 offsetof expansion.
12521 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
12523 * inc/cxxabi.h: Fix typos in comment.
12524 (__base_class_info::__offset): Use a static_cast.
12526 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
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.
12533 2000-05-06 Richard Henderson <rth@cygnus.com>
12535 * typeck.c (build_c_cast): Don't warn integer->pointer size
12536 mismatch for constants.
12538 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
12540 * rtti.c (ptmd_initializer): Set non-public, if class is
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.
12550 2000-05-04 Mark Mitchell <mark@codesourcery.com>
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
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.
12563 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12565 * class.c (update_vtable_entry_for_fn): Prototype.
12567 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
12570 * search.c (dfs_build_inheritance_graph_order): Prototype.
12572 2000-05-04 Mark Mitchell <mark@codesourcery.com>
12574 * cp-tree.h (special_function_kind): Add various kinds of
12576 (special_function_p): New function.
12577 * class.c (overrides): Don't let one kind of destructor override
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.
12583 2000-05-03 Mark Mitchell <mark@codesourcery.com>
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.
12608 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
12610 * tree.c (walk_tree): Set lineno.
12612 2000-05-01 Mark Mitchell <mark@codesourcery.com>
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.
12627 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
12629 * tree.c (build_target_expr_with_type): If we already have a
12630 TARGET_EXPR, just return it.
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.
12637 2000-05-01 Mark Mitchell <mark@codesourcery.com>
12639 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
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.
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.
12658 2000-04-30 Scott Snyder <snyder@fnal.gov>
12660 * decl.c (finish_destructor_body): Use the base destructor when
12661 destroying virtual bases.
12663 2000-04-30 Mark Mitchell <mark@codesourcery.com>
12665 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
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
12671 (expand_call_inline): Update the pending target_exprs stack.
12672 (optimize_function): Initialize the stack.
12674 * decl2.c (finish_file): Fix typo in comment.
12676 * method.c (emit_thunk): Don't try to return a `void' value.
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.
12682 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
12684 * decl.c (grok_op_properties): Add an extra check of argtypes.
12686 2000-04-27 Mark Mitchell <mark@codesourcery.com>
12688 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
12690 (initialize_inlined_parameters): Try to avoid creating new
12693 2000-04-27 Alex Samuel <samuel@codesourcery.com>
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.
12702 2000-04-26 Mark Mitchell <mark@codesourcery.com>
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.
12722 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
12724 * decl.c (finish_function): Don't play games with DECL_INLINE.
12726 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
12728 * ir.texi: Correct typo.
12730 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12732 * decl.c (grokdeclarator): Reject VLAs as members.
12734 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
12736 * call.c (standard_conversion): Accept conversion between
12739 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
12741 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
12743 * decl2.c (finish_file): Remove double setup for accounting
12746 2000-04-24 Robert Lipe <robertlipe@usa.net>
12748 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
12750 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
12752 * new.cc (set_new_handler): Needs to be in std::.
12754 2000-04-23 Mark Mitchell <mark@codesourcery.com>
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
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.
12776 2000-04-23 Richard Henderson <rth@cygnus.com>
12778 * typeck.c (c_expand_asm_operands): Restore the original
12779 contents of the output list.
12781 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
12783 * ir.texi: Document complex number representation.
12785 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
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):
12797 * inc/typeinfo (type_info::before, type_info::operator==):
12798 Compare __name addresses.
12800 * tinfo2.cc: Remove new-abi builtins comment.
12802 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
12804 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
12806 * call.c (joust): Exit early if we get the same function, too.
12808 * decl2.c (key_method): Return NULL_TREE for template classes.
12809 (import_export_class): Don't need to check for template classes.
12811 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
12813 * lex.c: Remove references to cccp.c.
12815 2000-04-18 Mark Mitchell <mark@codesourcery.com>
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.
12830 2000-04-17 Mark Mitchell <mark@codesourcery.com>
12832 * decl2.c (grokfield): Issue error on illegal data member
12835 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
12837 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
12839 2000-04-16 Mark Mitchell <mark@codesourcery.com>
12841 * class.c (build_vtable_entry): Don't build thunks for type-info
12844 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
12846 * decl.c (decls_match): Allow a redeclaration of a builtin to
12847 specify args while the builtin did not.
12849 2000-04-15 Mark Mitchell <mark@codesourcery.com>
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.
12872 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12874 * decl2.c (parse_time, varconst_time): Delete declarations.
12875 (finish_file): Delete LINENO declaration.
12876 START_TIME and THIS_TIME now long.
12878 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
12880 * class.c (build_base_field): Reformat comment.
12882 * inc/cxxabi.h (stddef.h): Comment inclusion.
12883 (__base_class_info::__offset): Comment shift.
12885 2000-04-12 Mark Mitchell <mark@codesourcery.com>
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
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.
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.
12922 2000-04-11 Mark Mitchell <mark@codesourcery.com>
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
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
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
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
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.
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.
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
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.
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.
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.
13029 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13031 * tree.h (HAVE_TEMPLATES): Remove definition.
13032 * lang-options.h (-fthis-is-variable): Remove documentation.
13034 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
13036 * class.c (instantiate_type): Handle object-relative template-id.
13038 * semantics.c (finish_expr_stmt): Call convert_to_void here.
13039 * decl.c (cplus_expand_expr_stmt): Not here.
13041 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
13042 Initialize exprtype earlier.
13044 * parse.y (fn.def1): Check for defining types in return types.
13046 * decl.c (check_tag_decl): Notice extra fundamental types.
13047 Diagnose empty decls in classes, too.
13049 * decl.c (grokdeclarator): Don't override an anonymous name if no
13050 declarator was given.
13052 * cvt.c (convert_to_void): Call resolve_offset_ref.
13054 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
13056 * decl2.c (decl_namespace): Handle getting a type.
13058 * typeck.c (build_c_cast): Re-enable warning for cast between
13059 pointer and integer of different size.
13061 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
13063 * inc/cxxabi.h (__pointer_type_info): Add restrict and
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):
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.
13084 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
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.
13090 2000-04-09 Mark Mitchell <mark@codesourcery.com>
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.
13103 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
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
13109 (__cxa_vec_delete): Catch dtor exceptions.
13111 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
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
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):
13132 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
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
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
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
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
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.
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.
13181 2000-04-08 Mark Mitchell <mark@codesourcery.com>
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
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
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.
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
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
13231 * typeck.c (check_return_expr): Don't magically convert return
13232 statements into `return this' in constructors under the new ABI.
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
13250 (build_offset_rf): Remove dead code.
13251 (build_delete): Use CLASSTYPE_N_BASECLASSES.
13252 * search.c (init_search_processing): Don't initialize
13255 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13257 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
13258 some sign_compare warnings.
13260 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
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.
13273 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
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.
13281 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
13283 * tinfo.cc (operator=): Use __builtin_strcmp.
13284 * tinfo2.cc (before): Likewise.
13286 2000-04-06 Mark Mitchell <mark@codesourcery.com>
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
13308 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
13309 * semantics.c (expand_body): Defer more functions.
13311 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
13313 * vec.cc: New file.
13314 * Make-lang.in (CXX_LIB2FUNCS): Add it.
13316 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13317 __cxa_vec_delete): Declare.
13319 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
13321 * rtti.c (dfs_class_hint_mark): New static function.
13322 (dfs_class_hint_unmark): New static function.
13323 (class_hint_flags): Use them.
13325 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
13327 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
13329 2000-04-05 Mark Mitchell <mark@codesourcery.com>
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
13340 * Makefile.in (GGC_H): New variable. Use it throughout in place
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.
13350 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
13352 * dump.c (dequeue_and_dump): Don't try to print the bit_position
13353 if we don't have a DECL_FIELD_OFFSET.
13355 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
13357 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
13358 special_function_p.
13360 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13362 * cfns.gperf (hash, libc_name_p): Prototype.
13364 * rtti.c (build_dynamic_cast_1): Constification.
13366 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
13368 * semantics.c (deferred_type_access_control): Prototype.
13370 2000-04-04 Mark Mitchell <mark@codesourcery.com>
13372 Correct many new ABI issues regarding vbase and vcall offset
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
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
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
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
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
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.
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.
13457 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
13459 * lang-specs.h: Pass -fno-show-column to the preprocessor.
13461 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
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
13487 (__dynamic_cast): Temporarily #if out optimization.
13489 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
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.
13495 2000-03-28 Mark Mitchell <mark@codesourcery.com>
13497 * class.c: Reorganize to put virtual function table initialization
13498 machinery at the end of the file.
13500 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
13502 * class.c (finish_struct): Use bitsize_zero_node.
13503 * pt.c (instantiate_class_template): Likewise.
13505 2000-03-28 Mark Mitchell <mark@codesourcery.com>
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
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
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
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
13560 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
13577 2000-03-26 Mark Mitchell <mark@codesourcery.com>
13579 * class.c (layout_empty_base): Handle empty bases with non-byte
13581 (build_base_field): Likewise.
13582 (layout_virtual_bases): Likewise.
13584 * class.c (finish_struct_1): Fix typo in this change:
13586 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13588 2000-03-25 Mark Mitchell <mark@codesourcery.com>
13590 * decl.c (grokdeclarator): Count partial specializations when
13591 keeping track of how many template classes have been seen.
13593 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
13595 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
13617 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
13619 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
13621 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
13623 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
13626 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13628 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
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):
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.
13656 2000-03-22 Mark Mitchell <mark@codesourcery.com>
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,
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.
13685 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
13687 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
13688 SIZETYPE to a non-SIZETYPE.
13690 2000-03-21 Mark Mitchell <mark@codesourcery.com>
13692 * class.c (layout_virtual_bases): Adjust names in conditionally
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.
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
13711 (dfs_skip_nonprimary_vbases_markedp): Likewise.
13712 * typeck.c (fntype_p): Remove.
13714 * cp-tree.h (TI_SPEC_INFO): Remove.
13715 (CLASSTYPE_TI_SPEC_INFO): Likewise.
13716 * pt.c (process_partial_specialization): Likewise.
13718 * class.c (build_base_field): Fix thinko in computation of binfo
13721 * tree.c (mark_local_for_remap_p): Mark variables declared in
13722 TARGET_EXPRs as well.
13724 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
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.
13759 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
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
13787 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
13788 Jason Merrill <jason@casey.cygnus.com>
13790 * method.c (build_overload_int): Use host_integerp.
13792 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13794 * init.c (build_offset_ref): Handle the case of a templated member
13797 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13799 * except.c (expand_exception_blocks): Clear catch_clauses_last.
13801 2000-03-18 Mark Mitchell <mark@codesourcery.com>
13803 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
13804 * class.c (check_bitfield_decl): Turn illegal bitfields into
13806 (dfs_propagate_binfo_offsets): Adjust for new size_binop
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.
13818 * class.c (check_bitfield_decl): Remove restriction on really long
13820 (layout_class_type): Implement new ABI handling of bitfields
13821 longer than their types.
13823 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13825 * parse.y (extdefs): Call ggc_collect.
13826 * parse.c: Regenerated.
13828 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
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.
13834 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
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.
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.
13859 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
13861 * typeck.c (require_complete_type): Don't assume size_zero_node.
13862 (complete_type_or_else): Likewise.
13864 2000-03-16 Steven Grady <grady@digitaldeck.com>
13865 Jason Merrill <jason@casey.cygnus.com>
13867 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
13869 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
13871 * decl2.c (grokfield): Bail out if type is error_mark_node.
13873 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
13875 * tinfo2.cc (__ptr_to_member_data): Rename to ...
13876 (__pointer_to_member_data): ... here. Adjust.
13877 * rtti.c (create_tinfo_types): Adjust.
13879 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
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.
13890 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
13892 * decl.c (cp_finish_decl): Remove obsolete comment.
13894 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
13896 2000-03-14 Mark Mitchell <mark@codesourcery.com>
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
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.
13915 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
13917 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
13919 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
13921 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
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.
13929 2000-03-12 Mark Mitchell <mark@codesourcery.com>
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.
13939 2000-03-11 Mark Mitchell <mark@codesourcery.com>
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
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.
13978 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
13980 * lex.c (whitespace_cr): Compress consecutive calls to warning().
13981 (do_identifier): Ditto for error().
13983 * pt.c (convert_nontype_argument): Ditto for cp_error().
13984 (convert_template_argument): Ditto for cp_pedwarn().
13986 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
13988 * exception.cc (__check_null_eh_spec): New fn.
13989 * except.c (expand_end_eh_spec): Call it if the spec is throw().
13991 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
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.
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.
14002 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
14004 * decl.c (maybe_commonize_var): Skip all artificial decls.
14005 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
14007 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
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.
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.
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.
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.
14046 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
14048 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
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.
14057 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
14059 * exception.cc (__cp_pop_exception): Cleanup the original object.
14061 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
14063 * decl.c (grok_op_properties): Merge conversion to void warning
14064 with other silly op warnings.
14066 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
14068 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
14069 array CONSTRUCTOR elements. Don't use expr_tree_cons.
14071 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
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
14084 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
14086 * typeck.c (convert_for_assignment): Don't look at array
14088 * call.c (convert_like_real): Likewise.
14090 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
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.
14099 * search.c (note_debug_info_needed): Walk the bases even if we
14100 weren't deferring the type itself.
14102 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14104 * decl2.c (finish_objects): Constify a char*.
14106 * method.c (emit_thunk): Likewise.
14108 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
14110 * typeck.c (dubious_conversion_warnings): Look through
14113 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
14125 * lang-specs.h (as): Don't call if -syntax-only.
14127 2000-03-06 Mark Mitchell <mark@codesourcery.com>
14129 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
14130 RTL_EXPR_HAS_NO_SCOPE after all.
14132 2000-03-05 Mark Mitchell <mark@codesourcery.com>
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.
14138 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
14141 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
14143 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
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.
14162 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
14164 * decl2.c (key_method): Break out from...
14165 (import_export_vtable, import_export_class): ...here.
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.
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.
14174 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
14176 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
14179 2000-03-02 Mark Mitchell <mark@codesourcery.com>
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
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
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.
14237 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
14238 the command-line, not the end.
14240 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
14242 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
14244 2000-03-02 Tom Tromey <tromey@cygnus.com>
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.
14258 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14260 * typeck.c (comptypes): Treat sizetype like its language equivalent.
14262 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
14264 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
14265 to merge reference/pointer code and fix incorrect warnings.
14267 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
14269 * search.c (protected_accessible_p): Use context_for_name_lookup.
14271 * init.c (construct_virtual_bases): Fix thinko.
14272 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
14274 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
14276 * decl.c (current_function_decl): Move to toplev.c.
14278 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
14280 * pt.c (fn_type_unification): Unify return type, whenever
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.
14287 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14289 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
14291 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
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.
14298 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
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.
14305 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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
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.
14342 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
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.
14357 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
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
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.
14371 2000-02-26 Mark Mitchell <mark@codesourcery.com>
14373 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
14376 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
14378 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
14379 pseudo_type_info creation into the std namespace
14381 2000-02-26 Mark Mitchell <mark@codesourcery.com>
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.
14392 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14394 * lang-options.h (-fmessage-length=): Add missing option.
14396 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
14398 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
14400 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
14402 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
14404 * optimize.c (expand_call_inline): Emit the return label before
14405 evaluating the return value.
14407 2000-02-24 Mark Mitchell <mark@codesourcery.com>
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.
14418 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
14420 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
14421 function type, rather than ICE.
14423 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
14425 * decl.c (grokdeclarator): Call decl_type_access_control.
14426 * parse.y (parse_end_decl): Don't call decl_type_access_control if
14429 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
14431 * decl.c (decls_match): Remove obsolete static member nadgering.
14433 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
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.
14446 2000-02-21 Mark Mitchell <mark@codesourcery.com>
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
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.
14477 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
14479 * call.c (build_object_call): Compress consecutive calls to
14481 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
14482 (build_op_delete_call): Adjust message formatting.
14484 * class.c (check_bases): Compress consecutive calls to
14486 (finish_struct_anon): Say 'ISO C++'.
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
14496 (grokdeclarator): Say 'ISO C++'
14497 (grok_op_properties): Likewise.
14499 * decl2.c (delete_sanity): Clairify diagnostic.
14500 (check_member_template): Same here.
14501 (grok_function_init): Use consistent terminology.
14503 * expr.c (do_case): Say 'ISO C++'
14505 * friend.c (do_friend): Compress consecutive calls to warning.
14507 2000-02-20 Mark Mitchell <mark@codesourcery.com>
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
14521 (finish_struct_1): Remove redundant call to layout_vtable_decl.
14522 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
14525 * class.c (build_vtable): New function, split out from ...
14526 (get_vtable_decl): ... here, and ...
14527 (build_secondary_vtable): ... here.
14529 * pt.c (tsubst_decl): Fix formatting.
14531 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
14547 2000-02-19 Mark Mitchell <mark@codesourcery.com>
14549 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
14551 (build_vtable_entry): Don't assume all vtable entries are
14553 (build_vtbl_initializer): Adjust accordingly.
14554 (get_vtable_decl): Fix formatting.
14556 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
14558 * semantics.c (deferred_type_access_control): Walk the entire
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.
14574 * decl.c (redeclaration_error_message): Allow redeclaration of
14575 namespace-scope decls.
14577 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
14579 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
14581 2000-02-17 Mark Mitchell <mark@codesourcery.com>
14583 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
14584 * decl2.c (grokclassfn): Likewise.
14586 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
14588 * decl2.c (lang_decode_option): Don't set default message length
14590 * lex.c (lang_init_options): Set it here.
14592 2000-02-16 Mark Mitchell <mark@codesourcery.com>
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
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
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
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
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
14672 (push_template_decl_real): Likewise.
14673 (instantiate_class_template): Don't call add_friends.
14674 (tsubst_default_argument): Use DECL_CONTEXT, not
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
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.
14697 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
14699 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
14701 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14703 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
14705 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
14707 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
14709 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
14711 * decl2.c (lang_decode_option): Enable automatic line wrapping.
14713 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
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
14723 2000-02-10 Mark Mitchell <mark@codesourcery.com>
14725 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
14726 used to create an implicit temporary.
14728 * class.c (dfs_modify_vtables): Tweak calculation of functions to
14731 2000-02-08 Nathan Sidwell <nathan@acm.org>
14733 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
14734 strip array element qualifiers too.
14736 2000-02-07 Mark Mitchell <mark@codesourcery.com>
14738 * decl.c (store_parm_decls): Don't build cleanups for parameters
14739 while processing_template_decl.
14741 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
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
14748 (mark_saved_scope): Mark it.
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
14775 * class.c (currently_open_derived_class): New fn.
14776 * method.c (hack_identifier): Use it.
14778 * lex.c (do_identifier): Remove obsolete code.
14780 * parse.y (typed_typespecs): Propagate new_type_flag properly.
14782 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
14784 * tinfo.h: Remove apostrophes from C++ comment (xgettext
14785 thinks this file is plain C).
14787 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14789 * Makefile.in (call.o): Depend on $(EXPR_H).
14791 * call.c: Include "expr.h".
14793 * class.c (dump_class_hierarchy): Add prototype.
14795 * search.c (dfs_get_pure_virtuals): Likewise.
14797 2000-02-1 Ulrich Drepper <drepper@redhat.com>
14799 * parse.y (simple_stmt): Allow :: token in asm parameter list.
14800 * parse.c: Rebuilt.
14802 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
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.
14808 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
14810 * tinfo.h (old abi): #include "tconfig.h".
14811 * tinfo.cc (convert_to_base): Move into old abi section.
14813 2000-01-31 Mark Mitchell <mark@codesourcery.com>
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 ...
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
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
14850 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
14851 Jason Merrill <jason@yorick.cygnus.com>
14853 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
14855 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
14857 * exception.cc (__throw_bad_typeid): Add missing std::.
14859 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14861 * cp-tree.h (make_thunk): PROTO -> PARAMS.
14863 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
14865 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
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.
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.
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
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.
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.
14926 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
14927 (__is_pointer): Likewise.
14929 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
14931 2000-01-30 Mark Mitchell <mark@codesourcery.com>
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.
14943 2000-01-28 Ulrich Drepper <drepper@redhat.com>
14945 * cp/decl.c: Adjust variable names, comments, help strings.
14947 2000-01-29 Nathan Sidwell <nathan@acm.org>
14949 * new2.cc (operator delete[]): Use operator delete, don't assume
14952 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
14954 * class.c (build_vtbl_initializer): Add argument to
14955 build_vtable_entry call.
14957 2000-01-27 Mark Mitchell <mark@codesourcery.com>
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.
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,
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.
14981 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
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
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.
15014 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
15016 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
15017 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
15019 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
15021 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
15024 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
15026 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
15028 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
15030 * optimize.c (calls_setjmp_r): Supply new argument
15031 to special_function_p.
15033 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15035 * call.c: PROTO -> PARAMS.
15036 * class.c: Likewise.
15037 * cp-tree.h: 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.
15051 * method.c: Likewise.
15052 * optimize.c: Likewise.
15053 * parse.y: 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.
15065 2000-01-25 Richard Henderson <rth@cygnus.com>
15067 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
15069 2000-01-25 Mark Mitchell <mark@codesourcery.com>
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.
15085 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15087 * decl.c (member_function_or_else): Change third arg from a format
15088 specifier to an `enum overload_flags'. Callers changed.
15090 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
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.
15097 2000-01-24 Mark Mitchell <mark@codesourcery.com>
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
15103 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
15105 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
15108 * decl2.c (mark_used): Do instantiate inlines that have been
15109 explicitly instantiated.
15111 2000-01-24 Richard Henderson <rth@cygnus.com>
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.
15117 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
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 &'.
15132 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
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.
15140 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
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
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.
15183 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
15184 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
15186 2000-01-23 Mark Mitchell <mark@codesourcery.com>
15188 * cp-tree.h (__eprintf): Remove declaration.
15189 * tree.c (__eprintf): Remove definition.
15191 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
15192 Mark Mitchell <mark@codesourcery.com>
15194 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
15195 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
15197 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
15199 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
15201 2000-01-23 Mark Mitchell <mark@codesourcery.com>
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
15209 (do_static_destruction): Check that __cxa_atexit is not in use.
15210 (finish_file): Don't call do_static_destruction if using
15213 * typeck.c (convert_arguments): Restore two-message error
15216 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
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.
15228 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
15230 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
15232 * typeck2.c (incomplete_type_error): Restore previous
15233 cp_error and cp_error_at call sequence.
15235 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
15237 * class.c (dump_class_hierarchy): Make format agree with argument;
15238 cast pointer to unsigned long and print with %lx.
15240 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
15242 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
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
15254 * typeck2.c (readonly_error, abstract_virtuals_error,
15255 process_init_constructor, check_for_new_type): Likewise.
15257 2000-01-19 Mark Mitchell <mark@codesourcery.com>
15259 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
15262 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
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.
15292 2000-01-17 Mark Mitchell <mark@codesourcery.com>
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.
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
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.
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
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.
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.
15358 2000-01-16 Mark Mitchell <mark@codesourcery.com>
15360 * class.c (finish_struct_1): Replace redundant code with
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
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
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
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
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.
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.
15415 * init.c (construct_virtual_bases): Don't look up the addresses of
15416 virtual bases at run-time.
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.
15423 * decl.c (init_decl_processing): Complain if -fnew-abi
15424 -fno-vtable-thunks is used.
15426 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
15429 2000-01-15 Mark Mitchell <mark@codesourcery.com>
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.
15455 2000-01-14 Mark Mitchell <mark@codesourcery.com>
15457 * optimize.c (copy_body_r): Clear the operand three of a
15458 TARGET_EXPR when copying it.
15460 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15462 * method.c (build_decl_overload_real): Check whether we are in ::
15463 before returning __builtin_new/delete.
15465 2000-01-13 Mark Mitchell <mark@codesourcery.com>
15467 * pt.c (tsubst_friend_function): Improve comment.
15468 (instantiate_decl): Avoid crashing when a "nested" function is
15469 instantiated from the top level.
15471 * dump.c (dqeueue_and_dump): Dump
15472 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
15474 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15476 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
15478 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
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.
15486 2000-01-12 Mark Mitchell <mark@codesourcery.com>
15488 * decl.c (start_cleanup_fn): Call pushdecl.
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.
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
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.
15534 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15536 * lex.c (DIR_SEPARATOR): Delete macro.
15538 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
15540 * decl2.c (lang_decode_option): Handle automatic line wrapping
15543 2000-01-11 Mark Mitchell <mark@codesourcery.com>
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.
15549 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
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.
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
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.
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.
15588 * class.c (dfs_finish_vtbls): New function.
15589 (finish_vtbls): Use it.
15590 (dump_class_hierarchy): New function.
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.
15608 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15610 * lex.c: Include tm_p.h.
15612 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
15614 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
15616 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
15618 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
15619 * pt.c (instantiate_decl): Defer comdat templates that might not be
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.
15626 * decl2.c (import_export_class): Undo 12/14 change.
15628 * error.c (dump_decl): operator new, not operatornew.
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
15634 2000-01-05 Nathan Sidwell <nathan@acm.org>
15636 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
15639 2000-01-05 Nathan Sidwell <nathan@acm.org>
15641 * typeck.c (build_static_cast): Don't strip target qualifiers
15642 when casting from a class.
15644 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15646 * class.c (warn_hidden): Initialize variable `fndecl'.
15648 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
15650 * decl.c (flag_isoc9x): New variable to be able to use code in
15651 c-common.c. For now always zero.
15653 2000-01-03 Mark Mitchell <mark@codesourcery.com>
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.
15661 2000-01-02 Mark Mitchell <mark@codesourcery.com>
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
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.
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.
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
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.
15722 2000-01-01 Mark Mitchell <mark@codesourcery.com>
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.
15737 2000-01-01 Mark Mitchell <mark@codesourcery.com>
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.
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.
15757 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15759 * call.c (build_new_method_call): Also check destructors.