1 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
5 * semantics.c: Include expr.h.
7 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
9 * method.c (implicitly_declare_fn): Commonize code for copy ctor
10 and assignment op. Set TREE_USED for parameter.
12 2001-04-10 Mark Mitchell <mark@codesourcery.com>
14 * class.c (find_final_overrider_data): Add `candidates'.
15 (dfs_find_final_overrider): Don't issue error messages
17 (find_final_overrider): Issue error messages here.
18 (build_base_field): Don't warn about amgibuous direct bases here.
19 (warn_about_ambiguous_direct_bases): New function.
20 (layout_class_type): Use it.
22 2001-04-10 Richard Henderson <rth@redhat.com>
24 * typeck.c (build_array_ref): Push the array reference inside
25 COMPOUND_EXPR and COND_EXPR.
27 2001-04-05 Mark Mitchell <mark@codesourcery.com>
29 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
30 * decl.c (duplicate_decls): Adjust accordingly.
31 (maybe_commonize_var): Likewise.
32 (grokfndecl): Likewise.
33 (start_function): Likewise.
34 (start_method): Likewise.
35 * decl2.c (key_method): Likewise.
36 (import_export_decl): Likewise.
37 * method.c (implicitly_declare_fn): Likewise.
38 * optimize.c (maybe_clone_body): Likewise.
40 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
42 * lang-specs.h: Add __DEPRECATED.
44 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
46 * search.c (get_dynamic_cast_base_type): When building a new
47 constant, set its type to ssizetype.
49 2001-04-04 Jakub Jelinek <jakub@redhat.com>
51 * optimize.c (expand_call_inline): Only add newly inlined statements
54 2001-04-03 Mark Mitchell <mark@codesourcery.com>
56 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
57 (OPERATOR_FORMAT): Likewise.
58 (OPERATOR_TYPENAME_FORMAT): Likewise.
59 * operators.def: Remove old name-mangling information.
60 * decl.c (grok_op_properties): Adjust accordingly.
61 * lex.c (init_operators): Likewise.
62 * rtti.c (get_tinfo_decl): Issue error messages about types that
65 2001-04-03 Mark Mitchell <mark@codesourcery.com>
67 * decl2.c (import_export_decl): Don't call import_export_class
68 when processing an inline member function.
69 * semantics.c (expand_body): Call import_export_decl before
70 emitting inline functions.
72 2001-03-28 Richard Henderson <rth@redhat.com>
74 IA-64 ABI Exception Handling:
75 * cp-tree.def (EH_SPEC_BLOCK): New.
76 (MUST_NOT_THROW_EXPR): New.
77 * cp-tree.h: Update changed function declarations.
78 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
79 (CPTI_CALL_UNEXPECTED): New.
80 (struct cp_language_function): Rename x_eh_spec_try_block
82 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
83 * decl.c (current_binding_level): If no current function
84 bindings, revert to scope_chain.
85 (initialize_predefined_identifiers): Remove __cp_push_exception.
86 (store_parm_decls): Use begin_eh_spec_block.
87 (finish_function): Use finish_eh_spec_block.
88 (mark_lang_function): Update for name changes.
89 * decl2.c (finish_file): No mark_all_runtime_matches.
90 * dump.c (cp_dump_tree): Handle new tree codes.
91 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
92 * except.c (catch_language_init, catch_language): Remove.
93 (init_exception_processing): Don't set language code.
94 Initialize call_unexpected_node, protect_cleanup_actions,
95 eh_personality_libfunc, lang_eh_runtime_type.
96 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
97 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
98 (prepare_eh_type): Split out type canonicalizations ...
99 (build_eh_type_type): ... from here.
100 (build_eh_type_type_ref): Remove.
101 (mark_all_runtime_matches): Remove.
102 (build_exc_ptr): New.
103 (do_begin_catch, do_end_catch): New.
104 (do_pop_exception): Remove.
105 (build_terminate_handler): Remove.
106 (choose_personality_routine): Split out language choice from ...
107 (initialize_handler_parm): ... here.
108 Use MUST_NOT_THROW_EXPR.
109 (expand_start_catch_block): Use do_begin_catch. Simplify Java
110 exception object handling.
111 (expand_start_eh_spec, expand_end_eh_spec): Remove.
112 (expand_exception_blocks, alloc_eh_object): Remove.
113 (begin_eh_spec_block, finish_eh_spec_block): New.
114 (do_allocate_exception, do_free_exception): New.
115 (expand_throw): Merge into ...
116 (build_throw): ... here. Update for abi.
117 * expr.c (cplus_expand_expr): No expand_internal_throw.
118 Handle MUST_NOT_THROW_EXPR.
119 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
120 * semantics.c (*) Update for except.h name changes.
121 (genrtl_try_block): No protect_with_terminate.
122 (genrtl_eh_spec_block): New.
123 (genrtl_handler): Don't emit the goto here.
124 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
125 (genrtl_finish_function): Don't expand_exception_blocks.
126 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
128 2001-03-28 Richard Henderson <rth@redhat.com>
130 * decl.c (struct named_label_list): Rename eh_region to
131 in_try_scope, add in_catch_scope.
132 (struct binding_level): Rename eh_region to is_try_scope,
134 (note_level_for_try): Rename from note_level_for_eh.
135 (note_level_for_catch): New.
136 (poplevel): Copy both is_try_scope and is_catch_scope to
137 the named_label_list struct.
138 (check_previous_goto_1): Don't check for catch block via
139 DECL_ARTIFICIAL; use in_try_scope instead.
140 (check_goto): Likewise.
141 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
142 * except.c (expand_start_catch_block): Call note_level_for_catch.
143 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
145 2001-03-27 Richard Henderson <rth@redhat.com>
147 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
148 exceptions_via_longjmp.
150 2001-03-27 Phil Edwards <pme@sources.redhat.com>
152 * pt.c (check_default_tmpl_args): Make error messages clearer.
154 2001-03-26 Phil Edwards <pme@sources.redhat.com>
156 * error.c: Also undefine 'A' macro used for cp_printers definition.
158 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
160 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
162 2001-03-26 Mike Yang <yang@research.att.com>
163 Mark Mitchell <mark@codesourcery.com>
165 * dump.c (dump_access): New function.
166 (cp_dump_tree): Use it. Dump basetype information for class
169 2001-03-26 Mark Mitchell <mark@codesourcery.com>
171 * Makefile.in (optimize.o): Depend on params.h.
172 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
173 (init_decl_processing): Set flag_no_inline when doing
175 * optimize.c: Include params.h.
176 (struct inline_data): Improve documentation of FNS. Add
177 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
178 (INSNS_PER_STMT): New macro.
179 (remap_block): Use CLONING_P.
180 (inlinable_function_p): Don't inline big functions.
181 (expand_call_inline): Keep track of how much inlining we've done.
182 (optimize_function): Set FIRST_INLINED_FN.
183 (maybe_clone_body): Set CLONING_P.
184 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
186 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
187 rest_of_compilation. Clear DECL_RTL for local variables
189 (clear_decl_rtl): New function.
191 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
194 * cp-tree.h (skip_type_access_control,
195 reset_type_access_control): Prototype.
196 * decl.c (grokdeclarator): Access of friends is not checked.
197 * parse.y (component_decl_list): Reset type access control.
198 * semantics.c (decl_type_access_control): Clear
199 current_type_lookups.
200 (save_type_access_control): Don't save if not deferring.
201 (skip_type_access_control, reset_type_access_control): New
203 (begin_class_definition): Do type access control for basetypes.
204 Start deferred access control.
205 (finish_class_definition): Resume immediate access control if
206 this is a local class.
208 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
210 * class.c (add_method): Use memcpy/memmove, not bcopy.
212 * decl.c (duplicate_decls): Likewise.
214 2001-03-23 Jakub Jelinek <jakub@redhat.com>
216 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
219 2001-03-23 Jakub Jelinek <jakub@redhat.com>
221 * decl.c (local_names): Define.
222 (push_local_name): New.
223 (grok_reference_init): Return init if initializing static reference
224 variable with non-constant instead of emitting it.
225 Move expand_static_init call to cp_finish_decl.
226 (layout_var_decl): Call push_local_name.
227 (maybe_commonize_var): Allow inlining functions even if they have
228 static local variables, use comdat_linkage for them if flag_weak.
229 (check_initializer): Call obscure_complex_init if
230 grok_reference_init returned non-zero.
231 (save_function_data): Clear x_local_names.
232 (pop_cp_function_context): Free x_local_names.
233 (mark_inlined_fns): Remove.
234 (mark_lang_function): Mark x_local_names.
235 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
236 Mark inlined_fns as tree, remove call to mark_inlined_fns.
237 * class.c (alter_access): Ensure DECL_ACCESS is never set if
238 DECL_DISCRIMINATOR_P.
239 * cp-tree.h (cp_language_function): Add x_local_names.
240 (lang_decl_flags): Add discriminator into u2.
241 (lang_decl_inlined_fns): Remove.
242 (lang_decl): inlined_fns is now a TREE_VEC.
243 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
244 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
245 TREE_VEC, not a custom structure.
246 (optimize_function): Likewise.
247 * mangle.c (discriminator_for_local_entity): Discriminate among
248 VAR_DECL local entities.
249 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
252 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
254 Add support for Java interface method calls.
255 * cp-tree.h (struct lang_type): Add java_interface flag.
256 (TYPE_JAVA_INTERFACE): New macro.
257 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
258 by setting TYPE_JAVA_INTERFACE.
259 * call.c (java_iface_lookup_fn): New static.
260 (build_over_call): If calling a method declared in a
261 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
262 expression which resolves the function address.
263 (build_java_interface_fn_ref): New function.
265 2001-03-22 Richard Henderson <rth@redhat.com>
267 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
268 * except.c: Don't include it.
270 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
271 based on an idea from Joe Buck <jbuck@synopsys.com>
273 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
275 (data_def, component_decl): Add reductions to bad_decl.
277 2001-03-22 Jakub Jelinek <jakub@redhat.com>
279 * method.c (do_build_assign_ref): Don't use build_modify_expr for
280 anonymous aggregates, since they don't have assignment operator
282 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
283 assignment operators for anonymous structure fields.
285 2001-03-21 Jason Merrill <jason@redhat.com>
287 * pt.c (instantiate_decl): Abort if we see a member constant
288 instantiation that doesn't already have its initializer.
289 Downgrade explicit instantiation without definition to pedwarn.
291 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
292 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
293 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
295 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
296 (pending_vtables): Remove.
297 * decl2.c (pending_vtables): Remove.
298 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
299 CLASSTYPE_VTABLE_NEEDS_WRITING.
300 (import_export_class): Likewise.
301 (init_decl2): Don't mark pending_vtables.
302 * lex.c (handle_pragma_vtable): Just sorry.
303 * pt.c (instantiate_class_template): Don't mess with
304 CLASSTYPE_VTABLE_NEEDS_WRITING.
305 (mark_class_instantiated): Likewise.
306 * ptree.c (print_lang_type): Don't print it.
307 * semantics.c (begin_class_definition): Don't set it.
309 * pt.c (template_tail): Replace with last_pending_template.
310 (maybe_templates, maybe_template_tail): Remove.
311 (add_pending_template): Adjust.
312 (instantiate_pending_templates): Adjust.
314 * cp-tree.h (struct saved_scope): Remove lang_stack field.
315 (current_lang_stack): Remove.
316 * decl.c (maybe_push_to_top_level): Don't initialize it.
317 (duplicate_decls): Use current_lang_depth.
318 (xref_basetypes): Likewise.
319 * class.c (current_lang_depth): New fn.
320 (push_lang_context): Use more varray functionality.
321 (pop_lang_context): Likewise.
323 * error.c (GLOBAL_THING): Always use '__'.
325 2001-03-21 Mark Mitchell <mark@codesourcery.com>
327 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
329 * mangle.c (mangle_decl_string): Mangle the names of overloaded
330 operators, even when they have `extern "C"' linkage.
332 2001-03-19 Mark Mitchell <mark@codesourcery.com>
334 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
335 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
336 where it's not necessary.
337 (add_method): Remove optimization involving comparison of
339 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
340 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
341 where it's not necessary.
342 (check_methods): Likewise.
343 (build_clone): Likewise.
344 (built_vtt): Likewise.
345 * cp-tree.h (DECL_NEEDED_P): Likewise.
346 * decl.c (pushtag): Likewise.
347 (duplicate_decls): Likewise.
348 (pushdecl): Likewise.
349 (builtin_function): Likewise.
350 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
351 (build_cp_library_fn): Likewise.
352 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
353 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
354 where it's not necessary.
355 (make_rtl_for_nonlocal_decl): Likewise.
356 (cp_finish_decl): Likewise.
357 (grokfndecl): Likewise.
358 (grokvardecl): Likewise.
359 (grokdeclarator): Likewise.
360 (start_function): Likewise.
361 (cp_missing_return_ok_p): Likewise.
362 * decl2.c (grokclassfn): Likewise.
363 (check_classfn): Likewise.
364 (finish_static_data_member_decl): Likewise.
365 (grokfield): Likewise.
366 * error.c (GLOBAL_IORD_P): Remove.
367 (dump_global_iord): Improve output.
368 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
369 * except.c (nothrow_libfn_p): Summarily reject any function not in
371 * init.c (build_java_class_ref): Don't explicitly set
372 DECL_ASSEMBLER_NAME after calling mangle_decl.
373 * mangle.c (mangle_decl_string): Handle extern "C" functions.
374 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
375 * method.c (set_mangled_name_for_decl): Don't explicitly set
376 DECL_ASSEMBLER_NAME after calling mangle_decl.
377 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
378 IDENTIFIER_GLOBAL_VALUE for the thunk.
379 * pt.c (set_mangled_name_for_template_decl): Remove.
380 (check_explicit_specialization): Don't use it.
381 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
382 (tsubst_friend_function): Likewise.
383 (tsubst_decl): Likewise.
384 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
385 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
386 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
387 where it's not necessary.
388 (tinfo_base_init): Likewise.
389 (create_real_tinfo_var): Likewise.
390 * search.c (looup_field_1): Likewise.
391 * semantics.c (finish_named_return_value): Likewise.
392 * tree.c (init_tree): Set lang_set_decl_assembler_name.
394 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
396 Correct semantics restrictions checking in throw-expression.
397 * except.c (is_admissible_throw_operand): New function.
398 (build_throw): Use it.
400 2001-03-14 Mark Mitchell <mark@codesourcery.com>
402 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
405 2001-03-14 Mark Mitchell <mark@codesourcery.com>
407 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
408 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
409 * decl.c (duplicate_decls): Likewise.
410 (builtin_function): Likewise.
411 (build_library_fn): Likewise.
412 (build_cp_library_fn): Likewise.
413 (check_initializer): Likewise.
414 (cp_finish_decl): Likewise.
415 * decl2.c (grokfield): Likewise.
416 (grok_function_init): Remove #if 0'd code.
417 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
418 * friend.c (do_friend): Likewise.
419 * init.c (get_temp_regvar): Likewise.
420 * method.c (make_thunk): Likewise.
421 * pt.c (tsubst_friend_function): Likewise.
422 (tsubst_decl): Likewise.
423 (regenerate_decl_from_template): Likewise.
424 * semantics.c (genrtl_named_return_value): Likewise.
425 (expand_body): Likewise.
426 (genrtl_finish_function): Likewise.
427 * tree.c (cp_tree_equal): Likewise.
429 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
431 * call.c (convert_like_real): Add extra semantics to INNER
432 parameter. Don't convert to temporary if a user conversion
433 gives us an lvalue that we're about to bind to a reference.
434 Set INNER to indicate pending reference binding on recursive
437 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
439 * cp/lex.c: Delete duplicate pending_lang_change.
441 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
443 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
445 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
446 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
448 2001-03-09 Zack Weinberg <zackw@stanford.edu>
450 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
452 2001-03-08 Stan Shebs <shebs@apple.com>
454 * cp-tree.h (set_identifier_local_value): Remove unused decl.
456 2001-03-06 Zack Weinberg <zackw@stanford.edu>
458 * spew.c: Remove references to CPP_OSTRING.
460 2001-03-06 Andrew Haley <aph@redhat.com>
462 * typeck.c (convert_arguments): Check that we have an fndecl.
464 2001-03-05 Andrew Haley <aph@redhat.com>
466 * typeck.c (convert_arguments): Don't do ellipsis conversion for
467 __built_in_constant_p.
469 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
471 * typeck.c (build_static_cast): Allow enum to enum conversions
474 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
476 * class.c (check_field_decls): Pointers to member do not a
477 non-pod struct make, as per DR 148.
479 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
481 * call.c (joust): cp_pedwarn when using gnu extension concerning
482 worst conversion sequences.
484 2001-03-01 Zack Weinberg <zackw@stanford.edu>
486 * decl.c: Replace all uses of 'boolean' with 'bool'.
488 2001-03-01 Zack Weinberg <zackw@stanford.edu>
490 * lang-specs.h: Add zero initializer for cpp_spec field to
491 all array elements that need one. Don't put an #ifdef inside
492 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
495 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
497 Implement using decls inside template functions.
498 * decl2.c (validate_nonmember_using_decl): Don't special case
499 fake_std_node in the global namespace. Don't reject early when
500 processing a template.
501 (do_local_using_decl): Add to statement tree. Don't do further
502 processing when building a template.
503 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
505 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
507 * decl2.c (do_nonmember_using_decl): Don't complain if we find
508 same function. Do complain about ambiguating extern "C"
511 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
513 Remove floating point and complex type template constant parms.
514 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
515 COMPLEX_TYPE extensions.
516 (invalid_nontype_parm_type_p): Likewise.
518 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
520 * except.c (call_eh_info): Revert "match_function"'s type.
522 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
524 Fix ctor vtable vcall offsets.
525 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
526 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
527 (get_matching_base): Remove.
528 (get_original_base): New function.
529 (build_vtbl_initializer): Initialize vid.rtti_binfo.
530 Use a virtual thunk for a ctor vtable with an index
531 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
532 primary base within a constructor vtable. Only set
533 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
534 when primary base has been lost.
535 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
537 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
539 * call.c (joust): Ensure more_specialized()'s argument length
540 parameter has correct value for constructors.
542 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
544 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
546 * decl.c (mark_inlined_fns): Prototype.
548 2001-02-22 Mark Mitchell <mark@codesourcery.com>
550 * spew.c (yylex): Correct handling of friends.
552 2001-02-22 Mark Mitchell <mark@codesourcery.com>
554 * mangle.c (write_encoding): Pass write_function_type the
555 FUNCTION_DECL for the function being encoded.
556 (write_function_type): Pass it along to write_bare_function_type.
557 (write_bare_function_type): Pass it along to write_method_parms.
558 (write_method_parms): Don't mangle the compiler-generated
559 parameters to a constructor or destructor.
561 2001-02-22 Andreas Jaeger <aj@suse.de>
563 * optimize.c: Include toplev.h for
564 note_deferral_of_defined_inline_function prototype.
566 2001-02-22 Jakub Jelinek <jakub@redhat.com>
568 * cp-tree.h (struct lang_decl_inlined_fns): New.
569 (struct lang_decls): Add inlined_fns.
570 (DECL_INLINED_FNS): New macro.
571 * optimize.c (struct inline_data): Add inlined_fns.
572 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
573 (inlinable_function_p): Likewise, fix typo in comment,
574 function is not inlinable if it already inlined function currently
576 (expand_call_inline): Add fn to inlined_fns if neccessary.
577 (optimize_function): Initialize inlined_fns.
578 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
579 * decl.c (mark_inlined_fns): New function.
580 (lang_mark_tree): Call it.
582 2001-02-21 Jason Merrill <jason@redhat.com>
584 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
585 (DECL_UNINLINABLE): Move to middle-end.
587 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
588 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
589 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
590 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
591 parms and outer BLOCK. note_deferral_of_defined_inline_function.
593 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
596 2001-02-19 Mark Mitchell <mark@codesourcery.com>
598 * decl2.c (set_decl_namespace): Allow explicit instantiations in
601 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
603 * optimize.c (expand_call_inline): Don't walk subtrees of type
606 2001-02-18 Mark Mitchell <mark@codesourcery.com>
608 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
611 2001-02-18 Jason Merrill <jason@redhat.com>
613 Do put the VTT parameter in DECL_ARGUMENTS.
614 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
615 (current_vtt_parm): New macro.
616 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
617 (DECL_HAS_VTT_PARM_P): New macro.
618 (DECL_VTT_PARM): Remove.
619 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
620 * decl.c (duplicate_decls): Only copy the operator code if
622 (start_function): Set current_vtt_parm.
623 (lang_mark_tree): Don't mark vtt_parm.
624 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
625 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
626 * class.c (build_clone): Maybe remove the VTT parm.
627 * optimize.c (maybe_clone_body): Set up the VTT parm.
628 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
629 * call.c (build_over_call): Just allow the VTT arg.
630 * method.c (make_thunk): Don't set DECL_VTT_PARM.
631 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
632 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
633 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
634 * error.c (dump_function_decl): Likewise.
635 * call.c (build_user_type_conversion_1, convert_like_real): Abort
636 if we try to call a constructor with in-charge or VTT parms.
637 * method.c (skip_artificial_parms_for): New fn.
638 * call.c (add_function_candidate, build_over_call): Call it.
639 * call.c (build_new_method_call): Use current_vtt_parm.
640 * init.c (expand_virtual_init): Likewise.
641 * class.c (same_signature_p): No longer static.
642 * cp-tree.h: Declare it.
643 * search.c (look_for_overrides_r): Use it.
645 2001-02-17 Mark Mitchell <mark@codesourcery.com>
647 * cp-tree.h (new_abi_rtti_p): Remove.
648 (name_mangling_version): Likewise.
649 (flag_do_squangling): Likewise.
650 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
651 * decl.c (grokfndecl): Likewise.
652 * decl2.c (name_mangling_version): Remove.
653 (flag_do_squangling): Likewise.
654 (lang_f_options): Remove `squangle'.
655 (unsupported_options): Add `squangle'.
656 (cxx_decode_option): Issue a warning about uses of
657 -fname-mangling-version.
658 (finish_file): Remove old ABI support.
659 * pt.c (check_explicit_specialization): Likewise.
660 (tsubst_decl): Likewise.
661 * rtti.c (init_rtti_processing): Likewise.
662 (build_headof): Likewise.
663 (get_tinfo_decl_dynamic): Likewise.
664 (tinfo_from_decl): Likewise.
665 (build_dynamic_cast_1): Likewise.
666 (synthesize_tinfo_var): Likewise.
667 * init.c (build_new): Allow enumeration types for the array-bounds
668 in a direct-new-declarator.
670 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
672 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
673 TREE_PROTECTED from the template being specialized.
675 2001-02-17 Jason Merrill <jason@redhat.com>
677 * decl2.c (build_artificial_parm): Set TREE_READONLY.
679 * decl.c (bad_specifiers): Allow throw specs on things with
680 pointer-to-function or -member-function type.
681 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
684 2001-02-17 Mark Mitchell <mark@codesourcery.com>
686 * call.c (check_dtor_name): Handle template names correctly.
688 2001-02-16 Jason Merrill <jason@redhat.com>
690 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
691 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
692 * optimize.c (maybe_clone_body): Don't substitute it.
693 * call.c (build_new_method_call): Check in_chrg instead.
694 * init.c (expand_virtual_init): Likewise.
696 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
698 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
699 class-type introduces at least a type-name.
701 2001-02-16 Jakub Jelinek <jakub@redhat.com>
703 * call.c (convert_like_real): Create a temporary for non-lvalue.
705 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
707 * cp-tree.h: Fix typos in comments.
709 2001-02-16 Jason Merrill <jason@redhat.com>
711 * optimize.c (remap_block): If we're compiling a clone, pass the
712 new block to insert_block.
714 2001-02-16 Mark Mitchell <mark@codesourcery.com>
716 * semantics.c (finish_asm_stmt): Robustify.
718 2001-02-15 Mark Mitchell <mark@codesourcery.com>
720 * pt.c (push_template_decl_real): Don't remangle the name of a
723 2001-02-15 Jim Meyering <meyering@lucent.com>
725 * Make-lang.in (c++.install-common): Depend on installdirs.
726 (c++.install-info): Likewise.
727 (c++.install-man): Likewise.
729 2001-02-15 Mark Mitchell <mark@codesourcery.com>
731 * typeck2.c (build_m_component_ref): Robustify.
733 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
735 * friend.c (do_friend): Don't take the nested [template] class
736 into account when deciding whether to warn about the friend
737 function not referring to a template function.
739 2001-02-14 Jakub Jelinek <jakub@redhat.com>
741 * typeck.c (build_unary_op): Clarify error message.
743 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
745 * parse.y (component_constructor_declarator): allow optional
746 parentheses around constructor class name.
748 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
750 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
752 * init.c (emit_base_init): Remove incorrect comment about
754 * method.c (make_thunk): Fix comment alignment.
756 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
758 Kill remnants of this is variable.
759 * cp-tree.h (flag_this_is_variable): Remove.
760 * decl2.c (flag_this_is_variable): Remove.
761 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
762 (build_vbase_path): The path is non-static, even in a cdtor.
763 (resolves_to_fixed_type_p): Add additional return value.
764 * search.c (init_vbase_pointers): Adjust.
765 * tree.c (lvalue_p_1): Adjust.
766 * typeck.c (mark_addressable): Adjust.
768 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
770 * pt.c (unify): Don't check cv quals of array types.
772 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
774 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
775 check whether we already have the type.
777 2001-02-13 Mark Mitchell <mark@codesourcery.com>
779 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
780 * call.c (build_op_delete_call): Simplify to remove duplicate
782 * class.c (clone_function_decl): Don't build the deleting variant
783 of a non-virtual destructor.
784 * decl.c (finish_destructor_body): Don't call delete if this is a
785 non-virtual destructor.
786 * init.c (build_delete): Explicitly call `operator delete' when
787 deleting an object with a non-virtual destructor.
789 2001-02-13 Jason Merrill <jason@redhat.com>
791 * lang-specs.h: Add more __EXCEPTIONS.
793 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
795 * typeck2.c (process_init_constructor): Check
796 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
798 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
800 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
801 Remove spurious information in comment. Allow further
802 adjustments of REFERENCE_TYPE args.
804 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
806 * errfn.c (cp_deprecated): Tweak diagnostic text.
807 * parse.y (new_initializer): Deprecate initializer lists
810 2001-02-12 Mark Mitchell <mark@codesourcery.com>
812 Remove old ABI support.
814 2001-02-11 Mark Mitchell <mark@codesourcery.com>
816 * decl2.c (flag_vtable_thunks): Always set it to 1.
817 (flag_new_abi): Likewise.
818 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
820 * Makefile.in (g++spec.o): Fix typo.
822 2001-02-09 Jason Merrill <jason@redhat.com>
824 * lang-specs.h: Restore definition of __EXCEPTIONS.
826 2001-02-08 Jason Merrill <jason@redhat.com>
828 * search.c (shared_member_p): New function.
829 (lookup_field_r): Use it.
830 * cp-tree.h (SHARED_MEMBER_P): Remove.
832 * method.c (process_overload_item): Handle template-dependent array
834 * pt.c (type_unification_real): If we end up with undeduced nontype
837 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
840 * typeck2.c (friendly_abort): Don't say anything if we have
841 earlier errors or sorries.
843 * decl.c (check_tag_decl): Notice attempts to redefine bool and
844 wchar_t. Ignore if in_system_header.
846 * decl.c (maybe_push_cleanup_level): New fn...
847 (start_decl_1): ...split out from here.
848 * cvt.c (build_up_reference): Use it.
849 * cp-tree.h: Declare it.
851 2001-02-07 Mark Mitchell <mark@codesourcery.com>
853 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
856 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
858 * pt.c (lookup_template_class): Make sure it's a primary
859 template or template_template_parm when called from the parser.
860 (instantiate_template_class): Add assertion.
862 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
864 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
865 from error_mark_node.
867 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
869 Fix specification and implementation bugs in V3 ABI
870 construction vtables.
871 * cp-tree.h (flag_dump_class_layout): New flag.
872 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
873 (BINFO_LOST_PRIMARY_P): New flag.
874 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
875 (BINFO_PRIMARY_MARKED_P): Rename to ...
876 (BINFO_PRIMARY_P): ... here.
877 (binfo_via_virtual): New prototype.
878 * decl2.c (flag_dump_class_layout): New flag.
879 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
880 use `=' as a file name separator.
881 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
883 (build_vtbl_address): If this is a virtual primary base, then
884 get the vtbl of what it is ultimately primary for.
885 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
887 (dfs_skip_nonprimary_vbases_markedp): Likewise.
888 (get_shared_vbase_if_not_primary): Likewise.
889 (dfs_get_pure_virtuals): Likewise.
890 (expand_upcast_fixups): Likewise.
891 (fixup_virtual_upcast_offsets): Likewise.
892 (dfs_find_vbase_instance): Likewise.
893 (find_vbase_instance): Likewise.
894 (binfo_from_vbase): Adjust comment to reflect reality.
895 (binfo_via_virtual): New function.
896 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
897 for binfo walking during VTT construction.
898 (dfs_mark_primary_bases): Remove.
899 (force_canonical_binfo_r): New function.
900 (force_canonical_binfo): New function.
901 (mark_primary_virtual_base): New function.
902 (mark_primary_bases): Walk in inheritance graph order, use
903 mark_primary_virtual_base.
904 (determine_primary_base): Use some more intermediate variables.
905 (dfs_find_final_overrider): Don't check for overriding along a
907 (dfs_modify_vtables): Walk into primary virtual bases too.
908 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
909 (build_base_fields): Likewise.
910 (dfs_set_offset_for_unshared_vbases): Likewise.
911 (layout_virtual_bases): Likewise.
912 (end_of_class): Likewise.
913 (finish_struct_1): Call dump_class_hierarchy, if requested.
914 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
915 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
916 (dump_class_hierarchy): Add file parameter. Append to file, if
918 (finish_vtbls): Adjust accumulate_vtbl_inits call.
919 Use canonical base for virtual bases.
920 (build_vtt): Add more comments. Adjust build_vtt_inits call.
921 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
922 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
923 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
925 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
926 from DATA. We want virtual primary bases and all bases via virtual.
927 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
928 virtual base when not a construction vtable.
929 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
930 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
931 Use canonical bases when processing virtual bases.
932 (accumulate_vtbl_inits): We're interested in any base via a
934 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
935 within a construction vtable, determine what is being overridden.
936 (build_vtbl_initializer): Add more comments
937 (add_vcall_offset_vtbl_entries_1): Adjust comment.
938 (build_rtti_vtbl_entries): Check if the base has lost its
941 2001-02-05 Mark Mitchell <mark@codesourcery.com>
943 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
945 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
947 * decl.c (pushdecl): Call abort instead of fatal.
948 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
949 * init.c (build_new_1): Likewise.
950 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
951 * decl.c (build_typename_type): hash_table_init now returns void.
952 decl.c (init_decl_processing): Make an error non-fatal.
954 2001-02-04 Mark Mitchell <mark@codesourcery.com>
956 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
958 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
959 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
960 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
961 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
962 * decl.c (maybe_commonize_var): Use the new name-mangling where
964 * decl2.c (comdat_linkage): Enhance comments. Make all
965 compiler-generated things static, if COMDAT is not available.
966 (get_tinfo_decl): Do not make typeinfo objects that belong in the
968 (tinfo_base_init): Use the correct mangled name for typeinfo
969 strings, and push them into the global scope.
970 (typeinfo_in_lib_p): New function.
971 (synthesize_tinfo_var): Use it.
972 (create_real_tinfo_var): Likewise.
974 2001-02-03 Jakub Jelinek <jakub@redhat.com>
976 * decl.c (push_class_binding): Use context_for_name_lookup instead
978 * search.c (context_for_name_lookup): Remove static. Check for NULL
980 * cp-tree.h (context_for_name_lookup): Add prototype.
982 2001-02-02 Jakub Jelinek <jakub@redhat.com>
984 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
985 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
987 * call.c (convert_class_to_reference, build_user_type_conversion_1,
988 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
990 2001-02-02 Mark Mitchell <mark@codesourcery.com>
992 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
993 of macros used when compiling g++spec.c.
994 * g++spec.c (lang_specific_driver): Link with the shared
997 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
999 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
1000 make_reference_declarator, make_call_declarator), method.c
1001 (implicitly_declare_fn), parse.y (namespace_using_decl,
1002 notype_unqualified_id, expr_or_declarator, new_type_id,
1003 after_type_declarator, direct_after_type_declarator,
1004 notype_declarator, complex_notype_declarator,
1005 complex_direct_notype_declarator, qualified_id,
1006 notype_qualified_id, overqualified_id, direct_new_declarator,
1007 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
1008 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
1009 instead of build_parse_node.
1011 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1013 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
1014 (minus_one_node): Moved to top level gcc directory. Renamed
1015 to integer_minus_one_node.
1017 * init.c (init_init_processing): Don't set minus_one_node.
1018 (build_vec_init): Use integer_minus_one_node.
1020 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1022 2001-01-28 Jakub Jelinek <jakub@redhat.com>
1024 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
1025 identical and they would be replaced with constant, remove
1026 MODIFY_EXPR from the tree.
1028 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1030 * Make-lang.in: Remove all dependencies on defaults.h.
1031 * call.c: Don't include defaults.h.
1033 * decl2.c: Likewise.
1034 * except.c: Likewise.
1038 * typeck.c: Likewise.
1040 2001-01-25 Jakub Jelinek <jakub@redhat.com>
1042 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
1043 operators even in "C" linkage.
1044 * method.c (set_mangled_name_for_decl): Likewise.
1045 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
1046 overloaded operators in "C" linkage.
1048 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
1050 * pt.c (tsubst_decl): Remove IN_DECL parameter.
1051 (tsubst_arg_types): Check parameter is not void.
1052 (tsubst): Adjust tsubst_decl call.
1054 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
1056 * call.c (add_builtin_candidate): Quote std properly, from
1059 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1061 * pt.c (check_explicit_specialization): Clone constructors and
1064 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
1066 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
1067 indicates anything special about template depth. Make sure we
1068 only count the user visible template classes.
1070 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
1072 * call.c (build_conv): Typo in comment.
1073 (add_builtin_candidate): Add more explanation.
1074 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
1075 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
1076 when we have enumeral types.
1077 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
1078 candidates for relops and eqops.
1079 (joust): Simplify control flow. Allow a non-template user
1080 function to hide a builtin.
1082 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
1084 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
1085 (more_specialized): Add deduction parameter.
1086 * call.c (joust): Adjust more_specialized call.
1087 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
1088 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
1089 (get_bindings_order): Remove.
1090 (get_bindings_real): Add DEDUCE parameter.
1091 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
1092 REFERENCE_TYPE jig for DEDUCE_ORDER.
1093 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
1094 maybe_adjust_types_for_deduction.
1095 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
1097 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
1098 (check_cv_quals_for_unify): Use new unify qualifier flags.
1099 (unify): Clear new unify qualifier flags.
1100 (get_bindings_real): Add DEDUCE parameter.
1101 (get_bindings): Adjust call to get_bindings_real.
1102 (get_bindings_overload): Likewise.
1103 (most_specialized_instantiation): Adjust call to
1106 2001-01-19 Jason Merrill <jason@redhat.com>
1108 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
1110 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
1113 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
1115 * decl2.c (arg_assoc_class): Fix double iteration logic.
1117 2001-01-19 Jason Merrill <jason@redhat.com>
1119 * init.c (build_delete): Always call convert_force to strip cv-quals.
1121 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
1122 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
1123 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
1125 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1127 * search.c (get_vbase_1): Count only virtual bases.
1129 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1131 * class.c (duplicate_tag_error): Robustify flag clearing.
1133 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1135 * cp-tree.h (lookup_template_class): Add complain parm.
1136 * decl.c (lookup_namespace_name): Adjust call to
1137 lookup_template_class.
1138 (make_typename_type): Likewise.
1139 * semantics.c (finish_template_type): Likewise.
1140 * pt.c (lookup_template_class): Add complain parm. Adjust.
1141 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
1144 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1146 * pt.c (copy_default_args_to_explicit_spec): Preserve
1147 object's CV quals. Reorganize.
1149 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1151 * typeck.c (build_modify_expr): Say `initialization' for
1153 * init.c (build_default_init): Convert to enumeral type, if
1156 2001-01-18 Jakub Jelinek <jakub@redhat.com>
1158 * parse.y (nomods_initdcl0): Properly set things up for
1161 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1163 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
1164 (type_unification_real): Set it.
1167 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1169 * decl.c (finish_destructor_body): Convert to vbase pointer here.
1171 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1173 * semantics.c (begin_class_definition): Check we're not inside a
1176 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1178 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
1181 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1183 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
1184 * call.c (build_over_call): Add comment.
1186 2001-01-16 Daniel Berlin <dberlin@redhat.com>
1188 * cvt.c (ocp_convert): Handle vector type conversion
1189 * typeck2.c (digest_init): Handle vector type initializations
1191 2001-01-16 Phil Edwards <pme@sources.redhat.com>
1193 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
1196 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
1198 * pt.c (check_nontype_parm): Rename to ...
1199 (invalid_nontype_parm_type_p): ... here.
1200 (process_template_parm): Adjust.
1201 (convert_template_argument): Adjust.
1203 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
1205 * pt.c (check_nontype_parm): New function.
1206 (process_template_parm): Use it.
1207 (convert_template_argument): Use it.
1208 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
1211 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
1213 * tree.c: Add defaults.h
1214 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
1215 * Make-lang.in (cp/tree.o): Add defaults.h.
1217 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1219 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
1221 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1223 * g++.1: Change to be ".so man1/gcc.1".
1225 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1227 * Make-lang.in (c++.info, c++.install-info): Build and install g++
1229 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
1230 ($(srcdir)/cp/g++int.info): New target.
1231 * gxxint.texi: Add info directory entry. Use @@ in email address.
1232 * .cvsignore: Update.
1234 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
1236 * typeck.c (build_c_cast): Do template processing earlier.
1237 Always pedwarn on array casts.
1239 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
1241 * friend.c (make_friend_class): Make sure a templated class is
1242 actually a template.
1244 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1246 * decl2.c (get_guard): Set linkage from guarded decl.
1248 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1250 * call.c (convert_default_arg): Check for unprocessed
1252 * cp-tree.h (replace_defarg): Move to spew.c.
1253 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
1254 spew.c, which is where they really are.
1255 (done_pending_defargs): Declare.
1256 (unprocessed_defarg_fn): Declare.
1257 * decl.c (replace_defarg): Move to spew.c
1258 * parse.y (structsp): Call done_pending_defargs.
1259 * spew.c (defarg_fns): Rearrange list structure.
1260 (defarg_fnsdone): New static variable.
1261 (defarg_depfns): New static variable.
1262 (init_spew): Adjust.
1263 (add_defarg_fn): Store the type in TREE_TYPE.
1264 (do_pending_defargs): Detect and deal with ordering constraints
1266 (done_pending_defargs): New function.
1267 (unprocessed_defarg_fn): New function.
1268 (replace_defarg): Moved from decl.c. Robustify. Don't save
1269 if circularity detected.
1271 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1273 * pt.c (unify): Check array has a domain, before checking
1274 whether it is variable sized.
1276 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1278 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
1279 parameters with pointers to arrays of unknown bound.
1281 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1283 * parse.y (template_parm_header, template_spec_header): New
1284 reductions. Split out from ...
1285 (template_header): ... here. Use them.
1286 (template_template_parm): Use template_parm_header.
1287 * semantics.c (finish_template_template_parm): Add assert.
1289 2001-01-10 Mark Mitchell <mark@codesourcery.com>
1291 * mangle.c (write_builtin_type): Fix thinko.
1293 * pt.c (copy_default_args_to_explicit_spec_1): New function.
1294 (copy_default_args_to_explicit_spec): Likewise.
1295 (check_explicit_specialization): Use it.
1297 * class.c (finish_struct_1): Remove last argument in call to
1298 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
1299 * decl.c (builtin_function): Likewise.
1300 (build_cp_library_fn): Likewise.
1301 (check_initializer): Likewise.
1302 (make_rtl_for_nonlocal_decl): Likewise.
1303 (cp_finish_decl): Likewise.
1304 (start_function): Likewise.
1305 * decl2.c (finish_anon_union): Likewise.
1306 * friend.c (do_friend): Likewise.
1307 * init.c (build_java_class_ref): Likewise.
1308 * method.c (make_thunk): Likewise.
1309 * pt.c (tsubst_friend_function): Likewise.
1310 * semantics.c (expand_body): Likewise.
1312 2001-01-10 Mark Mitchell <mark@codesourcery.com>
1314 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
1315 looking at DECL_CLONED_FUNCTION for non-functions.
1317 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1319 * error.c (dump_template_parameter): Use parm to determine how
1320 to print default value.
1322 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1324 * class.c (duplicate_tag_error): Clear more flags.
1326 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1328 * call.c (build_new_method_call): Use binfo_for_vbase.
1330 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
1332 * cp-tree.h (flag_cond_mismatch): Don't declare.
1333 * decl2.c (flag_cond_mismatch): Don't define.
1334 (lang_f_options): Remove cond-mismatch.
1335 (unsupported_options): Add cond-mismatch.
1337 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
1339 * class.c (handle_using_decl): Reject using of constructor name
1340 of sourcing class. Allow injecting of a method with same name as
1341 nested class. Fixup error messages.
1343 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
1345 * decl2.c (lang_decode_option): Handle -Wformat=2.
1347 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1349 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
1350 initialized_in_class.
1351 (DECL_DEFINED_IN_CLASS_P): Rename to ...
1352 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
1353 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
1354 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
1355 * pt.c (check_default_tmpl_args): Adjust for
1356 DECL_INITIALIZED_IN_CLASS_P.
1357 (instantiate_class_template): Likewise.
1358 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
1360 * class.c (finish_struct): Constify saved_filename.
1362 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1364 * class.c (duplicate_tag_error): Adjust diagnostic.
1365 (finish_struct): Locally set location to start of struct.
1366 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
1368 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1370 * decl.c (struct binding_level): Adjust class_shadowed comments
1372 (push_class_level_binding): Ajust comments to reflect reality.
1373 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
1374 Don't set TREE_VALUE on the class_shadowed list.
1376 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
1378 * decl2.c (acceptable_java_type): Allow references too.
1379 * init.c (build_java_class_ref): When using the new ABI, search
1380 `class$' and have it mangled with `mangle_decl.'
1381 * mangle.c (write_java_integer_type_codes): New function.
1382 (write_builtin_type): Detect and mangle Java integer and real
1385 2001-01-07 Mark Mitchell <mark@codesourcery.com>
1387 * decl2.c (grokfield): Don't accept `asm' specifiers for
1388 non-static data members.
1390 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1392 * expr.c (cplus_expand_expr): Don't reset `target'.
1394 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
1396 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
1398 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
1400 * parse.y (template_datadef): Check for error_mark_node.
1402 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
1404 * cp-tree.def (DEFAULT_ARG): Make `x' class.
1406 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
1408 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
1409 (record_builtin_type): Make non-static.
1410 (flag_short_double): Don't declare.
1411 (init_decl_processing): Remove the creation of many tree nodes now
1412 in c_common_nodes_and_builtins.
1413 (build_void_list_node): New function.
1414 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
1415 * cp-tree.h (flag_short_wchar): Don't declare.
1417 2001-01-04 Mark Mitchell <mark@codesourcery.com>
1419 * call.c (build_conv): Don't use build1 for USER_CONV.
1420 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
1422 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
1424 * lex.c (lang_init): Call c_common_lang_init.
1426 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
1428 * search.c (lookup_fnfields_here): Remove.
1429 (look_for_overrides_r): Use lookup_fnfields_1.
1430 Ignore functions from using declarations.
1432 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
1434 Implement exceptions specifiers for implicit member functions.
1435 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
1436 * method.c (synthesize_exception_spec): New function.
1437 (locate_dtor, locate_ctor, locate_copy): New functions.
1438 (implicitly_declare_fn): Generate the exception spec too.
1439 * search.c (check_final_overrider): Check artificial functions
1441 * typeck2.c (merge_exception_specifiers): New function.
1443 2001-01-03 Jason Merrill <jason@redhat.com>
1445 * init.c (build_default_init): New fn.
1446 (perform_member_init): Split out from here.
1447 (build_new_1): Use it. Simplify initialization logic.
1448 (build_vec_init): Take an array, rather than a pointer and maxindex.
1449 Speed up simple initializations. Don't clean up if we're assigning.
1450 * cp-tree.h: Adjust.
1451 * decl2.c (do_static_initialization): Remove TREE_VEC case.
1452 * parse.y (new_initializer): Return void_zero_node for ().
1453 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
1454 * typeck2.c (digest_init): Only complain about user-written
1457 2000-12-22 Mike Stump <mrs@wrs.com>
1459 * decl2.c: (max_tinst_depth): Increase to 50.
1461 2001-01-02 Mark Mitchell <mark@codesourcery.com>
1463 * class.c (invalidate_class_lookup_cache): Zero the
1464 previous_class_values.
1465 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
1467 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
1468 * decl.c (free_bindings): New variable.
1469 (push_binding): Don't create a new binding if we have one on the
1471 (pop_binding): Put old bindings on the free list.
1472 (init_decl_processing): Use size_int, not build_int_2.
1473 Register free_bindings as a GC root.
1474 (cp_make_fname_decl): Use size_int, not build_int_2.
1475 (push_inline_template_parms_recursive): Likewise.
1476 (end_template_parm_list): Likewise.
1477 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
1478 (tsubst_template_parms): Use size_int, not build_int_2.
1480 * rtti.c (get_vmi_pseudo_type_info): Likewise.
1482 2001-01-02 Richard Henderson <rth@redhat.com>
1484 * parse.y (asm): Set ASM_INPUT_P.
1486 2001-01-02 Jason Merrill <jason@redhat.com>
1488 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
1491 * typeck.c (cp_truthvalue_conversion): New fn.
1492 * cvt.c (ocp_convert): Use it.
1494 * cp-tree.h: Lose c-common.c decls.
1496 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
1497 * cvt.c (convert_to_void): Use type_unknown_p.
1499 * typeck.c (strip_all_pointer_quals): Also strip quals from
1500 pointer-to-member types.
1502 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
1505 * call.c (build_new_method_call): Do evaluate the object parameter
1506 when accessing a static member.
1507 * typeck.c (build_component_ref): Likewise.
1509 2001-01-02 Andreas Jaeger <aj@suse.de>
1511 * decl.c (cp_missing_noreturn_ok_p): New.
1512 (init_decl_processing): Set lang_missing_noreturn_ok_p.
1514 2000-12-29 Jakub Jelinek <jakub@redhat.com>
1516 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
1518 2000-12-29 Mark Mitchell <mark@codesourcery.com>
1520 * class.c (pushclass): Remove #if 0'd code.
1521 * cp-tree.h (overload_template_name): Remove.
1522 * decl.c (store_bindings): Simplify.
1523 (pop_from_top_level): Likewise.
1524 * pt.c (overload_template_name): Remove.
1525 (instantiate_decl): Don't call push_to_top_level if it's not
1528 2000-12-28 Mark Mitchell <mark@codesourcery.com>
1530 * pt.c (register_local_specialization): Don't return a value.
1531 (lookup_template_class): Use move-to-front heuristic when looking
1532 up template instantiations.
1533 (instantiate_decl): Only push_to_top_level when we're actually
1534 going to instantiate the template.
1536 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
1538 * search.c (binfo_for_vtable): Return least derived class, not
1539 most. Handle secondary vtables.
1541 2000-12-22 Jason Merrill <jason@redhat.com>
1543 * pt.c (more_specialized): Don't optimize len==0.
1544 (fn_type_unification): If we're adding the return type, increase len.
1546 * typeck.c (build_binary_op): Fix pmf comparison logic.
1548 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
1549 DECL_STATIC_FUNCTION_P.
1551 * semantics.c (genrtl_finish_function): Don't try to jump to
1552 return_label unless it exists.
1554 In partial ordering for a call, ignore parms for which we don't have
1556 * call.c (joust): Pass len to more_specialized.
1557 (add_template_candidate_real): Strip 'this', pass len.
1558 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
1559 (get_bindings_order): New fn. Pass len down.
1560 (get_bindings_real): Strip 'this', pass len.
1561 (fn_type_unification): Likewise.
1562 (type_unification_real): Succeed after checking 'len' args.
1563 (most_specialized_instantiation): Lose explicit_args parm.
1564 * class.c (resolve_address_of_overloaded_function): Strip 'this',
1567 2000-12-21 Jason Merrill <jason@redhat.com>
1569 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
1570 DECL_TEMPLATE_RESULT.
1572 * search.c (lookup_field_r): Call lookup_fnfields_1, not
1573 lookup_fnfields_here.
1575 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
1577 * call.c (build_object_call): Also allow conversions that return
1578 reference to pointer to function.
1579 (add_conv_candidate): Handle totype being ref to ptr to fn.
1580 (build_field_call): Also allow members of type reference to function.
1581 Lose support for calling pointer to METHOD_TYPE fields.
1583 * error.c (dump_expr): Handle *_CAST_EXPR.
1585 * typeck2.c (build_scoped_ref): Always convert to the naming class.
1587 * tree.c (break_out_cleanups): Lose.
1588 * cp-tree.h: Remove prototype.
1589 * typeck.c (build_component_ref): Don't break_out_cleanups.
1590 (build_compound_expr): Likewise.
1591 * semantics.c (finish_expr_stmt): Likewise.
1593 2000-12-20 Richard Henderson <rth@redhat.com>
1595 * cp-tree.h: Update declarations.
1596 * decl.c (finish_case_label): Return the new stmt node.
1597 * semantics.c (finish_goto_stmt): Likewise.
1598 (finish_expr_stmt, finish_return_stmt): Likewise.
1599 (finish_break_stmt, finish_continue_stmt): Likewise.
1600 (finish_asm_stmt): Likewise.
1601 * parse.y (already_scoped_stmt): Set STMT_LINENO.
1602 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
1603 (simple_if, simple_stmt): Return the new stmt node.
1606 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
1608 * cp-tree.h: Don't declare warn_long_long.
1610 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1612 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
1615 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1617 * pt.c (unify): Handle when both ARG and PARM are
1618 BOUND_TEMPLATE_TEMPLATE_PARM.
1620 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1622 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
1623 DECL_TEMPLATE_PARM_P.
1625 2000-12-15 Jason Merrill <jason@redhat.com>
1627 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
1629 * init.c (build_new_1): Don't strip quals from type.
1631 * decl.c (pushdecl): Don't check for linkage on a non-decl.
1633 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
1635 * call.c (build_new_function_call): Lose space before paren in
1637 (build_new_method_call): Likewise.
1639 * typeck2.c (build_m_component_ref): Propagate quals from datum.
1641 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1643 * pt.c (check_explicit_specialization): Propagate default
1644 function arguments to explicit specializations.
1646 2000-12-13 DJ Delorie <dj@redhat.com>
1648 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
1651 2000-12-08 Jason Merrill <jason@redhat.com>
1653 * error.c (dump_function_name): Don't let the user see __comp_ctor.
1655 Clean up copy-initialization in overloading code.
1656 * call.c (build_user_type_conversion_1): Die if we are asked to
1657 convert to the same or a base type.
1658 (implicit_conversion): Avoid doing so. Lose reference binding code.
1659 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
1660 direct-initialization. Also do direct-init part of copy-init.
1661 (build_user_type_conversion): Don't provide context to convert_like.
1662 * cvt.c (ocp_convert): build_user_type_conversion will now provide
1663 the constructor call for copy-init.
1665 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
1666 instantiation of a member template.
1667 (do_decl_instantiation): Not here.
1669 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
1671 * class.c (check_field_decls): Don't special case anonymous
1672 fields in error messages.
1673 (note_name_declared_in_class): Use %D on diagnostic.
1675 * tree.c (pod_type_p): Use strip_array_types.
1676 (cp_valid_lang_attribute): Likewise.
1677 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
1678 multiple evaluations.
1679 (cp_has_mutable_p): Use strip_array_types.
1681 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
1683 * cp-tree.h (sufficient_parms_p): Declare new function.
1684 * call.c (sufficient_parms_p): New function, broken out of ...
1685 (add_function_candidate): ... here. Use it.
1686 (add_conv_candidate): Use it.
1687 * decl.c (grok_ctor_properties): Use it.
1689 2000-12-07 Jakub Jelinek <jakub@redhat.com>
1691 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
1693 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
1695 * decl2.c (lang_decode_option): Handle -Wformat-security.
1697 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1699 * pt.c (verify_class_unification): New function.
1700 (get_class_bindings): Use it.
1701 (try_class_unification): Tidy.
1702 (unify): Handle when argument of a template-id is not
1703 template parameter dependent.
1704 (template_args_equal): Handle when TREE_CODE's do not match.
1706 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
1708 * lang-specs.h (c++): When invoking the stand-alone preprocessor
1709 for -save-temps, pass all relevant -Defines to it, and then don't
1710 pass them to cc1plus.
1712 2000-12-05 Will Cohen <wcohen@redhat.com>
1714 * decl.c (finish_case_label): Cleared
1715 more_cleanups_ok in surrounding function scopes.
1716 (define_label): Likewise.
1718 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
1720 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
1721 (get_matching_virtual): Remove.
1722 (look_for_overrides): Declare new function.
1723 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
1725 * class.c (check_for_override): Move base class iteration code
1726 to look_for_overrides.
1727 * search.c (next_baselink): Remove.
1728 (get_virtuals_named_this): Remove.
1729 (get_virtual_destructor): Remove.
1730 (tree_has_any_destructors_p): Remove.
1731 (struct gvnt_info): Remove.
1732 (check_final_overrider): Remove `virtual' from error messages.
1733 (get_matching_virtuals): Remove. Move functionality to ...
1734 (look_for_overrides): ... here, and ...
1735 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
1738 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
1740 * typeck.c (get_delta_difference): If via a virtual base,
1742 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
1745 2000-12-04 Richard Henderson <rth@redhat.com>
1747 * error.c (dump_tree): Use output_add_string not OB_PUTS.
1749 2000-12-04 Jason Merrill <jason@redhat.com>
1751 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
1752 (write_builtin_type): Pass intSI_type_node and the like through
1754 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
1755 Pass intSI_type_node and the like through type_for_mode.
1756 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
1757 * pt.c (tsubst, unify): Likewise.
1758 * tree.c (walk_tree): Likewise.
1759 * error.c (dump_type): Likewise.
1760 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
1762 * Make-lang.in: Tweak top comment for emacs.
1765 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
1767 * class.c (clone_function_decl): Robustify.
1769 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
1771 * decl.c (store_bindings): Only search in the non modified
1772 old_bindings for duplicates.
1774 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
1776 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
1779 * typeck.c (build_static_cast): Remove unused variable.
1781 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1783 * pt.c: Fix typo in comment.
1785 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
1787 * decl2.c (warn_format): Remove definition.
1788 (lang_decode_option): Handle -Wformat-nonliteral,
1789 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
1791 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
1793 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
1794 (init_decl_processing): Don't create string_type_node,
1795 const_string_type_node, wint_type_node, intmax_type_node,
1796 uintmax_type_node, default_function_type, ptrdiff_type_node and
1797 unsigned_ptrdiff_type_node. Adjust position of call to
1798 c_common_nodes_and_builtins.
1799 (identifier_global_value): New function.
1801 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
1803 * call.c (standard_conversion): Reject pointer to member
1804 conversions from ambiguous, inaccessible or virtual bases.
1805 * typeck.c (build_static_cast): Don't check pointers to members
1808 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
1810 * method.c (do_build_copy_constructor): Preserve cv
1811 qualifications when accessing source object members.
1812 (do_build_assign_ref): Likewise. Remove separate diagnostics for
1815 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
1817 * method.c (do_build_assign_ref): Construct appropriately
1818 CV-qualified base reference. Don't allow const casts in base
1821 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
1823 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
1824 incomplete return type.
1826 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
1828 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
1829 * semantics.c (finish_base_specifier): Accept a _TYPE not a
1832 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
1834 * spew.c (yyerror): Cope if yylval.ttype is NULL.
1836 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
1838 * decl.c (grokdeclarator): Diagnose undefined template contexts.
1840 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
1842 * decl.c (grokdeclarator): Do type access control on friend
1845 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
1847 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
1848 bison parser ickiness.
1849 * pt.c (tsubst_friend_function): Enter namespace scope when
1850 tsubsting the function name.
1851 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
1853 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
1855 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
1856 * cvt.c (cp_convert_to_pointer): Add force parameter.
1857 Allow conversions via virtual base if forced.
1858 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
1859 (ocp_convert): Likewise.
1860 * search.c (binfo_from_vbase): Return the virtual base's binfo.
1861 * typeck.c (get_delta_difference): Adjust handling of virtual
1864 2000-11-26 Mark Mitchell <mark@codesourcery.com>
1866 * tree.c (struct list_hash): Remove.
1867 (list_hash_table): Make it be an htab.
1868 (struct list_proxy): New type.
1869 (list_hash_eq): New function.
1870 (list_hash_pieces): Renamed from ...
1871 (list_hash): ... this.
1872 (list_hash_lookup): Remove.
1873 (list_hash_add): Remove.
1874 (hash_tree_cons): Use the generic hashtable.
1875 (mark_list_hash): Remove.
1876 (init_tree): Create the hashtable.
1878 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
1880 * method.c (build_mangled_C9x_name): Rename to
1881 build_mangled_C99_name. Change C9X references in comments to
1884 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
1886 * parse.y (unary_expr): Move VA_ARG from here ...
1887 (primary): ... to here.
1889 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
1891 * semantics.c (finish_id_expr): If type is error_mark, return
1894 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
1896 * pt.c (lookup_template_class): Simplify loop exit constructs.
1897 Cope when there is no partial instantiation of a template
1900 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
1902 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
1904 2000-11-22 Mark Mitchell <mark@codesourcery.com>
1906 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
1909 * pt.c (do_decl_instantiate): Explicitly clone constructors and
1910 destructors that haven't already been cloned.
1912 2000-11-20 Richard Henderson <rth@redhat.com>
1914 * parse.y (yyparse_1): Rename the parser entry point.
1916 2000-11-20 Alex Samuel <samuel@codesourcery.com>
1918 * mangle.c (write_name): Use <unscoped-name> for names directly in
1920 (write_unscoped_name): Accept names directly in function scope.
1922 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
1924 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
1925 * parse.y (extdef): Add EXPORT reduction.
1926 * spew.c (yylex): Don't skip export here.
1928 2000-11-19 Mark Mitchell <mark@codesourcery.com>
1930 * decl.c (init_decl_processing): Correct name of pure virtual
1931 function under the new ABI.
1932 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
1933 (throw_bad_typeid): Likewise for bad typeid function.
1935 2000-11-18 Mark Mitchell <mark@codesourcery.com>
1937 * decl.c (grokparms): Don't even function types of `void' type,
1939 * mangle.c (write_type): Don't crash when confronted with the
1942 * decl.c (grokparms): Don't create parameters of `void' type.
1944 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
1946 * lex.c (mark_impl_file_chain): Delete.
1947 (init_parse): Remove call to ggc_add_string_root. No need to
1948 ggc_strdup a string constant. Do not add impl_file_chain to GC
1950 (handle_pragma_implementation): No need to ggc_strdup main_filename.
1952 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
1954 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
1956 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
1958 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
1959 * decl.c (grokdeclarator): Don't reject void parms here.
1960 (require_complete_types_for_parms): Simplify, use
1961 complete_type_or_else.
1962 (grokparms): Remove bitrot. Remove funcdef parm.
1963 Deal with ellipsis parm lists here.
1964 * semantics.c (finish_parmlist): Don't append void_list_node
1965 here. Set PARMLIST_ELLIPSIS_P.
1967 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
1969 * typeck2.c (incomplete_type_error): Reorganise to avoid
1970 excessive diagnostics.
1972 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
1974 * lex.c (struct impl_files, internal_filename): Constify a char *.
1976 2000-11-16 Mark Mitchell <mark@codesourcery.com>
1978 * mangle.c (write_special_name_constructor): Don't generate
1979 assembler junk when confronted with an old-style constructor.
1980 (write_special_name_destructor): Likewise.
1981 (mangle_decl_string): Do it here instead.
1983 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
1985 * call.c (op_error): Make error messages clearer.
1987 2000-11-15 Mark Mitchell <mark@codesourcery.com>
1989 * decl.c (wrapup_globals_for_namespace): Don't mark things
1990 TREE_ASM_WRITTEN when they're not.
1992 2000-11-15 Jason Merrill <jason@redhat.com>
1994 * typeck2.c (friendly_abort): Uncount the error before handing
1997 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
1999 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
2001 2000-11-14 Mark Mitchell <mark@codesourcery.com>
2003 * class.c (build_vtbl_initializer): Fix typo in comment.
2004 * typeck.c (expr_sizeof): Don't crash on errors.
2006 2000-11-14 Jim Wilson <wilson@redhat.com>
2008 * lang-specs.h: Add %2 after %(cc1_options).
2010 2000-11-14 Richard Henderson <rth@redhat.com>
2012 * typeck.c (c_sizeof): Be strict about casting result value
2013 back to c_size_type_node.
2014 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
2016 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
2018 * typeck.c (build_unary_op): Use boolean_increment from
2019 c-common.c, moving the relevant code there.
2021 2000-11-11 Jason Merrill <jason@redhat.com>
2023 * typeck.c (mark_addressable): Don't call put_var_into_stack.
2025 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
2028 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2030 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
2031 * lex.c (copy_lang_decl): Likewise.
2033 2000-11-09 Mark Mitchell <mark@codesourcery.com>
2035 * dump.c (cp_dump_tree): Don't dump function bodies here.
2037 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2038 (dump.o): Update dependency list.
2039 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
2040 (flag_dump_translation_unit): Likewise.
2041 (CP_TYPE_QUALS): Adjust definition.
2042 (DECL_C_BIT_FIELD): Remove.
2043 (SET_DECL_C_BIT_FIELD): Likewise.
2044 (CLEAR_DECL_C_BIT_FIELD): Likewise.
2045 (add_maybe_template): Likewise.
2046 (strip_array_types): Likewise.
2047 (dump_node_to_file): Likewise.
2048 (cp_dump_tree): New function.
2049 * decl.c (init_decl_processing): Set lang_dump_tree.
2050 * decl2.c (flag_dump_translation_unit): Remove.
2051 * dump.c: Move most of it to ../c-dump.c.
2052 (cp_dump_tree): New function.
2053 * pt.c (add_maybe_template): Remove.
2054 * typeck.c (strip_array_types): Likewise.
2056 2000-11-07 Eric Christopher <echristo@redhat.com>
2058 * decl.c (init_decl_processing): Change definition of
2059 __wchar_t to wchar_t. Remove artificial declaration of
2061 * lex.c: Change instances of __wchar_t to wchar_t.
2063 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
2065 * lex.c (do_identifier): Don't lookup_name for operators.
2066 * parse.y (operator): Save looking_for_typename.
2067 (unoperator): Restore it.
2068 * spew.c (frob_opname): Use nth_token for lookahead.
2070 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
2072 * decl.c (grok_op_properties): Always use coerce_new_type and
2074 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
2075 exception specification. Tidy up.
2076 (coerce_delete_type): Preserve exception specification. Tidy up.
2078 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
2080 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
2081 (push_binding_level), error.c (cp_tree_printer), pt.c
2082 (process_partial_specialization, tsubst_template_arg_vector),
2083 search.c (lookup_member): Use memset () instead of bzero ().
2085 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
2087 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
2089 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
2091 * Make-lang.in (c++.distdir): Remove.
2093 2000-11-04 Mark Mitchell <mark@codesourcery.com>
2095 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
2096 declarations from different namespaces to be combined.
2098 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
2100 * decl.c: Include tm_p.h.
2102 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
2104 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
2106 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
2108 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
2109 (build_overload_value), repo.c (open_repo_file), xref.c
2110 (open_xref_file): Use strchr () and strrchr () instead of index ()
2113 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
2115 * call.c (build_over_call): Call fold on the CALL_EXPR.
2117 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
2119 * error.c (dump_template_decl): Separate template hearders with
2122 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
2124 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
2125 TS_* flags with corresponding TFF_*. Adjust prototypes of
2126 functions (which used to take a tree_string_flags) to take an int.
2128 * cp-tree.h (enum tree_string_flags): Remove
2129 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
2130 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
2131 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
2132 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
2133 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
2134 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
2135 (type_as_string, decl_as_string, expr_as_string,
2136 context_as_string): Adjust prototype.
2138 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
2139 instead of TS_PLAIN.
2141 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
2142 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
2145 2000-10-30 Mark Mitchell <mark@codesourcery.com>
2147 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
2148 (linkage_kind): New enumeration.
2149 (decl_linkage): New function.
2150 * decl2.c (comdat_linkage): Extend comment.
2151 * error.c (dump_function_decl): Print the arguments used to
2152 instantiate a template, even when not printing the type of the
2154 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
2155 not TREE_PUBLIC, to test for external linkage.
2156 * tree.c (decl_linkage): New function.
2158 2000-10-28 Mark Mitchell <mark@codesourcery.com>
2160 * pt.c (instantiate_decl): Always instantiate static data members
2161 initialized in-class.
2163 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
2165 * Make-lang.in: Move all build rules here from Makefile.in,
2166 adapt to new context. Wrap all rules that change the current
2167 directory in parentheses. Expunge all references to $(P).
2168 When one command depends on another and they're run all at
2169 once, use && to separate them, not ;. Add OUTPUT_OPTION to
2170 all object-file generation rules. Delete obsolete variables.
2172 * Makefile.in: Delete.
2173 * config-lang.in: Delete outputs= line.
2175 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
2177 * error.c (dump_function_decl): Print no space between
2178 `ptr-operator' the `type-specifier' of the return type.
2179 (dump_type_prefix): Make sure we put space at the appropriate
2182 2000-10-23 Jason Merrill <jason@redhat.com>
2184 * call.c (equal_functions): Also call decls_match for extern "C" fns.
2186 2000-10-22 Jason Merrill <jason@redhat.com>
2188 * call.c (build_conditional_expr): Use ocp_convert to force
2191 2000-10-22 Mark Mitchell <mark@codesourcery.com>
2193 * call.c (standard_conversion): Use RVALUE_CONVs for all
2194 expressions that satisfy lvalue_p, not just those that satisfy
2197 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
2199 * typeck.c (c_sizeof): Return an expression of `size_t' type,
2200 not one with TYPE_IS_SIZETYPE set.
2201 (dubious_conversion_warnings): Remove special-case code.
2203 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
2205 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
2206 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
2207 (dump_type_prefix): Print vector-of-int as 'int vector'.
2208 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
2209 * tree.c (walk_tree): Handle VECTOR_TYPE.
2211 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
2213 2000-10-21 Jason Merrill <jason@redhat.com>
2215 * parse.y (operator): Set got_object from got_scope.
2216 Set looking_for_typename.
2217 * decl.c (lookup_name_real): Clear val after setting from_obj.
2218 Reorganize diagnostic.
2220 2000-10-20 Jason Merrill <jason@redhat.com>
2222 * tree.c (walk_tree): Don't walk into default args.
2224 * error.c (dump_expr): Use host_integerp.
2226 2000-10-20 David Edelsohn <edelsohn@gnu.org>
2228 * typeck2.c (abstract_virtuals_error): Use "because" instead of
2229 "since" in error message.
2231 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2233 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
2235 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
2237 * decl.c (revert_static_member_fn): Fixed typo.
2239 2000-10-19 Mark Mitchell <mark@codesourcery.com>
2241 * class.c (subobject_offset_fn): New type.
2242 (dfs_record_base_offsets): Remove.
2243 (record_base_offsets): Likewise.
2244 (dfs_search_base_offsets): Likewise.
2245 (record_subobject_offset): New function.
2246 (check_subobject_offset): Likewise.
2247 (walk_subobject_offsets): Likewise.
2248 (record_subobject_offsets): Likewise.
2249 (layout_conflict_p): Reimplement.
2250 (layout_nonempty_base_or_field): Correct handling of type
2251 conflicts during layout.
2252 (layout_empty_base): Likewise.
2253 (build_base_field): Adjust to handle new representation of empty
2255 (build_base_fields): Likewise.
2256 (layout_virtual_bases): Likewise.
2257 (splay_tree_compare_integer_csts): New function.
2258 (layout_class_type): Use a splay_tree, rather than a varray, to
2259 represent the offsets of empty bases.
2261 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
2262 * decl.c (select_decl): Don't return declarations that are
2265 2000-10-18 Mark Mitchell <mark@codesourcery.com>
2267 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
2268 (fake_std_node): New macro.
2269 * decl.c (in_std): Rename to ...
2270 (in_fake_std): ... this.
2271 (flag_no_builtin): Remove.
2272 (flag_no_nonansi_builtin): Likewise.
2273 (walk_namespaces_r): Use fake_std_node.
2274 (push_namespace): Use std_identifier.
2275 (pop_namespace): Use in_fake_std.
2276 (lookup_name_real): Use fake_std_node.
2277 (init_decl_processing): When -fhonor-std, create the `std'
2278 namespace. Don't create a dummy fake_std_node in that case.
2279 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
2280 (builtin_function): Put builtins whose names don't begin
2281 with `_' in the std namespace.
2282 * decl2.c (flag_no_builtin): Remove.
2283 (flag_no_nonansi_builtin): Likewise.
2284 (set_decl_namespace): Use fake_std_node.
2285 (validate_nonmember_using_decl): Likewise.
2286 (do_using_directive): Likewise.
2287 (handle_class_head): Likewise.
2288 * dump.c (dequeue_and_dump): Likewise.
2289 * except.c (init_exception_processing): Use std_identifier.
2290 * init.c (build_member_call): Use fake_std_node.
2291 * rtti.c (init_rtti_processing): Use std_identifier.
2293 2000-10-17 Mark Mitchell <mark@codesourcery.com>
2295 * cp-tree.h (back_end_hook): Remove declaration.
2296 * decl2.c (back_end_hook): Remove definition.
2298 * dump.c (dequeue_and_dump): Dump TREE_USED.
2300 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
2302 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
2304 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
2306 * decl.c (WINT_TYPE): Define.
2307 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
2308 c_size_type_node, signed_size_type_node and wint_type_node.
2310 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
2312 * decl2.c (warn_missing_format_attribute): New variable.
2313 (lang_decode_option): Decode -Wmissing-format-attribute.
2315 2000-10-16 Mark Mitchell <mark@codesourcery.com>
2317 * typeck.c (qualify_type): Remove.
2318 (composite_pointer_type): Fix handling of conversions to `cv void*'.
2320 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2322 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
2324 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2326 * Makefile.in (parse.c, parse.h): Create atomically.
2328 2000-10-12 Mark Mitchell <mark@codesourcery.com>
2330 * class.c (current_obstack): Remove.
2331 * decl.c (ggc_p): Remove.
2332 (start_decl): Don't use decl_tree_cons.
2333 (grokdeclarator): Don't use build_decl_list.
2334 (start_function): Don't use decl_tree_cons.
2335 (finish_function): Don't mess with obstacks.
2336 * decl2.c (grok_x_components): Don't use build_decl_list.
2337 * lex.c (make_call_declarator): Don't call decl_tree_cons.
2338 (implicitly_declare_fn): Don't call build_decl_list.
2339 * parse.y (frob_specs): Don't call build_decl_list or
2341 (expr_or_declarator_intern): Don't call decl_tree_cons.
2342 (primary): Don't call build_decl_list.
2343 (fcast_or_absdcl): Likewise.
2344 (typed_declspecs): Don't call decl_tree_cons.
2345 (reserved_declspecs): Don't call build_decl_list.
2346 (declmods): Likewise.
2347 (reserved_typespecquals): Likewise.
2349 (new_type_id): Likewise.
2350 (cv_qualifiers): Likewise.
2351 (after_type_declarator_intern): Likewise.
2352 (notype_declarator_intern): Likewise.
2353 (absdcl_intern): Likewise.
2354 (named_parm): Likewise.
2355 * pt.c (most_specialized_class): Likewise.
2356 * repo.c (temporary_obstack): Make it a structure, not a pointer.
2357 (init_repo): Initialize it.
2358 * search.c (current_obstack): Remove.
2359 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
2361 2000-10-09 Richard Henderson <rth@cygnus.com>
2363 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
2364 (c++ language support bits for libgcc): Remove.
2365 (c++.clean): Remove cplib2.txt cleanup.
2366 * config-lang.in (headers, lib2funcs): Remove.
2368 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
2369 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
2370 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
2371 * inc/new.h, inc/typeinfo: Remove files.
2373 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
2375 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
2377 (init_decl_processing): Initialize intmax_type_node and
2380 2000-10-06 Richard Henderson <rth@cygnus.com>
2382 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
2383 (original_result_rtx): Remove.
2384 * decl.c (save_function_data): Don't clear x_result_rtx.
2385 (mark_lang_function): Don't mark it either.
2386 * expr.c (fixup_result_decl): Remove.
2387 * semantics.c (genrtl_named_return_value): Frob the return decl
2388 before calling emit_local_var.
2389 (genrtl_finish_function): Don't call fixup_result_decl.
2390 Always emit the jump to return_label.
2392 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
2394 * pt.c (lookup_template_class): Set current access for enum.
2395 (tsubst_enum): Set file & line for enum decl.
2397 * spew.c (yylex): Remove unused variable.
2399 2000-10-05 Richard Henderson <rth@cygnus.com>
2401 * semantics.c (genrtl_finish_function): Don't init or check
2402 can_reach_end; remove noreturn and return value checks.
2404 2000-10-05 Tom Tromey <tromey@cygnus.com>
2406 * init.c (build_java_class_ref): Use `build_static_name' with a
2407 suffix, not a prefix, to build the class object's name.
2409 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2411 * cp-tree.h (access_kind): Fix comment typo.
2412 * decl2.c (grokfield): Fix diagnostic typo.
2413 * semantics.c (finish_template_type): Fix comment typo.
2414 (finish_qualified_object_call_expr): Likewise.
2416 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2418 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
2421 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2423 * spew.c (frob_id): New static function.
2424 (frob_opname): Use it.
2427 2000-10-01 Mark Mitchell <mark@codesourcery.com>
2429 * decl.c (lang_mark_false_label_stack): Remove.
2430 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
2432 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
2434 * gxxint.texi: Use @email for formatting email addresses.
2436 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
2438 * error.c: Remove direct obstack manipulation. Replace with
2439 output_buffer-based formatting. Adjust calls to removed macros.
2440 (obstack_chunk_alloc, obstack_chunk_free): Remove.
2441 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
2442 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
2444 2000-09-24 Mark Mitchell <mark@codesourcery.com>
2446 * ir.texi: Move to ../c-tree.texi.
2448 2000-09-20 Jason Merrill <jason@redhat.com>
2450 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
2452 2000-09-21 Andreas Jaeger <aj@suse.de>
2454 * errfn.c: Move declaration of cp_printer and cp_printers to ...
2455 * cp-tree.h: ... here.
2457 * error.c: Remove declaration of cp_printer.
2459 2000-09-20 Mark Mitchell <mark@codesourcery.com>
2461 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
2463 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
2465 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
2468 2000-09-18 Mark Mitchell <mark@codesourcery.com>
2470 * decl.c (start_function): Robustify.
2472 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2474 * cp-tree.h (check_function_format): Accept a `status' parameter.
2476 * call.c, typeck.c: Updates calls to `check_function_format'.
2478 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
2480 * decl2.c (handle_class_head): Always push some scope even
2483 2000-09-16 Mark Mitchell <mark@codesourcery.com>
2485 * cp-tree.h (struct cp_language_function): Remove
2486 x_scope_stmt_stack and name_declared.
2487 (current_scope_stmt_stack): Remove.
2488 (function_name_declared_p): New macro.
2489 (struct lang_decl_flags): Use c_lang_decl as a base class.
2491 (struct lang_decl): Replace saved_tree with context.
2492 (DECL_FRIEND_CONTEXT): Adjust accordingly.
2493 (SET_DECL_FRIEND_CONTEXT): Likewise.
2494 (DECL_VIRTUAL_CONTEXT): Likewise.
2495 (DECL_SAVED_TREE): Remove.
2496 (C_DECLARED_LABEL_FLAG): Likewise.
2497 (cplus_expand_expr_stmt): Don't declare.
2498 (add_decl_stmt): Likewise.
2499 (add_scope_stmt): Likewise.
2500 * decl.c (mark_stmt_tree): Remove.
2501 (case_compare): Likewise.
2502 (finish_case_label): Use c_add_case_label.
2503 (init_decl_processing): Set more language-specific hooks.
2504 (build_enumerator): Fix typo in comment.
2505 (cplus_expand_expr_stmt): Remove.
2506 (mark_lang_function): Use mark_c_language_function.
2507 (lang_mark_tree): Use c_mark_lang_decl.
2508 * decl2.c: Change order of inclusion.
2509 * except.c: Likewise.
2510 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
2511 back on c_expand_expr.
2512 * friend.c: Include expr.h.
2513 * init.c: Change order of inclusion.
2514 * Makefile.in: Update dependencies.
2515 * lex.h (free_lang_decl_chain): Remove.
2516 * optimize.c (maybe_clone_body): Use function_name_declared_p.
2517 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
2519 (instantiate_decl): Use function_name_declared_p.
2520 * semantics.c (lang_expand_expr_stmt): Remove.
2521 (set_current_function_name_declared): Likewise.
2522 (current_function_name_declared): Likewise.
2523 (begin_compound_stmt): Use function_name_declared_p.
2524 (add_decl_stmt): Remove.
2525 (setup_vtbl_ptr): Use function_name_declared_p.
2526 (add_scope_stmt): Remove.
2527 (current_scope_stmt_stack): New function.
2528 (cp_expand_stmt): Don't handle SCOPE_STMTs.
2529 (expand_body): Use function_name_declared_p.
2530 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
2531 * typeck.c: Change order of includes.
2532 (convert_sequence): Remove.
2534 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
2536 * lex.c (reswords): Add _Complex.
2538 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2540 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
2542 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
2544 * init.c (begin_init_stmts): Don't use // comments.
2546 2000-09-12 Jason Merrill <jason@redhat.com>
2548 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
2549 all non-extern arrays.
2551 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
2552 typenames, too. Downgrade complaint to pedwarn.
2553 (xref_tag): Warn about surprising behavior of 'friend struct T'.
2554 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
2555 'class This::Inherited'.
2557 2000-09-12 Mark Mitchell <mark@codesourcery.com>
2559 * decl.c (finish_case_label): Given the LABEL_DECL a
2562 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
2564 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
2565 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
2566 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
2567 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
2568 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
2570 (sorry_for_unsupported_tree, print_scope_operator,
2571 print_left_paren, print_right_paren, print_left_bracket,
2572 print_right_bracket, print_whitespace): Likewise.
2573 (aggr_variety): Rename to class_key_or_enum.
2574 (print_type): Rename to print_type_id.
2575 (print_type_specifier_seq, print_simple_type_specifier,
2576 print_elaborated_type_specifier,
2577 print_rest_of_abstract_declarator,
2578 print_parameter_declaration_clause, print_exception_specification,
2579 print_nested_name_specifier, print_template_id,
2580 typedef_original_name, print_template_argument_list_start,
2581 print_template_argument_list_end): New functions.
2583 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
2585 * ir.texi: Add more documentation.
2587 2000-09-11 Mark Mitchell <mark@codesourcery.com>
2589 * cp-tree.h (struct saved_scope): Remove x_function_parms.
2590 (current_function_parms): Don't define.
2591 (struct cp_language_function): Remove parms_stored.
2592 (current_function_just_assigned_this): Don't define.
2593 (current_function_parms_stored): Likewise.
2594 (static_ctors): Declare.
2595 (static_dtors): Likewise.
2596 (SF_EXPAND): Don't define.
2597 (expand_start_early_try_stmts): Remove declaration.
2598 (store_parm_decls): Likewise.
2599 * decl.c (static_ctors): Don't declare.
2600 (static_dtors): Likewise.
2601 (struct binding_level): Remove this_block.
2602 (poplevel): Remove dead code.
2603 (set_block): Likewise.
2604 (mark_binding_level): Don't mark this_block.
2605 (mark_saved_scope): Don't mark x_function_parms.
2606 (init_decl_processing): Don't add current_function_parms as a GC
2608 (check_function_type): Change prototype.
2609 (start_function): Remove RTL-generation code.
2610 (expand_start_early_try_stmts): Remove.
2611 (store_parm_decls): Give it internal linkage. Remove
2612 RTL-generation code.
2613 (finish_function): Remove RTL-generation code.
2614 * decl2.c (static_ctors): Fix formatting.
2615 (static_dtors): Likewise.
2616 * method.c (use_thunk): Don't call store_parm_decls.
2617 (synthesize_method): Likewise.
2618 * optimize.c (maybe_clone_body): Likewise.
2619 * parse.y (fn.def2): Likewise.
2620 (.set_base_init): Likewise.
2621 (nodecls): Likewise.
2622 * pt.c (instantiate_decl): Likewise.
2623 * rtti.c (synthesize_tinfo_fn): Likewise.
2624 * semantics.c (genrtl_try_block): Simplify.
2625 (expand_body): Use genrtl_start_function and
2626 genrtl_finish_function.
2627 (genrtl_start_function): New function.
2628 (genrtl_finish_function): Likewise.
2630 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
2632 * error.c (cp_tree_printer, case 'P'): Append break.
2634 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
2636 * cp-tree.h (frob_opname): Declare.
2637 * parse.y (saved_scopes): New static variable.
2638 (cp_parse_init): Adjust.
2639 (do_id): If lastiddecl is NULL, do do_identifier.
2640 (operator): Save scope information.
2641 (unoperator): New reduction. Restore scope information.
2642 (operator_name): Append unoperator. Call frob_opname.
2643 * spew.c (frob_opname): Define.
2645 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
2647 * decl.c, rtti.c: Include defaults.h if not already included.
2648 Don't define the *_TYPE_SIZE macros.
2650 2000-09-09 Mark Mitchell <mark@codesourcery.com>
2652 * cp-tree.h (push_switch): Change prototype.
2653 (check_cp_case_value): Remove declaration.
2654 (decl_constant_value): Likewise.
2655 * decl.c (struct cp_switch): Add switch_stmt and cases.
2656 (case_compare): New function.
2657 (push_switch): Set switch_stmt. Initialize cases.
2658 (pop_switch): Clean up cases.
2659 (define_case_label): Rename to ...
2660 (finish_case_label): ... this. Do semantic analysis for case
2662 (start_function): Correct comment.
2663 * decl2.c (check_cp_case_value): Remove.
2664 * expr.c (do_case): Remove.
2665 * pt.c (tsubst_expr): Adjust call to finish_case_label.
2666 * semantics.c (genrtl_do_poplevel): Remove declaration.
2667 (RECHAIN_STMTS): Remove.
2668 (finish_break_stmt): Use build_break_stmt.
2669 (finish_continue_stmt): Use build_continue_stmt.
2670 (finish_switch_cond): Adjust condition here, rater than in
2671 c_expand_start_case.
2672 (finish_case_label): Remove.
2673 * typeck.c (c_expand_return): Remove.
2674 (c_expand_start_case): Likewise.
2676 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
2678 * ir.texi: Document type nodes.
2680 2000-09-06 Mark Mitchell <mark@codesourcery.com>
2682 * cp-tree.h (init_cp_semantics): Declare.
2683 (genrtl_try_block): Don't declare.
2684 (genrtl_handler): Likewise.
2685 (genrtl_catch_block): Likewise.
2686 (genrtl_ctor_stmt): Likewise.
2687 (genrtl_subobject): Likewise.
2688 (genrtl_do_poplevel): Likewise.
2689 (genrtl_named_return_value): Likewise.
2690 * lex.c (init_parse): Call init_cp_semantics.
2691 * semantics.c (genrtl_try_block): Give it internal linkage.
2692 (genrtl_handler): Likewise.
2693 (genrtl_catch_block): Likewise.
2694 (genrtl_ctor_stmt): Likewise.
2695 (genrtl_subobject): Likewise.
2696 (genrtl_do_poplevel): Likewise.
2697 (genrtl_named_return_value): Likewise.
2698 (lang_expand_stmt): Rename to ...
2699 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
2700 (init_cp_semantics): Define.
2702 * decl.c (initialize_local_var): Remove RTL-generating code.
2703 * semantics.c (genrtl_try_block): Fix formatting.
2705 Move statement-tree facilities from C++ to C front-end.
2706 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
2707 (void_zero_node): Remove.
2708 (stmt_tree): Likewise.
2709 (scope_chain): Adjust.
2710 (language_function): Rename to cp_language_function.
2711 (cp_function_chain): Adjust.
2712 (current_stmt_tree): Remove.
2713 (last_tree): Likewise.
2714 (last_expr_type): Likewise.
2715 (struct lang_decl): Adjust.
2716 (STMT_IS_FULL_EXPR_P): Remove.
2718 (begin_stmt_tree): Likewise.
2719 (finish_stmt_tree): Likewise.
2720 (walk_tree_fn): Likewise.
2721 (walk_stmt_tree): Likewise.
2722 * class.c (finish_struct): Replace use of add_tree with add_stmt.
2723 * decl.c (mark_stmt_tree): Adjust type.
2724 (init_decl_processing): Don't build void_zero_node.
2725 (initialize_local_var): Adjust usage of current_stmt_tree.
2726 (finish_enum): Use add_stmt, not add_tree.
2727 (save_function_data): Adjust use of language_function.
2728 (finish_constructor_body): Use add_stmt, not add_tree.
2729 (finish_destructor_body): Likewise.
2730 (push_cp_function_context): Adjust use of language_function.
2731 (pop_cp_function_context): Likewise.
2732 (mark_lang_function): Likewise.
2733 (mark_cp_function_context): Likewise.
2734 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
2735 (build_vec_init): Likewise.
2736 * semantics.c (SET_LAST_STMT): Remove.
2737 (RECHAIN_STMTS): Don't use it.
2738 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
2739 (current_stmt_tree): Define.
2741 (finish_goto_stmt): Use add_stmt, not add_tree.
2742 (finish_expr_stmt): Likewise.
2743 (begin_if_stmt): Likewise.
2744 (finish_then_clause): Likewise.
2745 (begin_while_stmt): Likewise.
2746 (begin_do_stmt): Likewise.
2747 (finish_return_stmt): Likewise.
2748 (begin_for_stmt): Likewise.
2749 (finish_break_stmt): Likewise.
2750 (finish_continue_stmt): Likewise.
2751 (begin_switch_stmt): Likewise.
2752 (finish_case_label): Likewise.
2753 (begin_try_block): Likewise.
2754 (begin_function_try_block): Likewise.
2755 (begin_handler): Likewise.
2756 (begin_catch_block): Likewise.
2757 (begin_compound_stmt): Likewise.
2758 (begin_asm_stmt): Likewise.
2759 (finish_asm_stmt): Likewise.
2760 (finish_label_stmt): Likewise.
2761 (add_decl_stmt): Likewise.
2762 (finish_subobject): Likewise.
2763 (finish_decl_cleanup): Likewise.
2764 (finish_named_return_value): Likewise.
2765 (setup_vtbl_ptr): Likewise.
2766 (add_scope_stmt): Likewise.
2767 (finish_stmt_expr): Likewise.
2768 (prune_unused_decls): Remove.
2769 (begin_stmt_tree): Likewise.
2770 (finish_stmt_tree): Likewise.
2771 (prep_stmt): Adjust use of current_stmt_tree.
2772 (lang_expand_stmt): Likewise.
2773 * tree.c (statement_code_p): Remove.
2774 (cp_statement_code_p): New function.
2775 (walk_stmt_tree): Remove.
2776 (init_tree): Set lang_statement_code_p.
2778 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
2780 Integrated preprocessor.
2782 * Make-lang.in, Makefile.in: Remove all references to input.c,
2783 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
2784 * gxx.gperf, hash.h, input.c: Delete.
2785 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
2786 initialized properly.
2788 * class.c (fixup_pending_inline): Take a tree, not a
2789 struct pending_inline *. All callers changed.
2790 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
2791 RID_PROTECTED entries in ridpointers[] array here.
2792 * decl.c (duplicate_decls): Do not refer to struct
2794 (record_builtin_type, init_decl_processing): Use RID_MAX not
2796 (grokdeclarator): Use C_IS_RESERVED_WORD.
2797 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
2799 (grok_x_components): Do not inspect pending_inlines chain.
2801 * cp-tree.h (struct lang_identifier): Add rid_code entry.
2802 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
2803 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
2804 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
2805 TIME_IDENTIFIER_FILEINFO): Kill.
2807 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
2809 * parse.y: Call do_pending_inlines unconditionally.
2810 reinit_parse_for_method is now snarf_method. fn.defpen is no
2811 longer necessary. Remove unnecessary <itype> annotation on
2812 SCOPE. Do not refer to end_of_file or struct pending_inline.
2813 * semantics.c (begin_inline_definitions): Call
2814 do_pending_inlines unconditionally.
2816 * lex.c: Remove all code now shared with C front end.
2817 Initialize cpplib properly if USE_CPPLIB. Put reserved words
2818 into the get_identifier table. Rewrite pragma handling to
2819 work with the registry. Move code to save tokens for later
2820 processing to spew.c.
2822 * spew.c: Rewrite everything in terms of token streams instead
2823 of text. Move routines here from lex.c / input.c as
2824 appropriate. GC-mark trees hanging off the pending inlines
2827 2000-09-06 Mark Mitchell <mark@codesourcery.com>
2829 * NEWS: Mention that the named return value extension has been
2831 * cp-tree.h (original_result_rtx): Define.
2832 (TREE_REFERENCE_EXPR): Remove.
2833 (DECL_VPARENT): Likewise.
2834 (pushdecl_nonclass_level): Likewise.
2835 (store_return_init): Likewise.
2836 (reinit_lang_specific): Likewise.
2837 (genrtl_named_return_value): Change prototype.
2838 * decl.c (original_result_rtx): Remove.
2839 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
2840 Do not generate RTL for local variables here.
2841 (store_return_init): Remove.
2842 * semantics.c (genrtl_named_return_value): Simplify. Fold in
2844 (finish_named_return_value): Adjust accordingly. Warn that this
2845 extension is deprecated.
2846 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
2848 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
2850 * pt.c (type_unification_real): Replace switch with if.
2851 (unify): Tsubst non-type parms before comparing.
2853 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
2855 * error.c (dump_typename): New function, broken out of ...
2856 (dump_type): ... here. Use it.
2857 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
2859 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
2861 * init.c (build_offset_ref): Deal with namespace scoped
2864 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
2866 * class.c (resolve_address_of_overloaded_function): Add
2867 explanation message.
2868 * decl.c (define_case_label): Reformat explanation.
2869 * decl2.c (finish_static_data_member_decl): Likewise.
2870 (grokfield): Likewise.
2871 * friend.c (do_friend): Likewise.
2873 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
2875 * tree.c (walk_tree): Expose tail recursion.
2876 (walk_stmt_tree): New function.
2877 * cp-tree.h: Prototype walk_stmt_tree.
2878 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
2879 the BLOCKs directly. If a BLOCK has no variables after
2880 pruning, discard it.
2881 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
2882 restore the line number.
2884 2000-09-05 Mark Mitchell <mark@codesourcery.com>
2886 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
2887 (pt.o): Remove dependency on HTAB_H.
2888 * cp-tree.h: Include hashtab.h.
2889 (walk_tree): Change prototype.
2890 (walk_tree_without_duplicates): New function.
2891 * decl.c (check_default_argument): Use it.
2892 * optimize.c (remap_decl): Adjust calls to walk_tree.
2893 (copy_body): Likewise.
2894 (expand_calls_inline): Likewise.
2895 (calls_setjmp_p): Use walk_tree_without_duplicates.
2896 * pt.c: Don't include hashtab.h.
2897 (for_each_template_parm): Use walk_tree_without_duplicates.
2898 * semantics.c (finish-stmt_tree): Likewise.
2899 (expand_body): Likewise.
2900 * tree.c (walk_tree): Add additional parameter.
2901 (walk_tree_without_duplicates): New function.
2902 (count_trees): Use it.
2903 (verify_stmt_tree): Adjust call to walk_tree.
2904 (find_tree): Use walk_tree_without_duplicates.
2905 (no_linkage_check): Likewise.
2906 (break_out_target_exprs): Adjust call to walk_tree.
2907 (cp_unsave): Likewise.
2909 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2911 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
2912 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
2913 * cp-tree.h (TYPE_BINFO): Adjust comment.
2914 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
2915 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
2916 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
2917 (TYPE_TEMPLATE_INFO): Likewise.
2918 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
2919 * class.c (push_nested_class): Likewise.
2920 * decl.c (lookup_name_real): Likewise.
2921 (grokdeclarator): Likewise.
2922 (grok_op_properties): Likewise.
2923 (xref_tag): Likewise.
2924 (xref_basetypes): Likewise.
2925 * decl2.c (constructor_name_full): Likewise.
2926 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
2927 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
2928 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
2929 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2930 (dump_type_suffix): Likewise.
2931 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
2933 (get_aggr_from_typedef): Likewise.
2934 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
2935 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2936 (write_template_parm): Likewise.
2937 (write_template_template_parm): Check tree code instead of
2938 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2939 * method.c (build_overload_nested_name): Add
2940 BOUND_TEMPLATE_TEMPLATE_PARM.
2941 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
2942 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2943 * pt.c (convert_template_argument): Check tree code instead of
2944 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2945 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
2946 (for_each_template_parm): Adjust comment.
2947 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
2948 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2949 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
2950 template_args_equal to compare template template parameter cases.
2951 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2952 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
2954 * tree.c (copy_template_template_parm): Decide whether to create
2955 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
2956 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2957 (copy_tree_r): Likewise.
2958 * typeck.c (comptypes): Likewise. Check tree code instead of
2959 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2961 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
2963 * decl.c (finish_function): Move the code for handling functions
2964 marked with the constructor and destructor attributes inside the
2967 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
2969 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
2971 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
2973 * pt.c (lookup_template_class): Remove abort.
2974 * tree.c (get_type_decl): Allow error_mark_node.
2976 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
2978 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
2981 2000-09-03 Mark Mitchell <mark@codesourcery.com>
2983 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
2986 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
2988 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
2989 union tag mismatch error reporting.
2991 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
2993 * call.c (build_scoped_method_call): Check it is not a namespace.
2995 2000-08-30 Jason Merrill <jason@redhat.com>
2997 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
2999 * tree.c (bot_manip): Check TREE_CONSTANT rather than
3000 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
3001 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
3003 * decl.c (start_function): Always call make_function_rtl.
3005 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
3007 * semantics.c (prune_unused_decls): New function.
3008 (finish_stmt_tree): Call it via walk_tree.
3010 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
3012 * class.c (build_secondary_vtable): Constify a char *.
3013 * decl.c (init_decl_processing): Initialize function_id_node,
3014 pretty_function_id_node, and func_id_node.
3015 * input.c (struct input_source): Constify 'str'.
3016 (feed_input): Constify first argument.
3017 * mangle.c (write_identifier): Constify argument.
3018 * pt.c (mangle_class_name_for_template): Constify argument.
3020 2000-08-29 Mark Mitchell <mark@codesourcery.com>
3022 * typeck.c (mark_addressable): Remove code that pokes around in
3025 2000-08-28 Jason Merrill <jason@redhat.com>
3027 * lex.c (file_name_nondirectory): Move to toplev.c.
3029 * cp-tree.h (LOCAL_CLASS_P): New macro.
3030 * class.c (finish_struct_1): Use it.
3032 2000-08-27 Alex Samuel <samuel@codesourcery.com>
3034 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
3035 (write_encoding): Pass another argument to write_name.
3036 (write_name): Add ignore_local_scope parameter. Fix handling of
3038 (write_nested_name): Use write_unqualified_name.
3039 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
3040 (write_template_prefix): Use write_unqualified_name.
3041 (write_component): Remove.
3042 (write_local_name): Add parameter. Use direct local entity to
3043 discriminator calculation.
3044 (write_class_enum_type): Pass another argument to write_name.
3045 (write_template_template_arg): Likewise.
3046 (make_guard_variable): Likewise.
3048 2000-08-27 Jason Merrill <jason@redhat.com>
3050 * decl.c (pushdecl): Matching decls for local externs are found in
3051 the current level. Propagate linkage information from previous
3054 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
3056 * ir.texi (Expressions): Fix typo.
3058 2000-08-25 Greg McGary <greg@mcgary.org>
3060 * tree.c (init_tree): Use ARRAY_SIZE.
3062 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
3064 * error.c (cp_tree_printer): Rework.
3066 2000-08-25 Mark Mitchell <mark@codesourcery.com>
3068 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
3070 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
3071 (cp-demangle.o): Remove target.
3072 (dyn-string.o): Likewise.
3074 * decl.c (grokfndecl): Require that `main' return an `int'.
3075 * mangle.c (write_encoding): Don't mangle return types for
3076 conversion functions.
3078 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
3080 * error.c (tree_formatting_info): New data type.
3081 (tree_being_formatted): New macro.
3082 (tree_formatting_flags): Likewise.
3083 (put_whitespace): Likewise.
3084 (print_tree_identifier): Likewise.
3085 (print_identifier): Likewise.
3086 (cp_tree_printer, print_function_argument_list, print_declaration,
3087 print_expression, print_function_declaration,
3088 print_function_parameter, print_type, print_cv_qualifier): New
3090 (init_error): Initialize lang_printer.
3092 2000-08-24 Jason Merrill <jason@redhat.com>
3094 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
3095 adjustment necessary.
3097 2000-08-24 Greg McGary <greg@mcgary.org>
3099 * cp-tree.h (MAIN_NAME_P): Remove macro.
3101 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
3103 * error.c (print_instantiation_context): Don't forget to flush the
3106 2000-08-23 Jason Merrill <jason@redhat.com>
3108 * typeck.c (build_ptrmemfunc): Save the input pmf.
3110 * method.c (process_modifiers): Use same_type_p.
3112 2000-08-23 Mark Mitchell <mark@codesourcery.com>
3114 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
3115 * mangle.c (write_function_type): Change prototype.
3116 (write_encoding): Don't mangle return types for
3117 constructors or destructors.
3118 (write_type): Adjust call to write_function_type.
3119 * pt.c (instantiate_template): Instantiate alternate entry points
3120 when instantiating the main function.
3122 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
3124 * error.c (cp_print_error_function): Don't use embedded '\n' in
3127 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
3129 * decl.c (init_decl_processing): Remove bogus initialization.
3130 * error.c (lang_print_error_function): Restore here.
3131 (init_error): Initialize print_error_function.
3133 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3135 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
3137 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
3139 * Makefile.in (error.o): Depends on diagnostic.h
3141 * cp-tree.h (problematic_instantiation_changed,
3142 record_last_problematic_instantiation, current_instantiation,
3143 print_instantiation_context): Declare.
3144 (maybe_print_template_context): Remove.
3146 * decl.c (init_decl_processing): Set print_error_function to NULL.
3147 (lang_print_error_function): Remove, since we're using a new
3150 * error.c: #include diagnostic.h
3151 (function_category): New function.
3152 (cp_diagnostic_starter): Likewise.
3153 (cp_diagnostic_finalizer): Likewise.
3154 (cp_print_error_function): Likewise.
3155 (maybe_print_instantiation_context): Likewise.
3156 (print_instantiation_full_context): Likewise.
3157 (print_instantiation_partial_context): Likewise.
3158 (print_instantiation_context): Define.
3159 (init_error): Initialize diagnostic pager and finalizer.
3161 * pt.c (problematic_instantiation_changed): Define.
3162 (record_last_problematic_instantiation): Likewise.
3163 (current_instantiation): Likewise.
3164 (maybe_print_template_context): Remove.
3165 (print_template_context): Likewise.
3166 (current_tinst_level): Make static to reflect Brendan Kehoe's
3167 change of 1995-04-13.
3168 (push_tinst_level): Call print_instantiation_context.
3170 2000-08-21 Nix <nix@esperi.demon.co.uk>
3172 * lang-specs.h: Do not process -o or run the assembler if
3175 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
3177 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
3179 * decl2.c (lang_decode_option): Disable gettext attributes for
3182 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
3184 * lex.c (lang_init_options): Default diagnostic message maximum
3185 length to 80, when line-wrapping.
3187 2000-08-20 Mark Mitchell <mark@codesourcery.com>
3189 * class.c (build_vtbl_initializer): Clear the entire
3190 vtbl_init_data. Start keeping track of the functions for which we
3191 have created vcall offsets here.
3192 (dfs_build_vcall_offset_vtbl_entries): Remove.
3193 (build_vcall_offset_vtbl_entries): Reimplement.
3194 (add_vcall_offset_vtbl_entries_r): New function.
3195 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
3196 computing when vcall offsets are necessary.
3198 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3200 * decl.c (member_function_or_else): Use cp_error ... %T.
3201 (grokdeclarator): Likewise.
3202 (start_method): Likewise.
3203 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
3205 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3207 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
3210 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3212 * cp-tree.h (PTRMEM_OK_P): New macro.
3213 (itf_ptrmem_ok): New enumeration value.
3214 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
3215 argument. Diagnose implicit pointer to member.
3216 (instantiate_type): Don't diagnose implicit pointer to member
3217 here. Pass itf_ptrmem_ok if ok. Adjust calls to
3218 resolve_address_of_overloaded_function.
3219 * init.c (build_offset_ref): Set PTRMEM_OK_P.
3220 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
3221 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
3222 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
3223 (build_unary_op): Deal with single non-static member in
3226 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3228 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
3230 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3232 * cp-tree.h (enum_name_string): Remove prototype.
3233 (report_case_error): Remove prototype.
3234 * cp/typeck2.c (enum_name_string): Remove.
3235 (report_case_error): Remove.
3236 * error.c (dump_expr): Deal with enum values directly.
3237 Correctly negate integer constant.
3239 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3241 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
3242 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
3243 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
3244 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
3245 (__cxa_vec_new): Use __cxa_vec_new2.
3246 (__cxa_vec_delete): Use __cxa_vec_delete2.
3248 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3250 * vec.cc (__cxa_vec_new): Set "C" linkage.
3251 (__cxa_vec_ctor): Likewise.
3252 (__cxa_vec_cctor): Likewise.
3253 (__cxa_vec_dtor): Likewise.
3254 (__cxa_vec_delete): Likewise.
3255 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
3256 (__cxa_vec_ctor): Likewise.
3257 (__cxa_vec_cctor): Likewise.
3258 (__cxa_vec_dtor): Likewise.
3259 (__cxa_vec_delete): Likewise.
3261 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3263 * class.c (instantiate_type): Reinstate local variable
3264 deleted in previous change.
3266 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
3269 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3271 * cp-tree.h (instantiate_type_flags): New enumeration.
3272 (instantiate_type): Change parameter.
3273 * class.c (instantiate_type): Adjust prototype. Adjust.
3274 * call.c (standard_conversion): Adjust instantiate_type call.
3275 (reference_binding): Likewise.
3276 (build_op_delete_call): Likewise.
3277 (convert_like_real): Likewise.
3278 * cvt.c (cp_convert_to_pointer): Likewise.
3279 (convert_to_reference): Likewise.
3280 * pt.c (convert_nontype_argument): Likewise.
3281 * typeck.c (build_binary_op): Likewise.
3282 (build_ptrmemfunc): Likewise.
3283 (convert_for_assignment): Likewise.
3285 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3287 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
3288 (current_aggr): Define.
3289 * decl.c (grokdeclarator): Make sure a friend class is an
3290 elaborated type specifier.
3291 * parse.y (current_aggr): Remove static definition.
3292 (cp_parse_init): Adjust.
3293 (structsp): Clear and restore current_aggr.
3294 (component_decl_list): Clear current_aggr.
3296 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
3297 aggregate tag on the typename's context.
3299 * pt.c (tsubst_friend_class): Return error_mark_node, if
3301 (instantiate_class_template): Ignore error_mark_node friend types.
3303 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
3305 * cvt.c (warn_ref_binding): New static function, broken out of ...
3306 (convert_to_reference): ... here. Use it.
3308 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3310 * parse.y (template_arg): Add rule for template qualified with
3313 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3315 * decl2.c (add_function): Reorganize.
3316 (arg_assoc): Do not consider function template decls.
3318 2000-08-11 Jason Merrill <jason@redhat.com>
3320 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
3323 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3325 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
3326 (lookup_nested_tag): Likewise.
3328 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
3331 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3333 * parse.y (named_complex_class_head_sans_basetype): Remove
3336 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3338 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
3339 explicit TEMPLATE_ID_EXPR args.
3340 (build_expr_from_tree, case CALL_EXPR): Likewise.
3342 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3344 * decl.c (check_tag_decl): Diagnose typename's which don't
3347 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
3349 * init.c (build_aggr_init): Reject bogus array initializers
3352 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
3354 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
3356 * cp/tinfo.cc (__dynamic_cast): Likewise.
3357 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
3359 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
3361 * cvt.c (convert_to_pointer_force): Fix error message when
3362 attempting to cast from ambiguous base.
3364 2000-08-08 Jason Merrill <jason@redhat.com>
3366 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
3367 (tsubst_template_arg_vector): Likewise.
3369 * decl2.c (build_anon_union_vars): Choose the largest field; don't
3370 assume that one will be as large as the union.
3372 2000-08-07 Kazu Hirata <kazu@hxi.com>
3374 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
3375 * decl.c (pop_labels): Likewise.
3377 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
3379 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
3381 (__pointer_to_member_type_info): Likewise.
3382 (__base_class_info): Likewise.
3383 (__class_type_info): Likewise.
3384 (__si_class_type_info): Likewise.
3385 (__vmi_class_type_info): Likewise.
3386 * tinfo.cc (__si_class_type_info::__do_find_public_src):
3387 Changed member names to match specifications.
3388 (__vmi_class_type_info::__do_find_public_src): Likewise.
3389 (__si_class_type_info::__do_dyncast): Likewise.
3390 (__vmi_class_type_info::__do_dyncast): Likewise.
3391 (__si_class_type_info::__do_upcast): Likewise.
3392 (__vmi_class_type_info::__do_upcast): Likewise.
3393 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
3394 (__pbase_type_info::__pointer_catch): Likewise.
3395 (__pointer_type_info::__pointer_catch): Likewise.
3396 (__pointer_to_member_type_info::__pointer_catch): Likewise.
3398 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
3400 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
3401 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
3402 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
3404 2000-08-04 Mark Mitchell <mark@codesourcery.com>
3406 * cp-tree.h (add_method): Change prototype.
3407 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
3408 Don't double the size of the method vector in the error case.
3409 (handle_using_decl): Adjust call to add_method.
3410 (add_implicitly_declared_members): Likewise.
3411 (clone_function_decl): Likewise.
3412 * decl2.c (check_classfn): Likewise.
3413 * semantics.c (finish_member_declaration): Likewise.
3415 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
3417 * decl.c (flag_isoc94): New variable.
3419 2000-08-02 Jason Merrill <jason@redhat.com>
3421 * pt.c (do_type_instantiation): Add complain parm; don't complain
3422 if called recursively.
3423 * cp-tree.h, parse.y: Adjust.
3425 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
3427 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
3428 -Wno-strict-prototypes.
3430 * g++spec.c: Adjust type of second argument to
3431 lang_specific_driver, and update code as necessary.
3433 * cp-tree.h: Don't prototype min_precision here.
3434 (my_friendly_assert): Cast expression to void.
3435 * semantics.c (do_poplevel): Initialize scope_stmts.
3437 2000-08-02 Mark Mitchell <mark@codesourcery.com>
3439 * cp-tree.h (DECL_NEEDED_P): Tweak.
3441 2000-07-28 Jason Merrill <jason@redhat.com>
3443 * lang-specs.h: Use %i in rule for .ii files.
3445 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
3447 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
3449 2000-07-30 Mark Mitchell <mark@codesourcery.com>
3451 Allow indirect primary bases.
3452 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
3454 (CLASSTYPE_VFIELD_PARENT): Remove.
3455 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
3456 (BINFO_PRIMARY_BINFO): Remove.
3457 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
3458 (BINFO_VBASE_PRIMARY_P): Likewise.
3459 (BINFO_PRIMARY_BASE_OF): New macro.
3460 (BINFO_INDIRECT_PRIMARY_P): Likewise.
3461 (get_primary_binfo): New function.
3462 * decl.c (lang_mark_tree): Make lang_type::primary_base.
3463 * class.c (vcall_offset_data_s): Rename to ...
3464 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
3465 and add ctor_vtbl_p.
3466 (get_derived_offset): Use get_primary_binfo.
3467 (dfs_mark_primary_bases): Adjust handling of virtual primary
3469 (mark_primary_bases): Likewise.
3470 (set_primary_base): Take a binfo, not an integer, as a
3471 representation of the primary base.
3472 (indirect_primary_base_p): Remove.
3473 (determine_primary_base): Adjust for indirect primary bases.
3474 (dfs_find_final_overrider): Fix typo in coment.
3475 (update_vtable_entry_for_fn): Use get_primary_binfo.
3476 (layout_nonempty_base_or_field): Tweak.
3477 (build_base_fields): Adjust for new primary base semantics.
3478 (dfs_propagate_binfo_offsets): Remove.
3479 (propagate_binfo_offsets): Rewrite.
3480 (dfs_set_offset_for_shared_vbases): Remove.
3481 (layout_virtual_bases): Don't use it.
3482 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
3484 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
3485 CLASSTYPE_VFIELD_PARENT.
3486 (dfs_get_primary_binfo): New function.
3487 (get_primary_binfo): Likewise.
3488 (dump_class_hierarchy_r): Tweak printing of primary bases.
3489 (build_vtbl_initializer): Fix typo in comments. Use
3491 (build_vcall_and_vbase_vtbl_entries): Likewise.
3492 (build_vbaes_offset_vtbl_entries): Likewise.
3493 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
3494 BV_VCALL_INDEX to handle indirect primary bases.
3495 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
3496 (build_rtti_vtbl_entries): Likewise.
3497 * search.c (get_shared_vbase_if_not_primary): Tweak.
3498 (find_vbase_instance): Likewise.
3499 (binfo_for_vtable): Simplify.
3500 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
3501 (make_binfo): Make it have 11 entries.
3503 2000-07-30 Alex Samuel <samuel@codesourcery.com>
3505 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
3506 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
3507 ascertaining primaryness.
3508 (G): Remove template_args.
3509 (decl_is_template_id): New function.
3510 (write_encoding): Use decl_is_template_id.
3511 (write_name): Likewise. Handle type_decls. Get main variant of
3513 (write_nested_name): Likewise.
3514 (write_prefix): Likewise.
3515 (write_template_prefix): Likewise.
3516 (write_special_name_constructor): Remove defunct production from
3518 (write_bare_function_type): Remove comment about absent parameter.
3519 (write_template_template_arg): Add missing grammar production to
3522 2000-07-27 Jason Merrill <jason@redhat.com>
3524 * decl.c (duplicate_decls): If common_type produces a non-typedef
3525 type for a typedef, just use the old type.
3527 2000-07-27 Mark Mitchell <mark@codesourcery.com>
3529 * cp-tree.h (function_depth): Declare.
3530 (verify_stmt_tree): Likewise.
3531 (find_tree): Likewise.
3532 * decl.c (function_depth): Give it external linkage.
3533 * optimize.c (optimize_function): Increment and decrement it.
3534 * tree.c (verify_stmt_tree_r): New function.
3535 (verify_stmt_tree): Likewise.
3536 (find_tree_r): Likewise.
3537 (find_tree): Likewise.
3539 2000-07-27 Jason Merrill <jason@redhat.com>
3541 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
3543 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
3545 2000-07-26 Mark Mitchell <mark@codesourcery.com>
3547 * decl.c (start_cleanup_fn): Mark the function as `inline'.
3548 * decl2.c (get_guard): Call cp_finish_decl, not
3549 rest_of_decl_compilation, for local guards.
3550 * lex.c (do_identifier): Remove unused variable.
3552 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
3554 * parse.y: Add missing ';'.
3556 2000-07-26 Mark Mitchell <mark@codesourcery.com>
3558 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
3561 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
3563 Kill strict_prototype. Backwards compatibility only for
3564 non NO_IMPLICIT_EXTERN_C systems.
3565 * cp-tree.h (flag_strict_prototype): Remove.
3566 (strict_prototype): Remove.
3567 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
3568 * decl.c (maybe_push_to_top_level): Adjust.
3569 (pop_from_top_level): Adjust.
3570 (decls_match): Only allow sloppy parm matching for ancient
3572 (init_decl_processing): Adjust.
3573 (grokdeclarator): Adjust.
3574 * decl2.c (flag_strict_prototype): Remove.
3575 (strict_prototype): Remove.
3576 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
3577 (lang_f_options): Remove "strict-prototype".
3578 (unsupported-options): Add "strict-prototype".
3579 * lex.c (do_identifier): Adjust.
3580 (do_scoped_id): Adjust.
3581 * parse.y (empty_parms): Adjust.
3582 * class.c (push_lang_context): Adjust.
3583 (pop_lang_context): Adjust.
3584 * typeck.c (comp_target_parms): Adjust.
3586 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
3588 * decl.c (poplevel): Deal with anonymous variables at for scope.
3589 (maybe_inject_for_scope_var): Likewise.
3591 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
3593 * decl.c: Remove all signal handling code, now done in toplev.c.
3595 2000-07-23 Mark Mitchell <mark@codesourcery.com>
3597 * decl.c (make_rtl_for_nonlocal_decl): Rework.
3599 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
3602 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
3604 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
3605 Define my_friendly_assert and my_friendly_abort as macros
3606 which may call friendly_abort. Prototype friendly abort, not
3607 my_friendly_abort or my_friendly_assert.
3608 * decl.c (signal_catch): Report the signal caught in the error
3609 message. Call fatal directly.
3610 * typeck2.c (ack, my_friendly_assert): Delete.
3611 (my_friendly_abort): Rename to friendly_abort. Expect file,
3612 line, and function parameters. Report the abort code, then
3613 call fancy_abort. Do not mask an abort if errors have
3616 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
3618 * typeck.c (comp_target_parms): Remove obsolete parameter.
3619 (comp_target_types): Adjust.
3621 2000-07-17 Jason Merrill <jason@redhat.com>
3623 * typeck.c (mark_addressable): Never set TREE_USED.
3624 * call.c (build_call): Don't abort on calls to library functions
3625 that have been declared normally.
3627 * typeck.c (build_binary_op): Fix grammar in warning.
3629 * exception.cc (__eh_free): Fix prototype.
3631 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
3633 * decl.c (pushdecl): Handle seeing an OVERLOAD in
3634 IDENTIFIER_NAMESPACE_VALUE.
3636 2000-07-16 Mark Mitchell <mark@codesourcery.com>
3638 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
3639 * method.c (use_thunk): Correct handling of vcall offsets.
3641 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
3643 * .cvsignore: parse.h and parse.c have no cp- prefix.
3645 2000-07-13 Mark Mitchell <mark@codesourcery.com>
3647 * .cvsignore: New file.
3649 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
3651 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
3653 2000-07-12 Mark Mitchell <mark@codesourcery.com>
3655 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
3657 * parse.h: Likewise.
3659 2000-07-11 Mark Mitchell <mark@codesourcery.com>
3661 * class.c (layout_class_type): Add pointers to virtual bases after
3662 base classes under the old ABI.
3664 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
3666 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
3667 (finish_continue_stmt): Likewise.
3668 (begin_for_stmt): Remove call to note_level_for_for.
3669 (finish_goto_stmt): Change call from build_min_nt
3671 (finish_expr_stmt): Likewise.
3672 (begin_if_stmt): Likewise.
3673 (begin_while_stmt): Likewise.
3674 (finish_while_stmt): Likewise.
3675 (finish_return_stmt): Likewise.
3676 (begin_for_stmt): Likewise.
3677 (finish_for_stmt): Likewise.
3678 (finish_break_stmt): Likewise.
3679 (begin_switch_stmt): Likewise.
3680 (finish_case_label): Likewise.
3681 (genrtl_try_block): Likewise.
3682 (begin_try_block): Likewise.
3683 (begin_handler): Likewise.
3684 (begin_compound_stmt): Likewise.
3685 (finish_asm_stmt): Likewise.
3686 (finish_label_stmt): Likewise.
3687 (add_decl_stmt): Likewise.
3688 (finish_subobject): Likewise.
3689 (finish_decl_cleanup): Likewise.
3690 (finish_named_return_value): Likewise.
3691 (setup_vtbl_ptr): Likewise.
3692 (add_scope_stmt): Likewise.
3693 * decl.c (finish_constructor_body): Likewise.
3694 (finish_destructor_body): Likewise.
3695 * optimize.c (copy_body_r): Likewise.
3696 (initialize_inlined_parameters): Likewise.
3697 (declare_return_variable): Likewise.
3698 (expand_call_inline): Likewise.
3700 2000-07-10 Jakub Jelinek <jakub@redhat.com>
3702 * semantics.c (expand_body): Sync interface information
3703 at the end of function body expansion.
3705 2000-07-09 Jason Merrill <jason@redhat.com>
3707 * init.c (build_new_1): Bail early if the call to new fails.
3709 * decl.c (compute_array_index_type): Check specifically for
3710 an INTEGER_CST, not just TREE_CONSTANT.
3712 * decl.c (duplicate_decls): Don't call duplicate_decls on
3713 the DECL_TEMPLATE_RESULT.
3714 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
3717 * error.c (dump_template_bindings): Don't crash if we had an
3718 invalid argument list.
3720 * typeck.c (c_expand_start_case): Do narrowing here.
3721 * semantics.c (finish_switch_cond): Not here.
3723 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
3725 * parse.y (asm_clobbers): Do string concatenation.
3727 2000-07-09 Mark Mitchell <mark@codesourcery.com>
3729 * decl.c (pushtag): Don't put local classes in template functions
3730 on the local_classes list.
3732 2000-07-04 Scott Snyder <snyder@fnal.gov>
3734 * decl2.c (get_guard): Add missing return for old ABI local
3737 2000-07-09 Mark Mitchell <mark@codesourcery.com>
3739 * cp-tree.h (char_type_p): New function.
3740 * decl.c (init_decl_processing): Don't initialize
3741 signed_wchar_type_node or unsigned_wchar_type_node.
3742 (complete_array_type): Handle brace-enclosed string-constants.
3743 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
3744 * tree.c (char_type_p): New function.
3745 * typeck2.c (digest_init): Use char_type_p.
3747 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
3749 * pt.c (tsubst): Don't layout type, if it's error_mark.
3751 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
3753 * pt.c (instantiate_pending_templates): Reset template level.
3755 2000-07-05 Jason Merrill <jason@redhat.com>
3757 * call.c (joust): Don't complain about `operator char *()' beating
3758 `operator const char *() const'.
3760 2000-07-04 scott snyder <snyder@fnal.gov>
3761 Jason Merrill <jason@redhat.com>
3763 * repo.c (repo_get_id): Handle the case where a class with virtual
3764 bases has a null TYPE_BINFO_VTABLE.
3766 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
3767 Jason Merrill <jason@redhat.com>
3769 * parse.y (member_init): Just pass in the type.
3770 * init.c (expand_member_init): Handle getting a type.
3772 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3773 Jason Merrill <jason@redhat.com>
3775 * decl.c (finish_function): Warn if a function has no return
3777 Suggested by Andrew Koenig.
3778 * typeck.c (check_return_expr): Do set current_function_returns_value
3779 if we got an error_mark_node.
3781 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
3783 * decl2.c (push_decl_namespace): Push the original namespace.
3785 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
3787 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
3788 * semantics.c (begin_class_definition): Clear it.
3790 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
3792 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
3793 (genrtl_expr_stmt): Likewise.
3794 (genrtl_decl_stmt): Likewise.
3795 (genrtl_if_stmt): Likewise.
3796 (genrtl_while_stmt): Likewise.
3797 (genrtl_do_stmt): Likewise.
3798 (genrtl_return_stmt): Likewise.
3799 (genrtl_for_stmt): Likewise.
3800 (genrtl_break_stmt): Likewise.
3801 (genrtl_continue_stmt): Likewise.
3802 (genrtl_scope_stmt): Likewise.
3803 (genrtl_switch_stmt): Likewise.
3804 (genrtl_case_label): Likewise.
3805 (genrtl_begin_compound_stmt): Likewise.
3806 (genrtl_finish_compound_stmt): Likewise.
3807 (genrtl_compound_stmt): Likewise.
3808 (genrtl_asm_stmt): Likewise.
3810 * init.c (begin_init_stmts): Remove call to
3811 genrtl_begin_compound_stmt.
3812 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
3814 * semantics.c (lang_expand_stmt): Changed call to
3815 genrtl_compound_stmt to ignore return value.
3817 2000-07-02 Mark Mitchell <mark@codesourcery.com>
3819 * mangle.c (canonicalize_for_substitution): Return the canonical
3822 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
3824 * typeck.c (commonparms): Remove obstack manipulations.
3826 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
3828 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
3830 * Makefile.in (OBJS): Added ../c-semantics.o.
3831 (OBJDEPS): Likewise.
3833 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
3835 (struct stmt_tree): Added comment.
3836 (current_function_name_declared): Removed.
3837 (stmts_are_full_exprs_p): Likewise.
3838 (genrtl_do_pushlevel): Likewise.
3839 (genrtl_clear_out_block): Likewise.
3840 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
3841 (DECL_ANON_UNION_ELEMS): Likewise.
3842 (emit_local_var): Likewise.
3843 (make_rtl_for_local_static): Likewise.
3844 (do_case): Likewise.
3845 (expand_stmt): Likewise.
3846 (genrtl_decl_cleanup): Likewise.
3847 (c_expand_asm_operands): Likewise.
3848 (c_expand_return): Likewise.
3849 (c_expand_start_case): Likewise.
3851 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
3852 (emit_local_var): Likewise.
3853 (initialize_local_var): Change reference to
3854 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
3855 Change reference to stmts_are_full_exprs_p to
3856 current_stmt_tree->stmts_are_full_exprs_p.
3857 (push_cp_function_context): Likewise.
3859 * expect.c (expand_throw): Change reference to
3860 stmts_are_full_exprs_p.
3862 * init.c (build_aggr_init): Change reference to
3863 stmts_are_full_exprs_p.
3864 (build_vec_init): Likewise.
3866 * optimize.c (maybe_clone_body): Change reference to
3867 current_function_name_declared to
3868 cp_function_chain->name_declared.
3870 * pt.c (instantiate_decl): Change reference to
3871 current_function_name_declared to
3872 cp_function_chain->name_declared.
3874 * semantics.c (expand_cond): Moved declaration to c-common.h.
3875 (genrtl_do_pushlevel): Moved to c-semantics.c.
3876 (genrtl_clear_out_block): Likewise.
3877 (genrtl_goto_stmt): Likewise.
3878 (genrtl_expr_stmt): Likewise.
3879 (genrtl_decl_stmt): Likewise.
3880 (gerntl_if_stmt): Likewise.
3881 (genrtl_while_stmt): Likewise.
3882 (genrtl_do_stmt): Likewise.
3883 (genrtl_return_stmt): Likewise.
3884 (genrtl_for_stmt): Likewise.
3885 (genrtl_break_stmt): Likewise.
3886 (genrtl_continue_stmt): Likewise.
3887 (genrtl_scope_stmt): Likewise.
3888 (genrtl_switch_stmt): Likewise.
3889 (genrtl_case_label): Likewise.
3890 (genrtl_begin_compound_stmt): Likewise.
3891 (genrtl_finish_compound_stmt): Likewise.
3892 (genrtl_compound_stmt): Likewise.
3893 (genrtl_asm_stmt): Likewise.
3894 (genrtl_decl_cleanup): Likewise.
3895 (expand_cond): Likewise.
3896 (expand_stmt): Renamed to ...
3897 (lang_expand_stmt): ... this.
3898 (lang_expand_expr_stmt): Initialize.
3899 (set_current_function_name_declared): Likewise.
3900 (stmts_are_full_exprs_p): Likewise.
3901 (current_function_name_declared): Likewise.
3902 (anon_aggr_type_p): Likewise.
3903 (do_poplevel): Change reference to
3904 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
3905 Change reference to stmts_are_full_exprs_p to
3906 current_stmt_tree->stmts_are_full_exprs_p.
3907 (add_tree): Likewise.
3908 (finish_expr_stmt): Likewise.
3909 (prep_stmt): Likewise.
3910 (lang_expand_stmt): Likewise.
3911 (begin_compound_stmt): Change reference to
3912 current_function_name_declared to
3913 cp_function_chain->name_declared and call to
3914 current_function_name_declared().
3915 (setup_vtbl_ptr): Likewise.
3916 (genrtl_do_poplevel): Removed.
3918 2000-06-30 Jason Merrill <jason@redhat.com>
3920 * init.c (init_init_processing): Go back to aligning like
3921 double_type_node for old ABI.
3922 (get_cookie_size): Make cookie larger if we get a type that needs
3924 (build_vec_delete): Call it.
3926 * typeck.c (qualify_type_recursive): New fn.
3927 (composite_pointer_type): Use it.
3928 (build_binary_op): Use composite_pointer_type.
3930 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
3931 Jason Merrill <jason@redhat.com>
3933 * typeck.c (check_return_expr): Don't complain about returning
3934 NULL from operator new if -fcheck-new.
3935 * cp-tree.h: Declare flag_check_new here.
3938 2000-06-28 Alex Samuel <samuel@codesourcery.com>
3940 * mangle.c (find_substitution): Use same_type_p.
3941 (write_encoding): Don't check for substitutions.
3943 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
3945 * parse.y (expr_no_comma_rangle): New non-terminal.
3946 (template_parm): Use it for default parameter case.
3947 (template_arg): Use it.
3948 (expr_no_commas): Remove commented out undefined extensions.
3949 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
3950 * parse.h, parse.c: Rebuilt.
3952 2000-06-30 Mark Mitchell <mark@codesourcery.com>
3954 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
3955 (finish_asm_stmt): Do it here, instead.
3957 * cp-tree.h (ridpointers): Don't declare.
3958 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
3959 (record_builtin_java_type): Likewise.
3960 (init_decl_processing): Likewise.
3961 * lex.c: Move inclusion of lex.h.
3962 (ridpointers): Don't define.
3963 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
3965 * lex.h (enum rid): Rename to ...
3966 (enum cp_rid): ... this.
3967 (ridpointers): Don't declare.
3968 * parse.y: Move inclusion of lex.h.
3969 * parse.c: Regenerated.
3970 * spew.c: Move inclusion of lex.h.
3972 * cp-tree.h (struct language_function): Remove temp_name_counter.
3973 (temp_name_counter): Remove.
3974 (get_temp_name): Change prototype.
3975 (get_guard): New function.
3976 (get_guard_cond): Likewise.
3977 (set_guard): Likewise.
3978 * cvt.c (build_up_reference): Adjust call to get_temp_name.
3979 * decl.c (expand_static_init): Use get_guard and friends to
3980 implement guard variables.
3981 * decl2.c (get_temp_name): Assume that the variables created are
3983 (get_sentry): Rename to ...
3984 (get_guard): ... this. Implement new ABI guard variables.
3985 (get_guard_bits): New function.
3986 (get_guard_cond): Likewise.
3987 (set_guard): Likewise.
3988 (start_static_initialization_or_destruction): Use them.
3989 (do_static_initialization): Replace sentry with guard throughout.
3990 (do_static_destruction): Likewise.
3991 * init.c (create_temporary_var): Add comment.
3993 2000-06-28 Alex Samuel <samuel@codesourcery.com>
3995 * mangle.c (find_substitution): Use same_type_p.
3996 (write_encoding): Don't check for substitutions.
3998 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
4000 * parse.y (expr_no_comma_rangle): New non-terminal.
4001 (template_parm): Use it for default parameter case.
4002 (template_arg): Use it.
4003 (expr_no_commas): Remove commented out undefined extensions.
4004 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
4005 * parse.h, parse.c: Rebuilt.
4007 2000-06-29 Mark Mitchell <mark@codesourcery.com>
4009 * cp-tree.h (flag_const_strings): Remove.
4010 (warn_parentheses): Likewise.
4011 (warn_format): Likewise.
4012 (common_type): Likewise.
4013 (default_conversion): Likewise.
4014 (build_binary_op): Likewise.
4015 (cp_build_binary_op): New macro.
4016 * call.c (build_new_op): Use cp_build_binary_op instead of
4018 * class.c (build_vtable_entry_ref): Likewise.
4019 * decl.c (expand_static_init): Likewise.
4020 (compute_array_index_type): Likewise.
4021 (build_enumerator): Likewise.
4022 * decl2.c (delete_sanity): Likewise.
4023 (start_static_initialization_or_destruction): Likewise.
4024 * error.c (dump_type_suffix): Likewise.
4025 * init.c (resolve_offset_ref): Likewise.
4026 (build_new): Likewise.
4027 (build_new_1): Likewise.
4028 (build_vec_delete_1): Likewise.
4029 (build_vec_init): Likewise.
4030 (build_delete): Likewise.
4031 * rtti.c (synthesize_tinfo_fn): Likewise.
4032 (synthesize_tinfo_var): Likewise.
4033 * search.c (expand_upcast_fixups): Likewise.
4034 (fixup_all_virtual_upcast_offsets): Likewise.
4035 * typeck.c (build_array_ref): Likewise.
4036 (get_member_function_from_ptrfunc): Likewise.
4037 (build_binary_op): Add parameter.
4038 (pointer_int_sum): Use cp_build_binary_op.
4039 (pointer_diff): Likewise.
4040 (build_modify_expr): Likewise.
4041 (get_delta_difference): Likewise.
4042 (build_ptrmemfunc): Likewise.
4044 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
4046 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
4047 * decl.c (create_implicit_typedef): Adjust.
4048 * decl2.c (build_artificial_parm): Adjust.
4049 * method.c (implicitly_declare_fn): Adjust.
4050 * pt.c (push_inline_template_parms_recursive): Adjust.
4051 (process_template_parm): Adjust.
4052 (overloaded_template_name): Adjust.
4053 * semantics.c (finish_template_template_parm): Adjust.
4055 2000-06-28 Mark Mitchell <mark@codesourcery.com>
4057 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
4058 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
4059 where to emit thunks.
4060 (build_vtt): Adjust call to build_vtt_inits.
4061 (build_vtt_inits): Add parameter to indicate whether or not
4062 sub-VTTs for virtual bases should be included. Adjust handling of
4063 construction vtables.
4064 (get_matching_base): New function.
4065 (dfs_build_vtt_inits): Rename to ...
4066 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
4067 construction vtables.
4068 (dfs_fixup_binfo_vtbls): Likewise.
4069 (build_ctor_vtbl_groups): Build construction vtables for virtual
4071 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
4072 to build construction vtbls.
4073 (dfs_accumulate_vtbl_inits): Adjust handling of
4074 construction vtables.
4076 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
4079 2000-06-27 Mark Mitchell <mark@codesourcery.com>
4081 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
4083 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
4085 * search.c (hides): Remove.
4086 (is_subobject_of_p): Add most_derived parameter. Use
4088 (lookup_field_queue_p): Adjust.
4089 (lookup_field_r): Adjust.
4091 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
4093 * decl2.c (handle_class_head): Bash typedefs to the type's main
4096 2000-06-25 Mark Mitchell <mark@codesourcery.com>
4098 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
4099 (begin_global_stmt_expr): ... this.
4100 (genrtl_finish_stmt_expr): Rename to ...
4101 (finish_global_stmt_expr): ... this.
4102 * init.c (begin_init_stmts): Adjust calls.
4103 (finish_init_stmts): Likewise.
4104 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
4105 (begin_global_stmt_expr): ... this.
4106 (genrtl_finish_stmt_expr): Rename to ...
4107 (finish_global_stmt_expr): ... this.
4109 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4111 * search.c (lookup_member): Fix typo in comment.
4113 2000-06-24 Jason Merrill <jason@redhat.com>
4115 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
4116 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
4118 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4120 * parse.y (complex_direct_notype_declarator): Support global_scope.
4121 * Makefile.in: Adjust conflict count.
4123 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
4125 * parse.y (template_arg): Convert TEMPLATE_DECL
4126 that is a template template paramter to
4127 TEMPLATE_TEMPLATE_PARM here.
4129 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4130 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
4131 (copy_template_template_parm): Adjust prototype.
4132 * decl.c (grokdeclarator): Remove dead code.
4133 * pt.c (process_template_parm): Tidy.
4134 (lookup_template_class): Construct nodes in
4135 copy_template_template_parm.
4136 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
4137 lookup_template_class. Use TYPE_TI_TEMPLATE.
4138 * tree.c (copy_template_template_parm): Add NEWARGS
4140 (mapcar): Adjust call to copy_template_template_parm.
4141 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
4142 * method.c (build_template_template_parm_names): Change error
4143 code to avoid compilation warning.
4145 * gxxint.texi: Document template template parameter
4148 2000-06-21 Alex Samuel <samuel@codesourcery.com>
4150 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
4151 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
4152 (cp-demangle.o): New rule.
4153 (dyn-string.o): Likewise.
4154 * inc/cxxabi.h (__cxa_demangle): New declaration.
4156 2000-06-22 Mark Mitchell <mark@codesourcery.com>
4158 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
4159 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
4160 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
4162 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
4163 (make_thunk): Change prototype.
4164 (emit_thunk): Rename to use_thunk.
4165 (mangle_thunk): Change prototype.
4166 * class.c (get_derived_offset): Simplify.
4167 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
4168 BV_GENERATE_THUNK_WITH_VTABLE_P.
4169 (build_primary_vtable): Simplify.
4170 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
4171 (dfs_find_base): Remove.
4172 (update_vtable_entry_for_fn): Correct bug in finding the base
4173 where a virtual function was first declared. Figure out whether
4174 or not to emit a vcall-thunk with the vtables in which it appears.
4175 Correct logic for deciding whether to use an ordinary thunk, or a
4177 (finish_struct_1): Remove unnecssary code.
4178 (build_vtbl_initializer): Use ssize_int for the running counter of
4180 (build_vtbl_initializer): Only use vcall thunks where necessary.
4181 Mark thunks as needing to be emitted with their vtables, or not.
4182 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
4183 indices. Use size_binop.
4184 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
4185 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
4187 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
4188 (build_vtable_entry): Mark thunks as needing to be emitted with
4189 their vtables, or not.
4190 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
4191 * decl2.c (mark_vtable_entries): Use use_thunk instead of
4193 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
4195 * error.c (dump_expr): Use BV_FN.
4196 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
4198 * method.c (make_thunk): Likewise.
4199 (emit_thunk): Rename to use_thunk. Allow callers to decide
4200 whether or not to actually emit the thunk. Adjust for changes in
4201 representation of vcall offsets.
4202 * search.c (dfs_get_pure_virtuals): Use BV_FN.
4203 * semantics.c (emit_associated_thunks): New function.
4204 (expand_body): Use it.
4205 * ir.texi: Adjust decriptions of thunks.
4207 2000-06-22 Jason Merrill <jason@redhat.com>
4209 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
4210 (tsubst_friend_function): Copy it here.
4212 * decl.c (grok_op_properties): Fix typo.
4214 * decl2.c (delete_sanity): Clarify warning, avoid failure on
4217 * pt.c (check_explicit_specialization): Clarify error.
4219 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
4220 an old OVERLOAD when we're declaring a non-function.
4221 (pushdecl, destroy_local_var): Check for error_mark_node.
4222 (warn_extern_redeclared_static): Also bail early if
4224 (push_overloaded_decl): Ignore an old error_mark_node.
4226 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
4228 * call.c (build_x_va_arg): Check if in a template decl.
4229 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
4231 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4233 * class.c (push_lang_context): TYPE_NAME gets you to the Java
4235 * decl.c (check_goto): Computed gotos assumed OK.
4237 2000-06-20 Jason Merrill <jason@redhat.com>
4239 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
4240 for which we don't need to look for instantiations.
4242 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
4244 * parse.y (program): Always call finish_translation_unit.
4245 * parse.c, parse.h: Rebuilt.
4247 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
4249 * method.c: Don't include hard-reg-set.h.
4251 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
4253 * rtti.c (get_base_offset): Cope when vbase field is in a base.
4255 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
4257 * call.c (build_conditional_expr): Use VOID_TYPE_P.
4258 * cvt.c (cp_convert_to_pointer): Likewise.
4259 (convert_to_void): Likewise.
4260 * error.c (dump_expr): Likewise.
4261 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
4262 * init.c (build_delete): Likewise.
4263 * method.c (emit_thunk): Likewise.
4264 * optmize.c (declare_return_variable): Likewise.
4265 * rtti.c (get_tinfo_decl_dynamic): Likewise.
4266 (get_typeid): Likewise.
4267 (build_dynamic_cast_1): Likewise.
4268 * typeck.c (composite_pointer_type): Likewise.
4269 (common_type): Likewise.
4270 (build_indirect_ref): Likewise.
4271 (build_binary_op): Likewise.
4272 (build_x_compound_expr): Likewise.
4273 (check_return_expr): Likewise.
4274 * typeck2.c (add_exception_specifier): Likewise.
4276 * mangle.c (write_method_parms): Use direct comparison for end
4279 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
4281 * cp-tree.h (genrtl_try_block): Declare function.
4282 (genrtl_handler): Likewise.
4283 (genrtl_catch_block): Likewise.
4284 (genrtl_ctor_stmt): Likewise.
4285 (genrtl_subobject): Likewise.
4286 (genrtl_decl_cleanup): Likewise.
4287 (genrtl_do_poplevel): Likewise.
4288 (genrtl_do_pushlevel): Likewise.
4289 (genrtl_clear_out_block): Likewise.
4290 (genrtl_goto_stmt): Likewise.
4291 (genrtl_expr_stmt): Likewise.
4292 (genrtl_decl_stmt): Likewise.
4293 (genrtl_if_stmt): Likewise.
4294 (genrtl_while_stmt): Likewise.
4295 (genrtl_do_stmt): Likewise.
4296 (genrtl_return_stmt): Likewise.
4297 (genrtl_for_stmt): Likewise.
4298 (genrtl_break_stmt): Likewise.
4299 (genrtl_continue_stmt): Likewise.
4300 (genrtl_scope_stmt): Likewise.
4301 (genrtl_switch_stmt): Likewise.
4302 (genrtl_case_label): Likewise.
4303 (genrtl_begin_compound_stmt): Likewise.
4304 (genrtl_finish_compound_stmt): Likewise.
4305 (genrtl_compound_stmt): Likewise.
4306 (genrtl_asm_stmt): Likewise.
4307 (genrtl_named_return_value): Likewise.
4308 (genrtl_begin_stmt_expr): Likewise.
4309 (genrtl_finish_stmt_expr): Likewise.
4310 (finish_for_stmt): Removed first argument.
4311 (finish_switch_stmt): Likewise.
4313 * semantics.c (genrtl_try_block): Define function.
4314 (genrtl_handler): Likewise.
4315 (genrtl_catch_block): Likewise.
4316 (genrtl_ctor_stmt): Likewise.
4317 (genrtl_subobject): Likewise.
4318 (genrtl_decl_cleanup): Likewise.
4319 (genrtl_do_poplevel): Likewise.
4320 (genrtl_do_pushlevel): Likewise.
4321 (genrtl_clear_out_block): Likewise.
4322 (genrtl_goto_stmt): Likewise.
4323 (genrtl_expr_stmt): Likewise.
4324 (genrtl_decl_stmt): Likewise.
4325 (genrtl_if_stmt): Likewise.
4326 (genrtl_while_stmt): Likewise.
4327 (genrtl_do_stmt): Likewise.
4328 (genrtl_return_stmt): Likewise.
4329 (genrtl_for_stmt): Likewise.
4330 (genrtl_break_stmt): Likewise.
4331 (genrtl_continue_stmt): Likewise.
4332 (genrtl_scope_stmt): Likewise.
4333 (genrtl_switch_stmt): Likewise.
4334 (genrtl_case_label): Likewise.
4335 (genrtl_begin_compound_stmt): Likewise.
4336 (genrtl_finish_compound_stmt): Likewise.
4337 (genrtl_compound_stmt): Likewise.
4338 (genrtl_asm_stmt): Likewise.
4339 (genrtl_named_return_value): Likewise.
4340 (genrtl_begin_stmt_expr): Likewise.
4341 (genrtl_finish_stmt_expr): Likewise.
4342 (finish_for_stmt): Removed first argument and generate rtl
4344 (finish_switch_stmt): Likewise.
4345 (do_poplevel): Removed generate rtl specific code.
4346 (do_pushlevel): Likewise.
4347 (add_tree): Likewise.
4348 (finish_goto_stmt): Likewise.
4349 (finish_expr_stmt): Likewise.
4350 (begin_if_stmt): Likewise.
4351 (finish_if_stmt_cond): Likewise.
4352 (finish_then_clause): Likewise.
4353 (begin_else_clause): Likewise.
4354 (finish_else_clause): Likewise.
4355 (finish_if_stmt): Likewise.
4356 (clear_out_block): Likewise.
4357 (begin_while_stmt): Likewise.
4358 (finish_while_stmt_cond): Likewise.
4359 (finish_while_stmt): Likewise.
4360 (begin_do_stmt): Likewise.
4361 (finish_do_body): Likewise.
4362 (finish_do_stmt): Likewise.
4363 (finish_return_stmt): Likewise.
4364 (begin_for_stmt): Likewise.
4365 (finish_for_init_stmt): Likewise.
4366 (finish_for_cond): Likewise.
4367 (finish_for_expr): Likewise.
4368 (finish_break_stmt): Likewise.
4369 (finish_continue_stmt): Likewise.
4370 (begin_switch_stmt): Likewise.
4371 (finish_switch_cond): Likewise.
4372 (finish_case_label): Likewise.
4373 (begin_try_block): Likewise.
4374 (begin_function_try_block): Likewise.
4375 (finish_try_block): Likewise.
4376 (finish_cleanup_try_block): Likewise.
4377 (finish_cleanup): Likewise.
4378 (finish_function_try_block): Likewise.
4379 (finish_handler_sequence): Likewise.
4380 (finish_function_handler_sequence): Likewise.
4381 (begin_handler): Likewise.
4382 (finish_handler_parms): Likewise.
4383 (begin_catch_block): Likewise.
4384 (finish_handler): Likewise.
4385 (begin_compound_stmt): Likewise.
4386 (finish_compound_stmt): Likewise.
4387 (finish_asm_stmt): Likewise.
4388 (finish_label_stmt): Likewise.
4389 (finish_label_decl): Likewise.
4390 (finish_subobject): Likewise.
4391 (finish_decl_cleanup): Likewise.
4392 (finish_named_return_value): Likewise.
4393 (begin_stmt_expr): Likewise.
4394 (finish_stmt_expr): Likewise.
4396 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
4397 to call genrtl_expr_stmt when appropriate.
4399 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
4400 begin_compound_expr to call genrtl_begin_stmt_expr and
4401 genrtl_begin_compound_expr when appropriate.
4402 (finish_init_stmts): Changed calls to finish_compound_expr and
4403 finish_stmt_expr to call genrtl_finish_compound_expr and
4404 genrtl_finish_stmt_expr when appropriate.
4405 (expand_default_init): Changed call to finish_expr_stmt to call
4406 genrtl_expr_stmt when appropriate.
4407 (build_vec_init): Likewise.
4409 * parse.y (simple_stmt): Removed first argument from call to
4410 finish_for_stmt. Removed first argument from call to
4413 * parse.c: Regenerated.
4415 * pt.c (tsubst_expr): Removed first argument from call to
4416 finish_for_stmt. Removed first argument from call to
4419 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
4421 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
4422 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
4424 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
4425 (cplus_tree_code_length[]): Likewise.
4426 (cplus_tree_code_name[]): Likewise.
4427 (init_parse): Added call to add_c_tree_codes. Changed
4428 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
4430 2000-06-16 Mark Mitchell <mark@codesourcery.com>
4432 * cp-tree.h (finish_mem_initializers): Declare.
4433 (count_trees): Likewise.
4434 * parse.y (base_init): Use finish_mem_initializers.
4435 * semantics.c (finish_mem_initializers): New function.
4437 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
4438 the number of trees.
4440 (count_trees): Don't use it.
4442 2000-06-15 Jason Merrill <jason@redhat.com>
4444 * tree.c (count_trees): New debugging function.
4446 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
4447 * init.c (build_member_call): Pull out the name of a DECL.
4449 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
4450 * semantics.c (expand_body): Push to TV_INTEGRATION here.
4451 * optimize.c (optimize_function): Not here.
4452 * pt.c (instantiate_decl): Push to TV_PARSE.
4454 2000-06-15 Mark Mitchell <mark@codesourcery.com>
4456 * cp-tree.h (struct language_function): Remove x_base_init_list
4457 and x_member_init_list.
4458 (current_base_init_list): Remove.
4459 (current_member_init_list): Likewise.
4460 (setup_vtbl_ptr): Change prototype.
4461 (emit_base_init): Likewise.
4462 (expand_member_init): Likewise.
4463 (reinit_parse_for_function): Remove.
4464 * decl.c (save_function_data): Don't clear x_base_init_list and
4466 (mark_language_function): Don't mark them.
4467 * init.c (perform_member_init): Tweak comment.
4468 (sort_member_init): Take the list of initializers as an argument.
4469 (sort_base_init): Likewise.
4470 (emit_base_init): Likewise.
4471 (expand_member_init): Return the initializer. Don't use global
4473 * lex.c (reinit_parse_for_function): Remove.
4474 * method.c (build_template_parm_names): Correct substitution.
4475 (do_build_copy_constructor): Don't use current_member_init_list
4476 and current_base_init_list.
4477 (synthesize_method): Likewise.
4478 * parse.y (base_init): Split mem-initializers into
4479 base-initializers and field-initializers.
4480 (member_init_list): Build up the list here.
4481 (member_init): Return the initializer.
4482 (fn.depfn): Don't use reinit_parse_for_function.
4483 * parse.c: Regenerated.
4484 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
4486 (tsubst_expr): Don't use current_member_init_list
4487 and current_base_init_list.
4488 (tsubst_expr_values): Rename to ...
4489 (tsubst_initializer_list): ... this. Use convert_from_reference.
4490 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
4491 and current_base_init_list.
4492 (begin_function_definition): Don't call reinit_parse_for_function.
4494 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
4496 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
4499 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
4501 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
4503 * cp-tree.h (IF_COND): Move to c-common.h.
4504 (THEN_CLAUSE): Likewise.
4505 (ELSE_CLAUSE): Likewise.
4506 (WHILE_COND): Likewise.
4507 (WHILE_BODY): Likewise.
4508 (DO_COND): Likewise.
4509 (DO_BODY): Likewise.
4510 (RETURN_EXPR): Likewise.
4511 (EXPR_STMT_EXPR): Likewise.
4512 (FOR_INIT_STMT): Likewise.
4513 (FOR_COND): Likewise.
4514 (FOR_EXPR): Likewise.
4515 (FOR_BODY): Likewise.
4516 (SWITCH_COND): Likewise.
4517 (SWITCH_BODY): Likewise.
4518 (CASE_LOW): Likewise.
4519 (CASE_HIGH): Likewise.
4520 (GOTO_DESTINATION): Likewise.
4521 (COMPOUND_BODY): Likewise.
4522 (ASM_CV_QUAL): Likewise.
4523 (ASM_STRING): Likewise.
4524 (ASM_OUTPUTS): Likewise.
4525 (ASM_INPUTS): Likewise.
4526 (ASM_CLOBBERS): Likewise.
4527 (DECL_STMT_DECL): Likewise.
4528 (STMT_EXPR_STMT): Likewise.
4529 (LABEL_STMT_LABEL): Likewise.
4530 (SCOPE_BEGIN_P): Likewise.
4531 (SCOPE_END_P): Likewise.
4532 (SCOPE_STMT_BLOCK): Likewise.
4533 (SCOPE_NULLIFIED_P): Likewise.
4534 (SCOPE_NO_CLEANUPS_P): Likewise.
4535 (SCOPE_PARTIAL_P): Likewise.
4536 (ASM_VOLATILE_P): Likewise.
4537 (STMT_LINENO): Likewise.
4538 (STMT_LINENO_FOR_FN_P): Likewise.
4540 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
4541 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
4542 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
4543 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
4544 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
4546 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
4548 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
4549 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
4551 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
4552 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
4553 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
4555 2000-06-14 Mark Mitchell <mark@codesourcery.com>
4557 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
4558 * class.c (dfs_find_final_overrider): Set it appropriately.
4559 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
4560 avoid unneeded secondary vptrs.
4562 2000-06-13 Jakub Jelinek <jakub@redhat.com>
4564 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
4565 (check_bitfield_decl, check_field_decl): Likewise.
4566 (build_vtbl_or_vbase_field, build_base_field): Likewise.
4567 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
4568 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
4569 (xfer_tag, finish_enum): Likewise.
4570 * decl2.c (finish_builtin_type): Likewise.
4571 * init.c (init_init_processing): Likewise.
4572 * pt.c (instantiate_class_template): Likewise.
4573 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
4574 * cp-tree.h (struct lang_type): Add user_align member.
4575 (CLASSTYPE_USER_ALIGN): Define.
4577 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4579 * Make-lang.in (c++.install-common): Install g++-cross in
4580 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
4581 $(target_alias)-g++ and $(target_alias)-c++.
4583 2000-06-12 Mark Mitchell <mark@codesourcery.com>
4585 * class.c (vcall_offset_data_s): Add last_init and fns.
4586 (overrides): Rename to same_signature_p.
4587 (dfs_find_final_overrider): Adjust accordingly.
4588 (mark_overriders): Likewise.
4589 (warn_hidden): Likewise.
4590 (build_vtbl_initializer): Reorganize machinery for building things
4591 at negative offsets.
4592 (build_vcall_and_vbase_vtbl_entries): Likewise.
4593 (build_vbase_offset_vtbl_entries): Likewise.
4594 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
4595 offset entries. Do not create two entries for functions with the
4597 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
4598 (build_rtti_vtbl_entries): Reorganize machinery for building things
4599 at negative offsets.
4601 * optimize.c (expand_call_inline): Don't recurse into the code
4602 used to initialize the parameters more than once.
4604 2000-06-11 Mark Mitchell <mark@codesourcery.com>
4606 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
4607 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
4608 (find_substitution): Only use the `Sa' substitution for
4609 std::allocator, not instantiations of it.
4610 (write_template_prefix): Move comment. Only use a TREE_LIST to
4611 represent substitutions for a member template.
4612 (write_array_type): Mangle array dimensions correctly.
4613 * optimize.c (maybe_clone_body): Copy more information from the
4615 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
4616 on the regenerated declaration.
4618 2000-06-11 Chip Salzenberg <chip@valinux.com>
4619 Mark Mitchell <mark@codesourcery.com>
4621 * class.c (build_vtable): Clarify comment.
4622 (build_ctor_vtbl_group): Pass the most derived type to
4625 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4627 * decl2.c (compare_options): Don't needlessly cast away const-ness.
4629 2000-06-10 Mark Mitchell <mark@codesourcery.com>
4631 * decl.c (add_binding): Handle duplicate declarations of external
4634 2000-06-09 Chip Salzenberg <chip@valinux.com>
4635 Mark Mitchell <mark@codesourcery.com>
4637 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
4639 (write_signed_number): New macro.
4640 (write_unsigned_number): Likewise.
4641 (write_source_name): Use them.
4642 (write_number): Handle signed and unsigned values.
4643 (write_integer_cst): Use tree_int_cst_sgn, and use
4644 write_unsigned_number or write_signed_number as appropriate.
4645 (write_discriminator): Use write_unsigned_number or
4646 write_signed_number as appropriate.
4647 (write_template_arg_literal): Likewise.
4648 (write_array_type): Use tree_low_cst.
4649 (write_template_parm): Use write_unsigned_number or
4650 write_signed_number as appropriate.
4651 (write_substitution): Adjust call to write_number.
4652 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
4653 (write_expression): Handle non-type template arguments of
4654 reference type correctly.
4655 (mangle_thunk): Use write_signed_number.
4657 2000-06-09 Chip Salzenberg <chip@valinux.com>
4659 * mangle.c (find_substition): Don't mangle objects with typename
4660 substitutions (e.g. "cin" as "Si").
4662 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
4664 * call.c (add_candidate): Use ggc_alloc_cleared.
4665 * decl.c (lookup_label): Likewise.
4666 * lex.c (retrofit_lang_decl): Likewise.
4668 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
4670 * semantics.c (expand_body): Push to TV_EXPAND.
4671 * optimize.c (optimize_function): Push to TV_INTEGRATION.
4672 * decl.c (start_function): Always call announce_function.
4674 * tinfo2.cc: Just declare abort.
4676 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
4678 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
4679 whenever @ is a symbolic name.
4681 2000-06-08 Jakub Jelinek <jakub@redhat.com>
4683 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
4685 2000-06-07 Mark Mitchell <mark@codesourcery.com>
4687 * decl.c (pushdecl): Look up functions by DECL_NAME, not
4688 DECL_ASSEMBLER_NAME.
4690 2000-06-06 Mark Mitchell <mark@codesourcery.com>
4692 * decl2.c (c_language): Define.
4694 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
4696 * lex.c (lang_init_options): Tweak.
4698 * decl2.c: Remove #inclusion of diagnostic.h
4699 (lang_decode_option): Move diagnostic formatting options to
4702 * lang-options.h: Remove documentation for diagnostic options.
4704 * Makefile.in (lex.o): Depends upon diagnostic.h
4706 2000-06-06 Mark Mitchell <mark@codesourcery.com>
4708 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
4709 the same DECL_RESULT, it's not a redefinition.
4710 * pt.c (tsubst_decl): Remove code to handle illegal
4713 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
4715 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
4717 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
4719 * search.c (maybe_suppress_debug_info): Don't check
4720 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
4722 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
4725 Remember instantiation context in deferred instantiations.
4726 * cp-tree.h (struct tinst_level): Remove.
4727 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
4728 * pt.c (current_tinst_level): Now a tree.
4729 (print_template_context, push_tinst_level, pop_tinst_level,
4730 tinst_for_decl): Adjust.
4731 (reopen_tinst_level): New fn.
4732 (init_pt): Register current_tinst_level as a root.
4733 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
4734 of the pending templates list.
4735 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
4736 * lex.c (extract_interface_info): Adjust.
4737 * decl2.c (warn_if_unknown_interface): Adjust.
4739 2000-06-05 Mark Mitchell <mark@codesourcery.com>
4741 * class.c (indirect_primary_base_p): New function.
4742 (determine_primary_base): Use it.
4744 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
4746 Update new-abi dynamic cast algorithm.
4747 * tinfo.cc (__class_type_info::__dyncast_result): Add
4748 whole_details. Adjust constructor.
4749 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
4750 Avoid unnecessary searching.
4751 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
4753 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4755 * decl.c (init_decl_processing): Don't call record_component_aliases.
4756 * tree.c (build_cplus_array_type_1): Likewise.
4758 2000-06-04 Mark Mitchell <mark@codesourcery.com>
4760 * ir.texi: Correct typo.
4761 * mangle.c (write_expression): Handle non-type template arguments
4762 with reference type.
4763 * method.c (build_overload_value): Likewise.
4764 * pt.c (convert_nontype_argument): Explicitly represent conversion
4765 to a reference with an ADDR_EXPR.
4766 (unify): Always unify arguments in left-to-right order.
4768 2000-06-03 Alex Samuel <samuel@codesourcery.com>
4769 Mark Mitchell <mark@codesourcery.com>
4771 * Make-lang.in (CXX_SRCS): Add mangle.c.
4772 * Makefile.in (CXX_OBJS): Add mangle.o.
4773 (mangle.o): New rule.
4775 * class.c (local_classes): New variable.
4776 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
4777 (get_vtt_name): Use mangle_vtt_name for new ABI.
4778 (init_class_processing): Initialize local_classes.
4779 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
4780 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
4781 (std_identifier): New macro.
4782 (DECL_VOLATILE_MEMFUNC_P): New macro.
4783 (DECL_NAMESPACE_STD_P): Likewise.
4784 (local_classes): Declare.
4785 (get_mostly_instantiated_function_type): Declare.
4786 (init_mangle): Declare.
4787 (mangle_decl): Likewise.
4788 (mangle_type_string): Likewise.
4789 (mangle_type): Likewise.
4790 (mangle_typeinfo_for_type): Likewise.
4791 (mangle_typeinfo_string_for_type): Likewise.
4792 (mangle_vtbl_for_type): Likewise.
4793 (mangle_vtt_for_type): Likewise.
4794 (mangle_ctor_vtbl_for_type): Likewise.
4795 (mangle_thunk): Likewise.
4796 (mangle_conv_op_name_for_type): Likewise.
4797 (mangle_guard_variable): Likewise.
4798 * decl.c (pushtag): Keep track of local classes.
4799 (initialize_predefined_identifiers): Initialize std_identifier.
4800 (init_decl_processing): Use std_identifier.
4801 (start_decl): Don't treat instantiations as specializations.
4802 (grokdeclarator): Likewise.
4803 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
4804 name for fully-instantiated templates.
4805 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
4806 destructors with the new ABI.
4807 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
4808 (grokfield): Use mangle_type for new ABI.
4809 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
4810 (get_sentry): Use mangle_guard_variable for new ABI.
4811 (start_static_initialization_or_destruction): Likewise.
4812 * expr.c (extract_aggr_init): Remove.
4813 (extract_scalar_init): Likewise.
4814 (extract_init): Remove #if 0'd code.
4815 * mangle.c: New function.
4816 * method.c (build_mangled_name): Assert not flag_new_abi.
4817 (build_static_name): Likewise.
4818 (build_decl_overload_real): Likewise.
4819 (build_typename_overload): Likewise.
4820 (build_overload_with_type): Likewise.
4821 (build_overload_name): Likewise.
4822 (get_ctor_vtbl_name): Likewise.
4823 (start_squangling): Likewise.
4824 (get_id_2): Likewise.
4825 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
4826 (init_method): Call init_mangle for new ABI.
4827 (make_thunk): Call mangle_thunk for new ABI.
4828 * operators.def: Correct new ABI manglings for the `%' operator.
4830 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
4831 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
4832 (lookup_template_class): Call mangle_decl for new ABI.
4833 (get_mostly_instantiated_function_type): New function.
4834 (set_mangled_name_for_template_decl): Use it.
4835 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
4836 the new ABI. Use mangle_conv_op_name_for_type for instantiated
4837 conversion op names.
4838 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
4839 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
4840 (tinfo_base_init): Likewise. Mangle typeinfo string name with
4841 mangle_typeinfo_string_for_type.
4843 2000-06-03 Mark Mitchell <mark@codesourcery.com>
4845 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
4846 (INNERMOST_TEMPLATE_ARGS): New macro.
4847 (innermost_args): Remove.
4848 (get_innermost_template_args): New function.
4849 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
4850 * error.c (dump_function_decl): Be caution when using
4851 most_general_template.
4852 * method.c (build_template_parm_names): Use
4853 INNERMOST_TEMPLATE_ARGS.
4854 * pt.c (add_to_template_args): Tidy comment
4855 (get_innermost_template_args): New function.
4856 (check_explicit_specialization): Clear DECL_INITIAL for a new
4858 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
4860 (push_template_decl): Always register specializations of the most
4862 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
4863 (coerce_template_parms): Likewise.
4864 (lookup_template_class): Likewise.
4865 (innermost_args): Remove.
4866 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
4867 (tsubst_decl): Handle tricky specializations. Use
4868 get_innermost_template_args.
4869 (instantiate_template): Simplify handling of partial
4871 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
4872 (most_general_template): Reimplement, in a more straightforward
4874 (regenerate_decl_from_template): Tweak formatting. Use
4875 TMPL_ARGS_DEPTH for clarity.
4876 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
4878 * dump.c (dequeue_and_dump): Dump information about thunks.
4880 2000-06-01 Richard Henderson <rth@cygnus.com>
4882 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
4884 2000-06-01 Richard Henderson <rth@cygnus.com>
4886 * decl2.c (unsupported_options): Fix typo, make const.
4887 (lang_decode_option): Fix bsearch argument order.
4889 2000-06-01 Mark Mitchell <mark@codesourcery.com>
4891 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
4894 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4896 * cp-tree.h (c_get_alias_set): Deleted.
4897 * Makefile.in (decl.o): Include ../expr.h.
4898 * decl.c (expr.h): Include.
4899 (init_decl_processing): Call record_component_aliases for arrays.
4900 (grokdeclarator): Likewise.
4901 Set TREE_ADDRESSABLE for fields that aren't bitfields.
4902 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
4904 2000-05-31 Mark Mitchell <mark@codesourcery.com>
4906 Remove guiding declaration support.
4907 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
4908 (flag_guiding_decls): Remove.
4909 * call.c (build_user_type_conversion_1): Remove support for
4911 (build_new_function_call): Likewise.
4912 (build_new_op): Likewise.
4913 (build_new_method_call): Likewise.
4914 * decl.c (start_function): Likewise.
4915 * friend.c (is_friend): Likewise.
4916 (do_friend): Likewise.
4917 * decl2.c ((flag_dump_translation_unit): Make it const.
4918 (flag_guiding_decls): Remove.
4919 (unsupported_options): New variable
4920 (compare_options): New function.
4921 (lang_decode_option): Use them.
4923 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
4925 * method.c (mangle_expression): Adjust test for legal expression
4928 * pt.c (instantiate_decl): Save and restore the local
4929 specializations list.
4931 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
4933 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
4935 2000-05-30 Mark Mitchell <mark@codesourcery.com>
4937 * call.c (add_template_candidate_real): Handle member template
4938 constructors for classes with virtual bases.
4939 (build_user_type_conversion_1): Use in_charge_arg_for_name.
4940 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
4942 * ir.texi: Update thunk documentation.
4944 * call.c (joust): Fix handling of overloaded builtin operators.
4946 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
4948 * cp-tree.h (DECL_ANTICIPATED): New macro.
4949 Document new use of DECL_LANG_FLAG_7.
4950 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
4951 in the user namespace.
4952 * lex.c (do_identifier): If the identifier's declaration has
4953 DECL_ANTICIPATED on, it has not yet been declared. But do not
4954 replace it with an ordinary implicit declaration.
4956 * tinfo2.cc: Include stdlib.h.
4958 2000-05-29 Mark Mitchell <mark@codesourcery.com>
4960 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
4961 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
4964 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
4966 * decl2.c (lang_decode_option): Use skip_leading_substring instead
4969 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
4971 * operators.def (<?): Duplicated, should have been...
4974 2000-05-27 Alex Samuel <samuel@codesourcery.com>
4975 Mark Mitchell <mark@codesourcery.com>
4977 * cp-tree.h (ansi_opname): Make it a macro.
4978 (ansi_assopname): Likewise.
4979 (struct lang_decl_flags): Add assignment_operator_p.
4980 (struct lang_decl): Add operator_code.
4981 (DECL_VTT_PARM): Adjust.
4982 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
4983 overloaded operator.
4984 (SET_OVERLOADED_OPERATOR_CODE): New macro.
4985 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
4986 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
4987 (opname_tab): Remove.
4988 (assignop_tab): Likewise.
4989 (operator_name_info_t): New type.
4990 (operator_name_info): New variable.
4991 (assignment_operator_name_info): Likewise.
4992 (build_cp_library_fn): Remove declaration.
4993 (push_cp_library_fn): Likewise.
4994 (operator_name_string): Likewise.
4995 (build_decl_overload): Likewise.
4996 * call.c (print_z_candidates): Simplify.
4997 (build_object_call): Adjust usage of ansi_opname. Use
4998 DECL_OVERLOADED_OPERATOR_P.
4999 (op_error): Adjust operator name lookup.
5000 (build_conditional_expr): Adjust usage of ansi_opname.
5001 (build_new_op): Likewise.
5002 (build_op_delete_call): Likewise.
5003 (build_over_call): Likewise.
5004 (joust): Use DECL_OVERLOADED_OPERATOR_P.
5005 * decl.c (duplicate_decls): Copy operator_code.
5006 (init_decl_processing): Adjust parameters to push_cp_library_fn.
5007 (builtin_function): Adjust parameters to build_library_fn_1.
5008 (build_library_fn_1): Accept an overloaded operator code.
5009 (build_library_fn): Pass ERROR_MARK.
5010 (build_cp_library_fn): Accept an overloaded operator code.
5011 (push_cp_library_fn): Likewise.
5012 (grokfndecl): Tweak.
5013 (grokdeclarator): Simplify code to compute names of overloaded
5014 operators. Adjust use of ansi_opname.
5015 (ambi_op_p): Work on tree_codes, not identifiers.
5016 (unary_op_p): Likewise.
5017 (grok_op_properties): Likewise.
5018 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
5019 (lang_mark_tree): Don't try to mark the operator_code.
5020 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
5021 * error.c (dump_decl): Remove special handling for operator
5023 (dump_function_name): Likewise.
5024 (dump_expr): Adjust name lookup of operators.
5025 (op_to_string): Simplify.
5026 (assop_to_string): Likewise.
5027 * init.c (build_new_1): Adjust use of ansi_opname.
5028 * lex.c (opname_tab): Remove.
5029 (assignop_tab): Likewise.
5030 (ansi_opname): Likewise.
5031 (ansi_assopname): Likewise.
5032 (operator_name_string): Likewise.
5033 (reinit_lang_specific): Likewise.
5034 (operator_name_info): New variable.
5035 (assignment_operator_name_info): Likewise.
5036 (init_operators): New function.
5037 (init_parse): Use it.
5038 (do_identifier): Adjust use of ansi_opname.
5039 * method.c (mangle_expression): Don't use ansi_opname for
5041 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
5042 (build_decl_overload): Remove.
5043 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
5044 (do_build_assign_ref): Adjust use of ansi_opname.
5045 (synthesize_method): Likewise.
5046 (implicitly_declare_fn): Likewise.
5047 * operators.def: New file.
5048 * parse.y (operator): Adjust use of ansi_opname.
5049 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
5050 (set_mangled_name_for_template_decl): Don't play games with
5052 (special_function_p): Adjust use of ansi_opname.
5053 * typeck.c (check_return_expr): Likewise.
5054 * Make-lang.in (cc1plus): Depend on operators.def.
5055 * Makefile.in (lex.o): Likewise.
5058 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
5060 * Make-lang.in (cplib2.ready): Eradicate.
5062 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5064 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
5065 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
5066 (built_min, cp_tree_equal): Likewise.
5068 2000-05-26 Mark Mitchell <mark@codesourcery.com>
5070 * class.c (layout_nonempty_base_or_field): Replace
5071 `record_layout_info' with `record_layout_info_s'.
5073 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
5076 * cp-tree.h (struct language_function): x_named_labels is now
5077 a struct named_label_list*.
5078 * decl.c (struct named_label_use_list): Renamed from...
5079 (struct named_label_list): ...this. New struct.
5080 (push_binding_level): Don't set eh_region.
5081 (note_level_for_eh): New fn.
5082 (pop_label): Take label and old value directly.
5083 (pop_labels): Adjust for new named_labels format.
5084 (lookup_label): Likewise.
5085 (poplevel): Note characteristics of a binding level containing a
5086 named label. Mess with named label lists earlier.
5087 (mark_named_label_lists): New fn.
5088 (mark_lang_function): Call it.
5089 (use_label): New fn, split out from...
5090 (make_label_decl): ...here. Don't call it.
5091 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
5092 check_previous_gotos): New fns, split out from...
5093 (define_label): ...here.
5094 (check_switch_goto): New fn.
5095 (define_case_label): Call it.
5096 (check_goto): New fn.
5097 * semantics.c (finish_goto_stmt): Call it and use_label.
5098 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
5099 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
5101 2000-05-26 Mark Mitchell <mark@codesourcery.com>
5103 * class.c (build_vtable_entry_ref): Correct usage of
5104 get_vtbl_decl_for_binfo.
5106 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
5107 * method.c (implicitly_declare_fn): Not here.
5109 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
5111 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
5112 (CPTI_PTMD_DESC_TYPE): ... here.
5113 (ptmd_desc_type_node): Rename to ...
5114 (ptm_desc_type_node): ... here.
5116 * rtti.c (ptmd_initializer): Rename to ...
5117 (ptm_initializer): ... here.
5118 (sythesize_tinfo_var): Adjust. Deal with pointer to member
5120 (create_tinfo_types): Adjust.
5122 2000-05-25 Mark Mitchell <mark@codesourcery.com>
5124 Finish implementation of VTTs.
5125 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
5126 CPTI_VTT_PARM_IDENTIFIER.
5127 (vtt_parm_identifier): New macro.
5128 (vtt_parm_type): Likewise.
5129 (BINFO_SUBVTT_INDEX): Likewise.
5130 (BINFO_VPTR_INDEX): Likewise.
5131 (struct lang_decl): Add vtt_parm.
5132 (DECL_VTT_PARM): New macro.
5133 (DECL_USE_VTT_PARM): Likewise.
5134 (DECL_NEEDS_VTT_PARM_P): Likewise.
5135 (get_vtt_name): Declare.
5136 (build_artifical_parm): Likewise.
5137 (fixup_all_virtual_upcast_offsets): Likewise.
5138 (expand_indirect_vtbls_init): Remove.
5139 * call.c (build_new_method_call): Pass the vtt to subobject
5140 constructors and destructors.
5141 * class.c (get_vtt_name): Give it external linkage.
5142 (build_clone): Handle the magic VTT parameters for clones.
5143 (clone_function_decl): Fix typo in comment.
5144 (build_vtt): Keep track of the indices in the VTTs where various
5145 entities are stored.
5146 (build_vtt_inits): Likewise.
5147 (dfs_build_vtt_inits): Likewise.
5148 (build_ctor_vtbl_group): Tweak type of construction vtables.
5149 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
5150 primary bases, when building construction vtables.
5151 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
5152 (initialize_predefined_identifiers): Add vtt_parm_identifier.
5153 (init_decl_processing): Initialize vtt_parm_type.
5154 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
5155 (lang_mark_tree): Make vtt_parm.
5156 * decl2.c (build_artificial_parm): New function.
5157 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
5158 (grokclassfn): Use build_artificial_parm.
5159 * init.c (initialize_vtbl_ptrs): Call
5160 fixup_all_virtual_upcast_offsets directly.
5161 (perform_member_init): Use the complete subobject destructor for
5163 (build_vtbl_address): New function.
5164 (expand_virtual_init): Handle VTTs.
5165 * optimize (maybe_clone_body): Likewise.
5166 * search.c (fixup_all_virtual_upcast_offsets): Give it external
5168 (expand_indirect_vtbls_init): Remove.
5169 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
5170 * tree.c (make_binfo): Make them bigger.
5172 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
5174 * inc/cxxabi.h (__pbase_type_info): Define, based on
5175 __pointer_type_info.
5176 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
5177 (__pointer_to_member_type_info): Likewise.
5178 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
5179 (__pointer_to_member_type_info::__is_pointer_p): Remove.
5180 (__pointer_type_info::__do_catch): Rename to ...
5181 (__pbase_type_info::__do_catch): ... here. Adjust.
5182 (__pbase_type_info::__pointer_catch): Implement.
5183 (__pointer_type_info::__pointer_catch): Adjust.
5184 (__pointer_to_member_type_info::__pointer_catch): Adjust.
5186 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
5188 * tinfo.h (__user_type_info::contained_virtual_p): New
5190 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
5192 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
5193 diamond shaped heirarchy. Add early out for mixed diamond and
5194 duplicate shaped heirarchy.
5196 2000-05-24 Mark Mitchell <mark@codesourcery.com>
5198 * cp-tree.h (build_delete): Change prototype.
5199 (build_vec_delete): Likewise.
5200 * call.c (build_scoped_method_call): Use special_function_kind
5201 values to indicate the kind of destruction to be done.
5202 (build_method_call): Likewise.
5203 * decl.c (finish_destructor_body): Likewise.
5204 (maybe_build_cleanup_1): Likewise. Rename to ...
5205 (maybe_build_cleanup): ... this.
5206 * decl2.c (delete_sanity): Use special_function_kind
5207 values to indicate the kind of destruction to be done.
5208 (build_cleanup): Likewise.
5209 * init.c (perform_member_init): Likewise.
5210 (build_vec_delete_1): Likewise.
5211 (build_dtor_call): Simplify.
5212 (build_delete): Use special_function_kind
5213 values to indicate the kind of destruction to be done.
5214 (build_vbase_delete): Likewise.
5215 (build_vec_delete): Likewise.
5217 * init.c (sort_member_init): Fix typo in error message generation
5220 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
5222 * semantics.c (begin_class_definition): make the packed
5223 attribute be sensitive to the "-fpack-struct" command line flag
5225 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
5227 Update new-abi upcast algorithm.
5228 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
5229 prototype and meaning of return value.
5230 (__si_class_type_info::__do_upcast): Likewise.
5231 (__vmi_class_type_info::__do_upcast): Likewise.
5232 * tinfo.cc (__class_type_info::__upcast_result): Replace
5233 whole2dst with part2dst. Adjust ctor.
5234 (__class_type_info::__do_upcast): Adjust call of worker function.
5235 (__class_type_info::__do_upcast): Adjust.
5236 (__si_class_type_info::__do_upcast): Adjust. Use parent's
5238 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
5239 virtual base in diamond heirarchy bug.
5241 2000-05-23 Mark Mitchell <mark@codesourcery.com>
5243 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
5244 and bitfield to tinfo_fn_p.
5245 (DECL_TINFO_FN_P): Adjust.
5246 (SET_DECL_TINFO_FN_P): Likewise.
5247 (DECL_MUTABLE_P): Likewise.
5248 (DECL_C_BIT_FIELD): Likewise.
5249 (SET_DECL_C_BIT_FIELD): Likewise.
5250 (CLEAR_DECL_C_BIT_FIELD): Likewise.
5251 (DECL_UNINLINABLE): Likewise.
5252 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
5253 (handle_using_decl): Remove assertion.
5254 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
5255 to build FIELD_DECLs.
5256 (build_base_field): Likewise.
5257 (layout_class_type): Likewise.
5258 * decl.c (init_decl_processing): Likewise.
5259 (build_ptrmemfunc_type): Likewise.
5260 (grokdeclarator): Likewise.
5261 * decl2.c (grok_x_components): Likewise.
5262 * except.c (call_eh_info): Likewise.
5263 * init.c (init_init_processing): Likewise.
5264 * rtti.c (expand_class_desc): Likewise.
5265 (create_pseudo_type_info): Likewise.
5266 (get_vmi_pseudo_type_info): Likewise.
5267 (create_tinfo_types): Likewise.
5268 * ptree.c (print_lang_decl): Adjust.
5269 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
5270 before checking DECL_MUTABLE_P.
5272 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
5273 parameters for template functions.
5274 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
5275 destructors as well as constructors.
5277 2000-05-22 Mark Mitchell <mark@codesourcery.com>
5279 * class.c (build_ctor_vtbl_group): Set inits.
5280 * optimize.c (maybe_clone_body): Set DECL_INLINE and
5281 DECL_THIS_INLINE appropriately for clones.
5283 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
5284 (DECL_CONV_FN_P): Simplify.
5285 (DECL_OPERATOR): Remove.
5286 (language_to_string): Declare.
5287 * decl.c (duplicate_decls): Fix typo in comment.
5288 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
5289 (grok_op_properties): Use DECL_CONV_FN_P instead of
5290 IDENTIFIER_TYPENAME_P.
5291 * dump.c (dequeue_and_dump): Dump the language linkage of
5293 * error.c (language_to_string): Give it external linkage.
5294 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
5295 (implicitly_declare_fn): Set DECL_LANGUAGE.
5296 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
5297 IDENTIFIER_TYPENAME_P.
5298 (tsubst_decl): Likewise.
5299 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
5300 * semantics.c (finish_member_declaration): Don't mark members of
5301 classes declared in an extern "C" region as extern "C".
5303 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5305 * decl2.c (qualified_lookup_using_namespace): Look through
5308 * decl.c (push_using_decl): Return the old decl on namespace level.
5310 2000-05-21 Mark Mitchell <mark@codesourcery.com>
5312 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
5313 (VTT_NAME_PREFIX): New macro.
5314 (CTOR_VTBL_NAME_PREFIX): Likewise.
5315 (get_ctor_vtbl_name): New function.
5316 * class.c (get_vtable_name): Simplify.
5317 (get_vtt_name): New function.
5318 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
5319 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
5320 when a virtual base becomes primary.
5321 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
5323 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
5324 additional parameters.
5325 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
5326 (initialize_array): New function.
5327 (build_vtt): Likewise.
5328 (build_vtt_inits): Likewise.
5329 (dfs_build_vtt_inits): Likewise.
5330 (dfs_fixup_binfo_vtbls): Likewise.
5331 (build_ctor_vtbl_group): Likewise.
5332 (initialize_vtable): Use initialize_array.
5333 (accumulate_vtbl_inits): Reimplement to handle construction
5335 (dfs_accumulate_vtbl_inits): Likewise.
5336 (bulid_vtbl_initializer): Adjust parameter name.
5337 * method.c (build_typename_overload): Remove #if 0'd code.
5338 (get_ctor_vtbl_name): New function.
5339 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
5340 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
5342 * cp-tree.h (struct lang_type): Remove search_slot.
5343 (CLASSTYPE_SEARCH_SLOT): Remove.
5344 (emit_base_init): Change prototype.
5345 (initialize_vtbl_ptrs): Likewise.
5346 (expand_indirect_vtbls_init): Likewise.
5347 (clear_search_slots): Remove.
5348 * decl.c (lang_mark_tree): Don't mark search_slot.
5349 * init.c (initialize_vtbl_ptrs): Simplify.
5350 (emit_base_init): Likewise.
5351 * search.c (struct vbase_info): Document decl_ptr.
5352 (convert_pointer_to_single_level): Remove.
5353 (dfs_find_vbases): Remove.
5354 (dfs_init_base_pointers): Simplify.
5355 (dfs_clear_vbase_slots): Remove.
5356 (dfs_vtable_path_unmark): New function.
5357 (init_vbase_pointers): Simplify.
5358 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
5359 (expand_indirect_vtbls_init): Simplify. Don't call
5360 mark_all_temps_used.
5361 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
5362 initialize_vtbl_ptrs.
5364 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
5366 * except.c: Add static prototypes.
5368 2000-05-20 H.J. Lu <hjl@gnu.org>
5370 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
5372 2000-05-19 Mark Mitchell <mark@codesourcery.com>
5374 Don't create a separate copy of virtual bases for the
5375 CLASSTYPE_VBASECLASSES list.
5376 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
5377 (BINFO_FOR_VBASE): Remove.
5378 (CANONICAL_BINFO): Adjust.
5379 (binfo_for_vbase): New function.
5380 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
5381 instead of BINFO_FOR_VBASE.
5382 (build_vbase_pointer): Likewise.
5383 (build_secondary_vtable): Likewise.
5384 (dfs_mark_primary_bases): Likewise.
5385 (mark_primary_bases): Likewise.
5386 (layout_nonempty_base_or_field): Likewise.
5387 (dfs_set_offset_for_shared_vbases): Likewise.
5388 (dfs_set_offset_for_unshared_vbases): Likewise.
5389 (layout_virtual_bases): Likewise. Adjust for changes to the
5390 CLASSTYPE_VBASECLASSES list.
5391 (dump_class_hierarchy_r): Use binfo_for_vbase
5392 instead of BINFO_FOR_VBASE.
5393 (dump_class_hierarchy): Likewise.
5394 (finish_vtbls): Likewise.
5395 (build_vtbl_initializer): Adjust for changes to the
5396 CLASSTYPE_VBASECLASSES list.
5397 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
5398 * decl.c (finish_destructor_body): Adjust for changes to the
5399 CLASSTYPE_VBASECLASSES list.
5400 * init.c (sort_base_init): Use binfo_for_vbase.
5401 (construct_virtual_bases): Adjust for changes to the
5402 CLASSTYPE_VBASECLASSES list.
5403 (expand_member_init): Use binfo_for_vbase.
5404 (build_vbase_delete): Adjust for changes to the
5405 CLASSTYPE_VBASECLASSES list.
5406 * method.c (do_build_copy_constructor): Likewise.
5407 * rtti.c (get_base_offset): Use binfo_for_vbase.
5408 (expand_class_desc): Remove #if 0'd code.
5409 * search.c (struct vbase_info): Remove vbase_types.
5410 (get_base_distance): Use binfo_for_vbase.
5411 (lookup_field_queue_p): Use CANONICAL_BINFO.
5412 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
5413 (get_pure_virtuals): Adjust for changes to the
5414 CLASSTYPE_VBASECLASSES list.
5415 (dfs_find_vbases): Use binfo_for_vbase.
5416 (dfs_init_vbase_pointers): Likewise.
5417 (init_vbase_pointers): Don't initialize vi.vbase_types.
5418 (virtual_context): Use binfo_for_vbase.
5419 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
5420 CLASSTYPE_VBASECLASSES list.
5421 (expand_indirect_vtbls_init): Simplify.
5422 (dfs_get_vbase_types): Don't replicate virtual bases.
5423 (find_vbase_instance): Use binfo_for_vbase.
5424 (binfo_for_vbase): New function.
5425 * typeck.c (get_delta_difference): Use binfo_for_vbase.
5427 2000-05-17 Mark Mitchell <mark@codesourcery.com>
5429 * decl2.c (finish_anon_union): Generalize error messages to handle
5430 anonymous structures.
5431 * init.c (perform_member_init): Remove `name' parameter.
5432 (build_field_list): New function.
5433 (sort_member_init): Handle anonymous union initialization order
5434 correctly. Check for multiple initializations of the same union.
5435 (emit_base_init): Don't look up fields by name here.
5436 (expand_member_init): Record the result of name lookup for future
5438 * typeck.c (build_component_ref): Fix formatting.
5440 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
5442 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
5443 * typeck.c (build_x_compound_expr): Replace warn_unused with
5446 * decl2.c (lang_decode_option): Update -Wall unused flags by
5447 calling set_Wunused.
5449 2000-05-16 Mark Mitchell <mark@codesourcery.com>
5451 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
5452 * init.c (dfs_vtable_path_unmark): Remove.
5453 * search.c (marked_new_vtable_p): Likewise.
5454 (unmarked_new_vtable_p): Likewise.
5455 (dfs_search_slot_nonempty_p): Likewise.
5456 (dfs_mark): Likewise.
5457 (dfs_vtable_path_unmark): Likewise.
5458 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
5459 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
5460 (dfs_init_vbase_pointers): Remove special-case new ABI code.
5461 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
5462 (init_vbase_pointers): Simplify.
5463 (expand_indirect_vtbls_init): Likewise.
5465 * class.c (copy_virtuals): New function.
5466 (build_primary_table): Use it.
5467 (build_secondary_vtable): Likewise.
5468 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
5469 indicate that no vcall offset is required.
5470 (add_virtual_function): Likewise.
5471 (modify_all_vtables): Likewise.
5472 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5473 (dfs_accumulate_vtbl_inits): Likewise.
5474 (build_vtbl_initializer): Make changes to handle construction
5476 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5477 (build_rtti_vtbl_entries): Likewise.
5478 (build_vtable_entries): Handle a NULL vcall_index.
5480 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
5482 * decl2.c (lang_decode_option): Fix thinko.
5484 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
5486 * except.c (check_handlers): New fn.
5487 * cp-tree.h: Declare it.
5488 * semantics.c (finish_handler_sequence): Call it.
5489 (finish_function_handler_sequence): Likewise.
5490 (finish_handler_parms): Set TREE_TYPE on the handler.
5491 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
5492 * search.c (get_base_distance_recursive): If protect>1, ignore
5494 (get_base_distance): Don't reduce watch_access.
5496 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
5498 * lex.c: #include diagnostic.h.
5499 (lang_init_options): Set default prefixing rules.
5501 * lang-options.h: Add -fdiagnostics-show-location=.
5503 * decl2.c: #include diagnostic.h.
5504 (lang_decode_option): Handle -fdiagnostics-show-location=.
5506 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
5508 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
5509 * vec.cc: Revert my 2000-05-07 change.
5511 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
5513 * class.c (check_field_decls): Complain about non-static data
5514 members with same name as class in class with constructor.
5516 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
5518 * decl.c (grokdeclarator): Allow non-static data members with
5521 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
5523 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
5524 and pending_inline.filename. Update prototypes.
5525 * decl.c (define_label): Constify filename parameter.
5526 * decl2.c (warn_if_unknown_interface): Constify local char *.
5527 * input.c Constify input_source.filename. Don't declare
5528 input_filename or lineno. Constify filename parameter to feed_input.
5529 * lex.c (init_parse): Constify parameter and return value.
5530 (cp_pragma_interface, cp_pragma_implementation): Constify
5532 (reinit_parse_for_method, reinit_parse_for_block,
5533 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
5534 Constify local char *.
5535 * pt.c: Don't declare lineno or input_filename.
5536 (print_template_context, tsubst_friend_function, tsubst_decl,
5537 tsubst, instantiate_decl): Constify local char *.
5538 * semantics.c (expand_body): Constify local char *.
5539 * tree.c (build_srcloc): Constify filename parameter.
5540 * typeck.c (c_expand_asm_operands): Constify filename
5543 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
5545 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
5548 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
5550 * inc/cxxabi.h: Fix typos in comment.
5551 (__base_class_info::__offset): Use a static_cast.
5553 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
5555 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
5556 of std::size_t and std::ptrdiff_t respectively.
5557 * tinfo.cc: Likewise.
5560 2000-05-06 Richard Henderson <rth@cygnus.com>
5562 * typeck.c (build_c_cast): Don't warn integer->pointer size
5563 mismatch for constants.
5565 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
5567 * rtti.c (ptmd_initializer): Set non-public, if class is
5570 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
5571 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5572 __cxa_vec_delete): Likewise.
5573 * tinfo.cc (__dynamic_cast): Likewise.
5574 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5575 __cxa_vec_delete): Likewise.
5577 2000-05-04 Mark Mitchell <mark@codesourcery.com>
5579 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
5580 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
5581 (lang_decl_flags): Add vcall_offset.
5582 (THUNK_VCALL_OFFSET): Use it.
5583 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
5584 * method.c (make_thunk): Create the lang_decl here, not in
5586 (emit_thunk): Make generic thunks into ordinary functions once
5587 they have been fed to expand_body.
5588 * semantics.c (expand_body): Set current_function_is_thunk here.
5590 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5592 * class.c (update_vtable_entry_for_fn): Prototype.
5594 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
5597 * search.c (dfs_build_inheritance_graph_order): Prototype.
5599 2000-05-04 Mark Mitchell <mark@codesourcery.com>
5601 * cp-tree.h (special_function_kind): Add various kinds of
5603 (special_function_p): New function.
5604 * class.c (overrides): Don't let one kind of destructor override
5606 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
5607 whether or not to instantiate a template.
5608 * tree.c (special_function_p): Define.
5610 2000-05-03 Mark Mitchell <mark@codesourcery.com>
5612 * cp-tree.def (THUNK_DECL): Remove.
5613 * cp-tree.h (DECL_THUNK_P): New macro.
5614 (DECL_NON_THUNK_FUNCTION_P): Likewise.
5615 (DECL_EXTERN_C_FUNCTION_P): Likewise.
5616 (SET_DECL_THUNK_P): Likewise.
5617 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
5618 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
5619 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
5620 * decl.c (decls_match): Use DECL_EXTERN_C_P.
5621 (duplicate_decls): Likewise.
5622 (pushdecl): Likewise. Adjust thunk handling.
5623 (grokfndecl): Use DECL_EXTERN_C_P.
5624 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
5625 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
5626 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
5627 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
5628 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
5629 DECL_NO_STATIC_CHAIN.
5630 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
5631 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
5632 * search.c (covariant_return_p): Remove THUNK_DECL handling.
5635 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
5637 * tree.c (walk_tree): Set lineno.
5639 2000-05-01 Mark Mitchell <mark@codesourcery.com>
5641 * exception.cc: Update license notice.
5643 * new1.cc: Likewise.
5644 * new2.cc: Likewise.
5645 * tinfo.cc: Likewise.
5646 * tinfo2.cc: Likewise.
5648 * inc/cxxabi.h: Likewise.
5649 * inc/exception: Likewise.
5650 * inc/new: Likewise.
5651 * inc/new.h: Likewise.
5652 * inc/typeinfo: Likewise.
5654 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
5656 * tree.c (build_target_expr_with_type): If we already have a
5657 TARGET_EXPR, just return it.
5659 * optimize.c (initialize_inlined_parameters): Don't generate an
5660 EXPR_STMT if we can just use DECL_INITIAL.
5661 * decl.c (emit_local_var): Only make the initialization a
5662 full-expression if stmts_are_full_exprs_p.
5664 2000-05-01 Mark Mitchell <mark@codesourcery.com>
5666 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
5668 * call.c (standard_conversion): Use it.
5669 (direct_reference_binding): Likewise.
5670 (build_over_call): Likewise.
5671 (is_properly_derived_from): Likewise.
5672 (compare_ics): Likewise.
5673 * class.c (resolves_to_fixed_type_p): Likewise.
5674 * optimize.c (declare_return_variable): Likewise.
5675 * pt.c (is_specialization_of): Likewise.
5677 * typeck.c (comp_target_parms): Likeiwse.
5678 (build_static_cast): Likewise.
5679 (build_reinterpret_cast): Likewise.
5680 (build_const_cast): Likewise.
5681 (comp_ptr_ttypes_real): Likewise.
5682 (comp_ptr_ttypes_const): Likewise.
5683 * typeck2.c (process_init_constructor): Likewise.
5685 2000-04-30 Scott Snyder <snyder@fnal.gov>
5687 * decl.c (finish_destructor_body): Use the base destructor when
5688 destroying virtual bases.
5690 2000-04-30 Mark Mitchell <mark@codesourcery.com>
5692 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
5694 * optimize.c (struct inline_data): Add target_exprs field.
5695 (declare_return_variable): When a function returns an aggregate,
5696 use the variable declared in the TARGET_EXPR as the remapped
5698 (expand_call_inline): Update the pending target_exprs stack.
5699 (optimize_function): Initialize the stack.
5701 * decl2.c (finish_file): Fix typo in comment.
5703 * method.c (emit_thunk): Don't try to return a `void' value.
5705 * optimize.c (initialize_inlined_parameters): If the parameter is
5706 addressable, we need to make a new VAR_DECL, even if the
5707 initializer is constant.
5709 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
5711 * decl.c (grok_op_properties): Add an extra check of argtypes.
5713 2000-04-27 Mark Mitchell <mark@codesourcery.com>
5715 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
5717 (initialize_inlined_parameters): Try to avoid creating new
5720 2000-04-27 Alex Samuel <samuel@codesourcery.com>
5722 * lex.c (my_get_run_time): Remove.
5723 (init_filename_times): Use get_run_time instead of my_get_run_time.
5724 (check_newline): Likewise.
5725 (dump_time_statistics): Likewise.
5726 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
5727 of computing elapsed time explicitly.
5729 2000-04-26 Mark Mitchell <mark@codesourcery.com>
5731 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
5732 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
5733 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
5734 before calling decl_constant_value.
5735 * class.c (check_bitfield_decl): Likewise.
5736 * cvt.c (ocp_convert): Likewise.
5737 (convert): Likewise.
5738 * decl.c (compute_array_index_type): Likewise.
5739 (build_enumerator): Likewise.
5740 * decl2.c (check_cp_case_value): Likewise.
5741 * pt.c (convert_nontype_argument): Likewise.
5743 * typeck.c (decay_conversion): Likewise.
5744 (build_compound_expr): Likewise.
5745 (build_reinterpret_cast): Likewise.
5746 (build_c_cast): Likewise.
5747 (convert_for_assignment): Likewise.
5749 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
5751 * decl.c (finish_function): Don't play games with DECL_INLINE.
5753 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
5755 * ir.texi: Correct typo.
5757 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5759 * decl.c (grokdeclarator): Reject VLAs as members.
5761 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
5763 * call.c (standard_conversion): Accept conversion between
5766 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
5768 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
5770 * decl2.c (finish_file): Remove double setup for accounting
5773 2000-04-24 Robert Lipe <robertlipe@usa.net>
5775 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
5777 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
5779 * new.cc (set_new_handler): Needs to be in std::.
5781 2000-04-23 Mark Mitchell <mark@codesourcery.com>
5783 * cp-tree.h (lang_decl): Remove pretty_function_p.
5784 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
5785 language-specific node.
5786 * decl.c (cp_make_fname_decl): Use build_decl, not
5787 build_lang_decl, to build the variables.
5788 (grokvardecl): Don't call build_lang_decl for local variables in
5790 (grokdeclarator): Don't call build_lang_decl for local type
5791 declarations in templates.
5792 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
5793 zero'd memory, rather than calling memset.
5794 * pt.c: Include hashtab.h.
5795 (local_specializations): New variable.
5796 (retrieve_local_specialization): Use it.
5797 (register_local_specialization): Likewise.
5798 (tsubst_decl): Don't assume local variables have
5800 (instantiate_decl): Set up local_specializations.
5801 * Makefile.in (HTAB_H): New variable.
5803 2000-04-23 Richard Henderson <rth@cygnus.com>
5805 * typeck.c (c_expand_asm_operands): Restore the original
5806 contents of the output list.
5808 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
5810 * ir.texi: Document complex number representation.
5812 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
5814 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
5815 (target_incomplete_p): New function.
5816 (tinfo_base_init): Create comdat NTBS name variable.
5817 (ptr_initializer): Add non_public parameter. Calculate it.
5818 (ptmd_initializer): Likewise.
5819 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
5820 (create_real_tinfo_var): Add non_public parameter. Use it.
5821 Push proxy into global namespace.
5822 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
5824 * inc/typeinfo (type_info::before, type_info::operator==):
5825 Compare __name addresses.
5827 * tinfo2.cc: Remove new-abi builtins comment.
5829 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
5831 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
5833 * call.c (joust): Exit early if we get the same function, too.
5835 * decl2.c (key_method): Return NULL_TREE for template classes.
5836 (import_export_class): Don't need to check for template classes.
5838 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
5840 * lex.c: Remove references to cccp.c.
5842 2000-04-18 Mark Mitchell <mark@codesourcery.com>
5844 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
5845 volatile_memfunc. Add destructor_attr. Adjust dummy.
5846 (DECL_DESTRUCTOR_P): Use destructor_attr.
5847 (DECL_CONST_MEMFUNC_P): Reimplement.
5848 (DECL_VOLATILE_MEMFUNC_P): Remove.
5849 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
5850 (overrides): Use DECL_DESTRUCTOR_P.
5851 (check_for_override): Likewise.
5852 * decl.c (start_function): Likewise.
5853 * decl2.c (grokfclassfn): Likewise.
5854 (check_classfn): Likewise.
5855 (grok_function_init): Likewise.
5857 2000-04-17 Mark Mitchell <mark@codesourcery.com>
5859 * decl2.c (grokfield): Issue error on illegal data member
5862 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
5864 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
5866 2000-04-16 Mark Mitchell <mark@codesourcery.com>
5868 * class.c (build_vtable_entry): Don't build thunks for type-info
5871 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
5873 * decl.c (decls_match): Allow a redeclaration of a builtin to
5874 specify args while the builtin did not.
5876 2000-04-15 Mark Mitchell <mark@codesourcery.com>
5878 * cp-tree.def (THUNK_DECL): Add to documentation.
5879 * cp-tree.h (flag_huge_objects): Declare.
5880 * class.c (modify_vtable_entry): Tidy.
5881 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
5882 Calculate delta appropriately for the new ABI.
5883 (dfs_modify_vtables): Use it.
5884 (modify_all_vtables): Fix thinko in code to add overriding copies
5885 of functions to primary vtables.
5886 (build_clone): Fix typo in comment.
5887 (clone_function_decl): Correct order of destructors in vtable.
5888 (build_vbase_offset_vtbl_entries): Adjust comment.
5889 (dfs_vcall_offset_queue_p): Remove.
5890 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
5891 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
5892 (build_vtable_entry): Correct check for pure virtual functions.
5893 Don't declare flag_huge_objects.
5894 * decl.c (flag_huge_objects): Remove declaration.
5895 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
5896 Use int_size_in_bytes.
5897 (emit_thunk): Handle vcall offset thunks.
5899 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5901 * decl2.c (parse_time, varconst_time): Delete declarations.
5902 (finish_file): Delete LINENO declaration.
5903 START_TIME and THIS_TIME now long.
5905 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
5907 * class.c (build_base_field): Reformat comment.
5909 * inc/cxxabi.h (stddef.h): Comment inclusion.
5910 (__base_class_info::__offset): Comment shift.
5912 2000-04-12 Mark Mitchell <mark@codesourcery.com>
5914 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
5915 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
5916 (cp_push_exception_identifier): New macro.
5917 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
5918 (DECL_BASE_DESTRUCTOR_P): Likewise.
5919 (DECL_DELETING_DESTRUCTOR_P): Likewise.
5920 (get_vtbl_decl_for_binfo): Fix formatting.
5921 (in_charge_arg_for_name): New macro.
5922 (maybe_build_cleanup_and_delete): Remove declaration.
5923 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
5924 (in_charge_arg_for_name): New function.
5925 (build_new_method_call): Use it. Handle cloned destructors.
5926 (build_clone): Don't make the base constructor virtual.
5927 Automatically defer generated functions.
5928 (clone_function_decl): Handle destructors, too.
5929 (clone_constructors_and_destructors): Likewise.
5930 (create_vtable_ptr): Don't create a vtable entry for a cloned
5932 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
5933 (initialize_predefined_identifiers): Update appropriately.
5934 (finish_destructor_body): Simplify.
5935 (maybe_build_cleanup_and_delete): Remove.
5936 * except.c (expand_throw): Handle new-ABI destructors.
5937 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
5938 (build_dtor_call): New function.
5939 (build_delete): Use it. Simplify.
5940 * optimize.c (maybe_clone_body): Handle destructors.
5941 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
5943 * exception.cc (cleanup_fn): New typedef.
5944 (CALL_CLEANUP): New macro.
5945 (cp_eh_info): Use them.
5946 (__cp_push_exception): Likewise.
5947 (__cp_pop_exception): Likewise.
5949 2000-04-11 Mark Mitchell <mark@codesourcery.com>
5951 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
5952 (complete_dtor_identifier): New macro.
5953 (CLASSTYPE_FIRST_CONVERSION): Remove.
5954 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
5955 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
5956 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
5957 (CLASSTYPE_CONSTRUCTORS): Likewise.
5958 (CLASSTYPE_DESTRUCTORS): Likewise.
5959 (lang_decl): Add cloned_function.
5960 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
5961 (DECL_BASE_CONSTRUCTOR_P): Likewise.
5962 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
5963 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
5964 (DECL_CLONED_FUNCTION_P): Likewise.
5965 (DECL_CLONED_FUNCTION): Likewise.
5966 (clone_function_decl): Declare.
5967 (maybe_clone_body): Likewise.
5968 * call.c (build_user_type_conversion_1): Call complete object
5969 constructors in the new ABI.
5970 (build_new_method_call): Don't add in-charge parameters under the
5972 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
5973 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
5974 CLASSTYPE_DESTRUCTOR_SLOT.
5975 (build_clone): New function.
5976 (clone_function_decl): Likewise.
5977 (clone_constructors_and_destructors): Likewise.
5978 (check_bases_and_members): Use it.
5979 * decl.c (iniitialize_predefined_identifiers): Initialize
5980 complete_dtor_identifier.
5981 (finish_function): Don't add extra code to a clone.
5982 (lang_mark_tree): Mark cloned_function.
5983 * decl2.c (mark_used): Don't bother trying to instantiate things
5985 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
5986 * method.c (set_mangled_name_for_decl): Don't treat clones as
5988 (synthesize_method): Sythesize cloned functions, not the clones.
5989 * optimize.c (inline_data): Update comment on ret_label.
5990 (remap_block): Don't assume DECL_INITIAL exists.
5991 (copy_body_r): Allow ret_label to be NULL.
5992 (maybe_clone_body): Define.
5993 * pt.c (tsubst_decl): Handle clones.
5994 (instantiate_clone): New function.
5995 (instantiate_template): Use it.
5996 (set_mangled_name_for_template_decl): Don't treat clones as
5998 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
5999 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
6000 * semantics.c (expand_body): Clone function bodies as necessary.
6002 * optimize.c (remap_decl): Avoid sharing structure for arrays
6003 whose size is only known at run-time.
6004 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
6006 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
6007 to has_in_charge_parm_p.
6008 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
6009 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
6010 (DECL_COPY_CONSTRUCTOR_P): New macro.
6011 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
6012 (build_user_type_conversion_1): Likewise.
6013 (convert_like_real): Likewise.
6014 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
6015 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
6016 (copy_args_p): Likewise.
6017 (grok_ctor_properties): Likewise.
6018 (start_function): Likewise.
6019 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
6020 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
6021 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
6022 * method.c (do_build_copy_constructor): Use
6023 DECL_HAS_IN_CHARGE_PARM_P.
6024 (synthesize_method): Likewise.
6025 * pt.c (instantiate_template): Remove goto.
6026 * tree.c (build_cplus_method_type): Remove mention of obstacks in
6029 * cp-tre.h (finish_function): Change prototype.
6030 * decl.c (end_cleanup_fn): Adjust caller.
6031 (finish_function): Take only one parameter.
6032 * decl2.c (finish_objects): Adjust caller.
6033 (finish_static_storage_duration_function): Likewise.
6034 * method.c (emit_thunk): Likewise.
6035 * parse.y: Likewise.
6036 * parse.c: Regenerated.
6037 * pt.c (instantiate_decl): Likewise.
6038 * rtti.c (synthesize_tinfo_fn): Likewise.
6039 * semantics.c (expand_body): Likewise.
6041 * cp-tree.h (copy_decl): New function.
6042 * class.c (finish_struct_1): Use it.
6043 * lex.c (copy_decl): Define it.
6044 * pt.c (tsubst_decl): Likewise.
6045 * tree.c (copy_template_template_parm): Likewise.
6047 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
6048 has_nonpublic_assign_ref.
6049 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
6050 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
6051 * class.c (finish_struct_methods): Don't set
6052 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
6053 (interface_only): Don't declare.
6054 (interface_unknown): Likewise.
6056 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6058 * tree.h (HAVE_TEMPLATES): Remove definition.
6059 * lang-options.h (-fthis-is-variable): Remove documentation.
6061 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
6063 * class.c (instantiate_type): Handle object-relative template-id.
6065 * semantics.c (finish_expr_stmt): Call convert_to_void here.
6066 * decl.c (cplus_expand_expr_stmt): Not here.
6068 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
6069 Initialize exprtype earlier.
6071 * parse.y (fn.def1): Check for defining types in return types.
6073 * decl.c (check_tag_decl): Notice extra fundamental types.
6074 Diagnose empty decls in classes, too.
6076 * decl.c (grokdeclarator): Don't override an anonymous name if no
6077 declarator was given.
6079 * cvt.c (convert_to_void): Call resolve_offset_ref.
6081 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
6083 * decl2.c (decl_namespace): Handle getting a type.
6085 * typeck.c (build_c_cast): Re-enable warning for cast between
6086 pointer and integer of different size.
6088 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
6090 * inc/cxxabi.h (__pointer_type_info): Add restrict and
6092 (__pointer_type_info::__pointer_catch): New virtual function.
6093 (__pointer_to_member_type_info): Derive from
6094 __pointer_type_info. Adjust.
6095 (__pointer_to_member_type_info::__do_catch): Remove.
6096 (__pointer_to_member_type_info::__is_pointer_p): Declare.
6097 (__pointer_to_member_type_info::__pointer_catch): Declare.
6098 * rtti.c (qualifier_flags): Add restrict flag.
6099 (ptmd_initializer): Reorder members.
6100 (create_tinfo_types): Expand comments. Reorder
6101 ptmd_desc_type_node members.
6102 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
6104 (__pointer_type_info::__do_catch): Move specific code into
6105 __pointer_catch. Call it.
6106 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
6107 specific catch checking. Fix void conversion check.
6108 (__pointer_to_member_type_info::__do_catch): Remove.
6109 (__pointer_to_member_type_info::__pointer_catch): Implement.
6111 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6113 * lex.c (init_parse): Remove traces of classof and headof.
6114 * decl2.c (flag_operator_names): Default to 1.
6115 (lang_decode_option): Do not set it for -ansi.
6117 2000-04-09 Mark Mitchell <mark@codesourcery.com>
6119 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
6120 (DECL_MAIN_VARIANT): Remove.
6121 * decl.c (duplicate_decls): Don't set it.
6122 (start_function): Likewise.
6123 (lang_mark_tree): Don't mark it.
6124 * decl2.c (defer_fn): Don't use it.
6125 * lex.c (retrofit_lang_decl): Don't set it.
6126 * pt.c (tsubst_decl): Likewise.
6127 * ptree.c (print_lang_decl): Don't print it.
6128 * typeck.c (mark_addressable): Don't use it.
6130 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
6132 * vec.cc: Include <new> and <exception>.
6133 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
6134 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
6136 (__cxa_vec_delete): Catch dtor exceptions.
6138 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
6140 Prepend __ to implementation defined names.
6141 * inc/typeinfo (type_info): Rename _name to __name.
6142 (type_info::type_info): Rename parameter.
6143 (type_info::operator==, type_info::operator!=,
6144 type_info::before): Likewise.
6145 (type_info::is_pointer_p, type_info::is_function_p,
6146 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
6149 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
6150 (__pointer_type_info::__pointer_type_info): Likewise.
6151 (__pointer_type_info::is_pointer_p,
6152 __pointer_type_info::do_catch): Prepend __. Rename parameters.
6153 (__array_type_info::__array_type_info): Rename parameters.
6154 (__function_type_info::__function_type_info): Likewise.
6155 (__function_type_info::is_function_p): Prepend __.
6156 (__enum_type_info::__enum_type_info): Rename parameters.
6157 (__pointer_to_member_type_info::__pointer_to_member_type_info):
6159 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
6161 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
6162 (__class_type_info::__class_type_info): Rename parameters.
6163 (__class_type_info::sub_kind): Prepend __. Adjust member names.
6164 (__class_type_info::upcast_result,
6165 __class_type_info::dyncast_result): Prepend __. Move definition
6167 (__class_type_info::do_upcast, __class_type_info::do_catch,
6168 __class_type_info::find_public_src,
6169 __class_type_info::do_dyncast,
6170 __class_type_info::do_find_public_src): Prepend __. Rename
6172 (__si_class_type_info::__si_class_type_info): Rename parameters.
6173 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
6174 __si_class_type_info::do_find_public_src): Prepent __. Rename
6176 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
6177 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
6178 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
6180 (__dynamic_cast): Rename parameters.
6181 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
6182 type_info::do_catch, type_info::do_upcast): Prepend __.
6183 (contained_p, public_p, virtual_p, contained_public_p,
6184 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
6185 (__class_type_info::do_catch,
6186 __class_type_info::do_upcast): Prepend __. Adjust.
6187 (__class_type_info::__upcast_result,
6188 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
6190 (__class_type_info::find_public_src): Prepend __. Adjust.
6191 (__class_type_info::do_find_public_src,
6192 __si_class_type_info::do_find_public_src,
6193 __vmi_class_type_info::do_find_public_src): Likewise.
6194 (__class_type_info::do_dyncast,
6195 __si_class_type_info::do_dyncast,
6196 __vmi_class_type_info::do_dyncast): Likewise.
6197 (__class_type_info::do_upcast,
6198 __si_class_type_info::do_upcast,
6199 __vmi_class_type_info::do_upcast): Likewise.
6200 (__dynamic_cast): Adjust.
6201 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
6202 (__function_type_info::is_function_p): Likewise.
6203 (__pointer_type_info::do_catch): Likewise. Adjust.
6204 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
6205 (__throw_type_match_rtti_2): Adjust.
6206 (__is_pointer): Adjust.
6208 2000-04-08 Mark Mitchell <mark@codesourcery.com>
6210 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
6211 (complete_ctor_identifier): New macro.
6212 (special_function_kind): Add sfk_copy_constructor and
6213 sfk_assignment_operator.
6214 (LOOKUP_HAS_IN_CHARGE): Remove.
6215 (cons_up_default_function): Rename to ...
6216 (implicitly_declare_fn): ... this.
6217 * call.c (build_new_method_call): Add in-charge parameters for
6219 * class.c (add_implicitly_declared_members): Change parameter name
6220 from cant_have_assignment to cant_have_const_assignment.
6221 Replace calls to cons_up_default_function to implicitly_declare_fn.
6222 * cvt.c (ocp_convert): Use complete_ctor_identifier.
6223 * decl.c (initialize_predefined_identifiers): Initialize it.
6224 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
6226 * init.c (expand_default_init): Don't calculate the in-charge
6228 (build_new_1): Likewise.
6229 * lex.c (cons_up_default_function): Move to method.c.
6230 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
6231 (implicitly_declare_fn): New function.
6232 * typeck.c (build_static_cast): Use complete_ctor_identifier.
6233 (build_modify_expr): Likewise.
6234 * typeck2.c (build_functional_cast): Likewise.
6236 Under the new ABI, constructors don't return `this'.
6237 * cp-tree.h (warn_reorder): Declare.
6238 (special_function_kind): New enum.
6239 (global_base_init_list): Remove declaration.
6240 (emit_base_init): Don't return a value.
6241 (check_base_init): Don't declare.
6242 (is_aggr_typedef): Likewise.
6243 * decl.c (check_special_function_return_type): New function.
6244 (return_types): Remove.
6245 (grokdeclarator): Use check_special_function_return_type.
6246 (start_function): Don't initialize ctor_label under the new ABI.
6247 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
6248 * init.c (begin_init_stmts): Move to top of file.
6249 (finish_init_stmts): Likewise.
6250 (warn_reorder): Don't declare.
6251 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
6253 (check_base_init): Remove.
6254 (is_aggr_typedef): Likewise.
6255 (build_new_1): Don't use the return value of a constructor.
6256 * semantics.c (setup_vtbl_ptr): Don't use the return value
6258 * typeck.c (check_return_expr): Don't magically convert return
6259 statements into `return this' in constructors under the new ABI.
6261 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
6262 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
6263 (base_ctor_identifier): New macro.
6264 (base_dtor_identifier): Likewise.
6265 (deleting_dtor_identifier): Likewise.
6266 * decl.c: Don't include obstack.h.
6267 (obstack_chunk_alloc): Don't define.
6268 (obstack_chunk_free): Likewise.
6269 (struct predefined_identifier): New type.
6270 (initialize_predefined_identifiers): New function.
6271 (init_decl_processing): Use it.
6272 (debug_temp_inits): Remove.
6273 (start_method): Don't call preserve_data.
6274 (hack_incomplete_structures): Update comment.
6275 * init.c (init_init_processing): Don't initialize
6277 (build_offset_rf): Remove dead code.
6278 (build_delete): Use CLASSTYPE_N_BASECLASSES.
6279 * search.c (init_search_processing): Don't initialize
6282 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6284 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
6285 some sign_compare warnings.
6287 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
6289 Rename abi::__vmi_class_type_info members.
6290 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
6291 base_list, detail_masks members to vmi_flags, vmi_base_count,
6292 vmi_bases and vmi_flags_masks respectively.
6293 (__vmi_class_type_info::vmi_flags_masks): Rename
6294 details_unknown_mask to flags_unknown_mask.
6295 * tinfo.cc (__class_type_info::do_upcast): Adjust.
6296 (__vmi_class_type_info::do_find_public_src): Adjust.
6297 (__vmi_class_type_info::do_dyncast): Adjust.
6298 (__vmi_class_type_info::do_upcast): Adjust.
6300 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
6302 * tinfo.cc (convert_to_base): New function.
6303 (get_vbase_offset): Remove. Move into convert_to_base.
6304 (__vmi_class_type_info::do_find_public_src): Adjust.
6305 (__vmi_class_type_info::do_dyncast): Adjust.
6306 (__vmi_class_type_info::do_upcast): Adjust.
6308 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
6310 * tinfo.cc (operator=): Use __builtin_strcmp.
6311 * tinfo2.cc (before): Likewise.
6313 2000-04-06 Mark Mitchell <mark@codesourcery.com>
6315 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
6316 (DECL_SAVED_INLINE): Rename to ...
6317 (DECL_DEFERRED_FN): ... this.
6318 (in_function_p): Remove declaration.
6319 (mark_inline_for_output): Rename to ...
6320 (defer_fn): ... this.
6321 * decl.c (finish_function): Adjust call to mark_inline_for_output.
6322 (in_function_p): Remove definition.
6323 * decl2.c (saved_inlines): Rename to ...
6324 (deferred_fns): ... this.
6325 (saved_inlines_used): Rename to ...
6326 (deferred_fns_used): ... this.
6327 (mark_inline_for_output): Rename to ...
6328 (defer_fn): ... this.
6329 (finish_file): Adjust accordingly.
6330 (init_decl2): Likewise.
6331 * lex.c (cons_up_default_function): Likewise.
6332 * pt.c (mark_decl_instantiated): Likewise.
6333 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
6335 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
6336 * semantics.c (expand_body): Defer more functions.
6338 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
6341 * Make-lang.in (CXX_LIB2FUNCS): Add it.
6343 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6344 __cxa_vec_delete): Declare.
6346 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
6348 * rtti.c (dfs_class_hint_mark): New static function.
6349 (dfs_class_hint_unmark): New static function.
6350 (class_hint_flags): Use them.
6352 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
6354 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
6356 2000-04-05 Mark Mitchell <mark@codesourcery.com>
6358 * cp-tree.h (instantiate_decl): Change prototype.
6359 * decl2.c (mark_used): Adjust call.
6360 * optimize.c (inlinable_function_p): Adjust handling of templates.
6361 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
6362 (do_type_instantiation): Likewise.
6363 (instantiate_decl): Defer more templates.
6364 (instantiate_pending_templates): Adjust logic to handle inline
6367 * Makefile.in (GGC_H): New variable. Use it throughout in place
6370 * call.c: Don't include obstack.h. Include ggc.h.
6371 (obstack_chunk_alloc): Don't define.
6372 (obstack_chunk_free): Likewise.
6373 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
6374 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
6375 (pop_switch): Free it.
6377 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
6379 * dump.c (dequeue_and_dump): Don't try to print the bit_position
6380 if we don't have a DECL_FIELD_OFFSET.
6382 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
6384 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
6387 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6389 * cfns.gperf (hash, libc_name_p): Prototype.
6391 * rtti.c (build_dynamic_cast_1): Constification.
6393 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
6395 * semantics.c (deferred_type_access_control): Prototype.
6397 2000-04-04 Mark Mitchell <mark@codesourcery.com>
6399 Correct many new ABI issues regarding vbase and vcall offset
6401 * cp-tree.h (BINFO_VTABLE): Document.
6402 (struct lang_type): Tweak formatting.
6403 (BINFO_PRIMARY_BINFO): Add to documentation.
6404 (CLASSTYPE_VSIZE): Fix typo in comment.
6405 (CLASSTYPE_VBASECLASSES): Update documentation.
6406 (BINFO_VBASE_MARKED): Remove.
6407 (SET_BINFO_VBASE_MARKED): Likewise.
6408 (CLEAR_BINFO_VBASE_MARKED): Likewise.
6409 (BINFO_FIELDS_MARKED): Remove.
6410 (SET_BINFO_FIELDS_MARKED): Likewise.
6411 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
6412 (enum access_kind): New enumeration.
6413 (num_extra_vtbl_entries): Remove declaration.
6414 (size_extra_vtbl_entries): Likewise.
6415 (get_vtbl_decl_for_binfo): New function.
6416 (dfs_vbase_unmark): Remove declaration.
6417 (mark_primary_bases): Likewise.
6418 * class.c (SAME_FN): Remove.
6419 (struct vcall_offset_data_s): Move definition.
6420 (build_vbase_pointer): Use `build', not `build_binary_op', to
6421 access the vbase pointer under the new ABI.
6422 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
6423 (build_primary_vtable): Likewise.
6424 (dfs_mark_primary_bases): Move here from search.c.
6425 (mark_primary_bases): Likewise.
6426 (determine_primary_bases): Under the new ABI, don't make a base
6427 class a primary base just because we don't yet have any virtual
6429 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
6430 (num_vfun_entries): Remove.
6431 (dfs_count_virtuals): Likewise.
6432 (num_extra_vtbl_entries): Likewise.
6433 (size_extra_vtbl_entries): Likewise.
6434 (layout_virtual_bases): Iterate in inheritance graph order under
6436 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
6437 indicate that a vfield is present.
6438 (init_class_processing): Initialize access_public_node, etc., from
6440 (get_vtbl_decl_for_binfo): New function.
6441 (dump_class_hierarchy_r): Likewise.
6442 (dump_class_hierarchy): Use it.
6443 (finish_vtbls): Build the vtbls in inheritance graph order.
6444 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6445 (initialize_vtable): Use get_vtbl_decl_for_binfo.
6446 (accumulate_vtbl_inits): Add comments explaining why a pre-order
6448 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
6449 where the vptr points, even for primary vtables.
6450 (build_vtbl_initializer): Adjust handling of vbase and vcall
6452 (build_vcall_and_vbase_vtable_entries): New function.
6453 (dfs_build_vbase_offset_vtbl_entries): Remove.
6454 (build_vbase_offset_vtbl_entries): Reimplement.
6455 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
6456 were already handled in a primary base class vtable.
6457 (build_vcall_offset_vtbl_entries): Adjust.
6458 (build_rtti_vtbl_entries): Adjust.
6459 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
6460 * init.c (expand_virtual_init): Simplify.
6461 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
6462 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
6463 * search.c (BINFO_ACCESS): New macro.
6464 (SET_BINFO_ACCESS): Likewise.
6465 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
6466 (access_in_type): Likewise.
6467 (dfs_accessible_p): Likewise.
6468 (protected_accessible_p): Likewise.
6469 (lookup_fnfields_1): Adjust documentation.
6470 (dfs_mark_primary_bases): Move to class.c
6471 (mark_primary_bases): Likewise.
6472 (dfs_vbase_unmark): Remove.
6473 (virtual_context): Use BINFO_FOR_VBASE.
6474 (dfs_get_vbase_types): Simplify.
6475 (dfs_build_inheritance_graph_order): New function.
6476 (get_vbase_types): Use it.
6477 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
6479 * tinfo.cc (get_vbase_offset): New function.
6480 (__vmi_class_type_info::do_find_public_src): Use it.
6481 (__vmi_class_type_info::do_dyncast): Likewise.
6482 (__vmi_class_type_info::do_upcast): Likewise.
6484 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
6486 * lang-specs.h: Pass -fno-show-column to the preprocessor.
6488 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
6490 * rtti.c (class_hint_flags): Rename flags.
6491 (class_initializer): Remove flags.
6492 (synthesize_tinfo_var): Combine offset and flags. Add flags
6493 for __vmi_class_type_info.
6494 (create_tinfo_types): Remove flags from __class_type_info and
6495 __si_class_type_info. Merge flags and offset from
6496 base_class_type_info.
6497 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
6498 (__base_class_info::is_virtual_p): Adjust.
6499 (__base_class_info::is_public_p): Adjust.
6500 (__base_class_info::offset): New accessor.
6501 (__class_type_info::details): Remove member.
6502 (__class_type_info::__class_type_info): Lose details.
6503 (__class_type_info::detail_masks): Remove.
6504 (__si_class_type_info::__si_class_type_info): Lose details.
6505 (__vmi_class_type_info::details): New member.
6506 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
6507 (__vmi_class_type_info::detail_masks): New member.
6508 * tinfo.cc (__class_type_info::do_upcast): Initialize result
6509 with unknown_details_mask.
6510 (__vmi_class_type_info::do_find_public_src): Adjust
6511 (__vmi_class_type_info::do_dyncast): Adjust.
6512 (__vmi_class_type_info::do_upcast): Set result details, if
6514 (__dynamic_cast): Temporarily #if out optimization.
6516 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
6518 * rtti.c (get_tinfo_decl): Mark used.
6519 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
6520 mark as dealt with, if we output it.
6522 2000-03-28 Mark Mitchell <mark@codesourcery.com>
6524 * class.c: Reorganize to put virtual function table initialization
6525 machinery at the end of the file.
6527 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
6529 * class.c (finish_struct): Use bitsize_zero_node.
6530 * pt.c (instantiate_class_template): Likewise.
6532 2000-03-28 Mark Mitchell <mark@codesourcery.com>
6534 Put RTTI entries at negative offsets in new ABI.
6535 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
6536 vbase offset at index -3, not -1.
6537 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
6538 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
6539 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
6540 (build_rtti_vtbl_entries): New function.
6541 (set_rtti_entry): Remove.
6542 (build_primary_vtable): Don't use it.
6543 (build_secondary_vtable): Likewise.
6544 (start_vtable): Remove.
6545 (first_vfun_index): New function.
6546 (set_vindex): Likewise.
6547 (add_virtual_function): Don't call start_vtable. Do call
6549 (set_primary_base): Rename parameter.
6550 (determine_primary_base): Likewise.
6551 (num_vfun_entries): Don't use skip_rtti_stuff.
6552 (num_extra_vtbl_entries): Include RTTI information.
6553 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
6554 (skip_rtti_stuff): Remove.
6555 (dfs_modify_vtables): Don't use it.
6556 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
6557 (layout_nonempty_base_or_field): Update size handling.
6558 (create_vtable_ptr): Tweak.
6559 (layout_class_type): Adjust parameter names.
6560 (finish_struct_1): Simplify.
6561 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
6562 (skip_rtti_stuff): Remove.
6563 (first_vfun_index): New function.
6564 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
6565 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
6566 (marked_vtable_pathp): Declare.
6567 (unmarked_vtable_pathp): Likewise.
6568 * error.c (dump_expr): Use first_vfun_index to calculate vtable
6570 * rtti.c (build_headof): Look for RTTI at negative offsets.
6571 (get_tinfo_decl_dynamic): Likewise.
6572 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
6574 (create_pseudo_type_info): Do it here instead. Adjust so that
6575 vptr points at first virtual function.
6576 * search.c (marked_vtable_pathp): Make it global.
6577 (unmarked_vtable_pathp): Likewise.
6578 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
6579 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
6580 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
6581 (get_pure_virtuals): Likewise.
6582 (expand_upcast_fixups): Likewise.
6583 * tree.c (debug_binfo): Likewise.
6584 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
6587 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6589 * class.c (check_field_decl): Fix typo.
6590 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
6591 (check_methods): Likewise.
6592 (check_field_decls): Likewise.
6593 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
6594 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
6595 Use DECL_RESULT_FLD, not DECL_RESULT.
6596 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
6597 * lex.c (identifier_type): Likewise.
6598 * pt.c (determine_specialization, lookup_template_class): Likewise.
6599 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
6600 (resolve_overloaded_unification, more_specialized): Likewise.
6601 * semantics.c (finish_member_declaration): Likewise.
6602 * typeck.c (build_x_function_call): Likewise.
6604 2000-03-26 Mark Mitchell <mark@codesourcery.com>
6606 * class.c (layout_empty_base): Handle empty bases with non-byte
6608 (build_base_field): Likewise.
6609 (layout_virtual_bases): Likewise.
6611 * class.c (finish_struct_1): Fix typo in this change:
6613 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6615 2000-03-25 Mark Mitchell <mark@codesourcery.com>
6617 * decl.c (grokdeclarator): Count partial specializations when
6618 keeping track of how many template classes have been seen.
6620 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
6622 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6624 * class.c (build_vbase_pointer_fields): layout_field now place_field.
6625 (get_vfield_offset): Use byte_position.
6626 (set_rtti_entry): Set OFFSET to ssizetype zero.
6627 (get_binfo_offset_as_int): Deleted.
6628 (dfs_record_base_offsets): Use tree_low_cst.
6629 (dfs_search_base_offsets): Likewise.
6630 (layout_nonempty_base_or_field): Reflect changes in RLI format
6631 and call byte_position.
6632 (layout_empty_base): Convert offset to ssizetype.
6633 (build_base_field): use rli_size_unit_so_far.
6634 (dfs_propagate_binfo_offsets): Do computation in proper type.
6635 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
6636 (layout_class_type): Reflect changes in RLI names and fields.
6637 (finish_struct_1): Set DECL_FIELD_OFFSET.
6638 * dump.c (dequeue_and_dump): Call bit_position.
6639 * expr.c (cplus_expand_constant): Use byte_position.
6640 * rtti.c (expand_class_desc): Use bitsize_one_node.
6641 * typeck.c (build_component_addr): Use byte_position and don't
6642 special case for zero offset.
6644 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
6646 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
6648 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
6650 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
6653 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6655 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
6657 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
6658 make_typename_type, check_initializer, cp_finish_decl,
6659 xref_tag): Likewise.
6660 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
6661 decl_namespace, arg_assoc_template_arg, arg_assoc,
6662 validate_nonmember_using_decl, do_class_using_decl): Likewise.
6663 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
6664 args_to_string): Likewise.
6665 * friend.c (is_friend): Likewise.
6666 * lex.c (note_got_semicolon, note_list_got_semicolon,
6667 is_global): Likewise.
6668 * method.c (build_overload_nested_name, build_overload_value,
6669 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
6670 * parse.y (typename_sub, typename_sub1): Likewise.
6671 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
6672 process_partial_specialization, convert_template_argument,
6673 template_args_equal, add_pending_template, lookup_template_class,
6674 for_each_template_parm_r, maybe_fold_nontype_arg,
6675 tsubst, instantiate_template, type_unification_real, unify,
6676 instantiate_pending_templates, set_mangled_name_for_template_decl):
6678 * repo.c (repo_get_id, repo_template_used): Likewise.
6679 * search.c (lookup_field_1): Likewise.
6680 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
6681 * xref.c (classname): Likewise.
6683 2000-03-22 Mark Mitchell <mark@codesourcery.com>
6685 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
6686 (CANONICAL_BINFO): New macro.
6687 (BINFO_NEW_VTABLE_MARKED): Use it.
6688 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
6689 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
6690 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
6692 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6693 (build_secondary_vtable): Likewise.
6694 (dfs_finish_vtbls): Likewise.
6695 (dfs_accumulate_vtbl_inits): Likewise.
6696 (accumulate_vtbl_inits): New function.
6697 (finish_vtbls): Make sure that virtual bases come after
6698 non-virtual bases in the vtable group.
6699 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
6700 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6701 * search.c (struct vbase_info): Move definition.
6702 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6703 (unmarked_new_vtable_p): Likewise.
6704 (dfs_mark_vtable_path): Remove.
6705 (dfs_mark_new_vtable): Remove.
6706 (dfs_unmark_new_vtable): Likewise.
6707 (dfs_clear_search_slot): Likewise.
6708 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6709 (dfs_clear_vbase_slots): Likewise.
6710 (init_vbase_pointers): LIkewise.
6712 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
6714 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
6715 SIZETYPE to a non-SIZETYPE.
6717 2000-03-21 Mark Mitchell <mark@codesourcery.com>
6719 * class.c (layout_virtual_bases): Adjust names in conditionally
6722 * class.c (record_base_offsets): New function.
6723 (layout_conflict_p): Likewise.
6724 (layout_nonempty_base_or_field): Use it.
6725 (layout_empty_base): New function.
6726 (build_base_field): Use it.
6727 (build_base_fields): Update comment.
6728 (layout_virtual_bases): Fold in a little code form
6729 layout_basetypes. Use layout_empty_base.
6730 (layout_basetypes): Remove.
6731 (end_of_class): New function.
6732 (layout_class_type): Use it. Adjust.
6734 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
6736 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
6738 (dfs_skip_nonprimary_vbases_markedp): Likewise.
6739 * typeck.c (fntype_p): Remove.
6741 * cp-tree.h (TI_SPEC_INFO): Remove.
6742 (CLASSTYPE_TI_SPEC_INFO): Likewise.
6743 * pt.c (process_partial_specialization): Likewise.
6745 * class.c (build_base_field): Fix thinko in computation of binfo
6748 * tree.c (mark_local_for_remap_p): Mark variables declared in
6749 TARGET_EXPRs as well.
6751 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
6753 * typeck.c (require_complete_type, complete_type,
6754 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
6755 build_array_ref, convert_arguments, pointer_diff,
6756 build_x_unary_op, build_unary_op, build_c_cast,
6757 build_modify_expr): Use COMPLETE_TYPE_P etc.
6758 * call.c (is_complete, convert_like_real,
6759 build_new_method_call): Likewise.
6760 * class.c (build_vbase_pointer_fields, check_bases,
6761 build_base_field, finish_struct_1, pushclass): Likewise.
6762 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
6763 * decl.c (maybe_process_template_type_declaration, pushtag,
6764 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
6765 layout_var_decl, check_initializer, cp_finish_decl,
6766 grokdeclarator, require_complete_types_for_parms,
6767 grok_op_properties, xref_tag, xref_basetypes,
6768 check_function_type): Likewise.
6769 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
6770 * friend.c (do_friend): Likewise.
6771 * init.c (build_offset_ref): Likewise.
6772 * parse.y (structsp): Likewise.
6773 * pt.c (maybe_process_partial_specialization,
6774 tsubst_friend_function, instantiate_class_template, tsubst,
6775 do_type_instantiation, instantiate_pending_templates): Likewise.
6776 * repo.c (repo_get_id): Likewise.
6777 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
6778 synthesize_tinfo_var, emit_support_tinfos): Likewise.
6779 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
6780 * semantics.c (begin_class_definition): Likewise.
6781 * tree.c (build_cplus_method_type): Likewise.
6782 * typeck2.c (digest_init, build_functional_cast,
6783 add_exception_specifier): Likewise.
6784 * parse.h, parse.c: Regenerated.
6786 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
6788 * inc/cxxabi.h: New header file. Define new-abi entry points.
6789 (__pointer_type_info::target): Rename member to ...
6790 (__pointer_type_info::type): ... here.
6791 (__base_class_info::type): Rename member to ...
6792 (__base_class_info::base): ... here.
6793 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
6794 * cp-tree.h (CPTI_ABI): New global tree enumeration.
6795 (abi_node): New global tree node.
6796 * decl.c (abi_node): Document.
6797 (init_decl_processing): Initialize abi_node.
6798 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
6799 (get_vmi_pseudo_type_info): Likewise.
6800 (create_tinfo_types): Likewise.
6801 (emit_support_tinfos): Likewise.
6802 * tinfo.h (cxxabi.h): Include for new-abi.
6803 Move rtti class definitions to new header file.
6804 * tinfo.cc (abi): Use the namespace.
6805 (std): Move new abi rtti classes from here ...
6806 (__cxxabiv1): ... to here.
6807 * tinfo2.cc (cxxabi.h): Include for new-abi.
6808 Move rtti class definitions to new header file.
6809 (std): Move new abi rtti classes from here ...
6810 (__cxxabiv1): ... to here.
6811 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
6814 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
6815 Jason Merrill <jason@casey.cygnus.com>
6817 * method.c (build_overload_int): Use host_integerp.
6819 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6821 * init.c (build_offset_ref): Handle the case of a templated member
6824 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6826 * except.c (expand_exception_blocks): Clear catch_clauses_last.
6828 2000-03-18 Mark Mitchell <mark@codesourcery.com>
6830 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
6831 * class.c (check_bitfield_decl): Turn illegal bitfields into
6833 (dfs_propagate_binfo_offsets): Adjust for new size_binop
6835 (dfs_offset_for_unshared_vbases): Likewise.
6836 * cvt.c (cp_convert_to_pointer): Convert NULL to a
6837 pointer-to-member correctly under the new ABI.
6838 * expr.c (cplus_expand_constant): Don't use cp_convert when
6839 turning an offset into a pointer-to-member.
6840 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
6841 when dereferencing them under the new ABI.
6842 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
6843 of pointers-to-members under the new ABI.
6845 * class.c (check_bitfield_decl): Remove restriction on really long
6847 (layout_class_type): Implement new ABI handling of bitfields
6848 longer than their types.
6850 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6852 * parse.y (extdefs): Call ggc_collect.
6853 * parse.c: Regenerated.
6855 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
6857 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
6858 (note_name_declared_in_class): Use OVL_CURRENT to get at a
6861 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6863 * class.c (build_vbase_path): Use integer_zerop.
6864 (build_vtable_entry): Use tree_low_cst.
6865 (get_vfield_offset): Use bit_position.
6866 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
6868 (check_bitfield_decl): Set DECL_SIZE using convert.
6869 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
6870 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
6872 (finish_struct_1): Use bit_position.
6873 (dump_class_hierarchy): Use tree_low_cst.
6874 * cp-tree.h (min_precision): Add declaration.
6875 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
6876 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
6877 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
6878 * expr.c (cplus_expand_constant): Use bit_position.
6879 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
6880 * rtti.c (get_base_offset): Use bit_position.
6881 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
6882 host_integerp, and tree_low_cst.
6883 (pointer_int_sum): Use integer_zerop.
6884 (build_component_addr): Use bit_position.
6886 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
6888 * typeck.c (require_complete_type): Don't assume size_zero_node.
6889 (complete_type_or_else): Likewise.
6891 2000-03-16 Steven Grady <grady@digitaldeck.com>
6892 Jason Merrill <jason@casey.cygnus.com>
6894 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
6896 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
6898 * decl2.c (grokfield): Bail out if type is error_mark_node.
6900 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
6902 * tinfo2.cc (__ptr_to_member_data): Rename to ...
6903 (__pointer_to_member_data): ... here. Adjust.
6904 * rtti.c (create_tinfo_types): Adjust.
6906 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
6908 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
6909 * decl.c (ref_desc_type_node): Undocument.
6910 * rtti.c (ptr_ref_initializer): Rename to ...
6911 (ptr_initializer): ... here. Adjust comments.
6912 (ptmd_initializer): Fix comment thinko.
6913 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
6914 (create_tinfo_types): Remove ref_desc_type_node init.
6915 * tinfo2.cc (__reference_type_info): Remove.
6917 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
6919 * decl.c (cp_finish_decl): Remove obsolete comment.
6921 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
6923 2000-03-14 Mark Mitchell <mark@codesourcery.com>
6925 * cp-tree.h: Tweak documentation.
6926 * class.c (build_vbase_pointer_fields): Layout the fields, too.
6927 (avoid_overlap): Remove.
6928 (get_binfo_offset_as_int): New function.
6929 (dfs_serach_base_offsets): Likewise.
6930 (layout_nonempty_base_or_field): Likewise.
6931 (build_base_field): Layout fields here. Avoid placing two objects
6932 of the same type at the same address, under the new ABI.
6933 (build_base_fields): Adjust accordingly.
6934 (create_vtable_ptr): Return the new field, but don't attach it to
6936 (remove_base_field): Remove.
6937 (remove_base_fields): Remove.
6938 (layout_basetypes): Adjust accordingly.
6939 (layout_class_type): Call layout_field for each field, rather than
6940 just making a wholesale call to layout_type.
6942 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
6944 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
6946 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
6948 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
6950 * except.c (dtor_nothrow): New fn.
6951 (do_pop_exception): Use it. Take type parm.
6952 (push_eh_cleanup): Take type parm.
6953 (expand_start_catch_block): Pass it.
6954 (build_eh_type_type_ref): Accept null type.
6956 2000-03-12 Mark Mitchell <mark@codesourcery.com>
6958 * cp-tree.h (revert_static_member_fn): Change prototype.
6959 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
6960 (grok_op_properties): Likewise.
6961 (start_function): Likewise.
6962 (revert_static_member_fn): Simplify.
6963 * pt.c (check_explicit_specialization): Adjust call to
6964 revert_static_member_fn.
6966 2000-03-11 Mark Mitchell <mark@codesourcery.com>
6968 * cp-tree.h (scope_kind): New type.
6969 (tmpl_spec_kind): Likewise.
6970 (declare_pseudo_global_level): Remove.
6971 (pseudo_global_level_p): Rename to template_parm_scope_p.
6972 (pushlevel): Remove declaration.
6973 (begin_scope): New function.
6974 (finish_scope): Likewise.
6975 (current_tmpl_spec_kind): Likewise.
6976 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
6977 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
6978 Add template_spec_p.
6979 (toplevel_bindings_p): Adjust.
6980 (declare_pseudo_global_level): Remove.
6981 (pseudo_global_level_p): Rename to template_parm_scope_p.
6982 (current_tmpl_spec_kind): New function.
6983 (begin_scope): Likewise.
6984 (finish_scope): Likewise.
6985 (maybe_push_to_top_level): Adjust.
6986 (maybe_process_template_type_declaration): Likewise.
6987 (pushtag): Likewise.
6988 (pushdecl_nonclass_level): Likewise.
6989 (lookup_tag): Likewise.
6990 (grokfndecl): Handle member template specializations. Share
6991 constructor and non-constructor code.
6992 * decl2.c (check_classfn): Handle member template specializations.
6993 * pt.c (begin_template_parm_list): Use begin_scope.
6994 (begin_specialization): Likewise.
6995 (end_specialization): Likewise.
6996 (check_explicit_specialization): Use current_tmpl_spec_kind.
6997 Handle member template specializations.
6998 (end_template_decl): Use finish_scope. Remove call to
7000 (push_template_decl_real): Remove bogus error message.
7001 (tsubst_decl): Fix typo in code contained in comment.
7002 (instantiate_template): Handle member template specializations.
7003 (most_general_template): Likewise.
7005 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
7007 * lex.c (whitespace_cr): Compress consecutive calls to warning().
7008 (do_identifier): Ditto for error().
7010 * pt.c (convert_nontype_argument): Ditto for cp_error().
7011 (convert_template_argument): Ditto for cp_pedwarn().
7013 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
7015 * exception.cc (__check_null_eh_spec): New fn.
7016 * except.c (expand_end_eh_spec): Call it if the spec is throw().
7018 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
7020 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
7021 * except.c (expand_end_eh_spec): Add the return type.
7022 * rtti.c (throw_bad_cast): Add the parmtypes.
7023 (throw_bad_typeid): Likewise.
7025 * semantics.c (expand_stmt): Only leave out rtl for unused
7026 artificials, and set DECL_IGNORED_P on them as well.
7027 * decl.c (wrapup_globals_for_namespace): Likewise.
7029 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
7031 * decl.c (maybe_commonize_var): Skip all artificial decls.
7032 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
7034 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
7036 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
7037 * cp-tree.h: Declare flag_enforce_eh_specs.
7038 * decl.c (store_parm_decls, finish_function): Check it.
7040 C library functions don't throw.
7041 * Makefile.in (cfns.h): New target.
7042 (except.o): Depend on it.
7043 * Make-lang.in (cc1plus): Depend on cfns.gperf.
7044 * cfns.gperf: New file.
7045 * cfns.h: Generated.
7046 * except.c: Include it.
7047 (nothrow_libfn_p): New fn.
7048 * decl.c (grokfndecl): Use it.
7049 * cp-tree.h: Declare it.
7051 * decl.c (push_overloaded_decl_1, auto_function,
7052 define_function): Lose.
7053 (build_library_fn_1): New static fn.
7054 (builtin_function): Use it.
7055 (get_atexit_node): Use build_library_fn_ptr.
7056 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
7057 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
7058 push_void_library_fn, push_throw_library_fn): New fns.
7059 * cp-tree.h: Declare them.
7060 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
7061 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
7062 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
7063 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
7064 * rtti.c (build_runtime_decl): Lose.
7065 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
7066 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
7067 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
7069 * call.c (build_call): Remove result_type parm.
7070 Call mark_used on unused artificial fns.
7071 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
7073 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
7075 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
7077 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
7078 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
7079 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
7080 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
7081 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
7082 expand_generic_desc): Likewise.
7084 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7086 * exception.cc (__cp_pop_exception): Cleanup the original object.
7088 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7090 * decl.c (grok_op_properties): Merge conversion to void warning
7091 with other silly op warnings.
7093 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
7095 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
7096 array CONSTRUCTOR elements. Don't use expr_tree_cons.
7098 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7100 * decl.c (cp_make_fname_decl): New function.
7101 (wrapup_globals_for_namespace): Don't emit unused static vars.
7102 (init_decl_processing): Remove comment about use of
7103 array_domain_type. Set make_fname_decl.
7104 (cp_finish_decl): Remove __FUNCTION__ nadgering.
7105 * semantics.c (begin_compound_stmt): Remove
7106 current_function_name_declared flagging.
7107 (expand_stmt): Don't emit unused local statics.
7108 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
7111 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7113 * typeck.c (convert_for_assignment): Don't look at array
7115 * call.c (convert_like_real): Likewise.
7117 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
7119 Add initial support for '\uNNNN' specifier.
7120 * lex.c (read_ucs): New fn.
7121 (readescape, skip_white_space): Call it.
7122 (is_extended_char, is_extended_char_1): New fns.
7123 (utf8_extend_token): New fn, #if 0'd out.
7124 (real_yylex): Treat extended chars like letters.
7126 * search.c (note_debug_info_needed): Walk the bases even if we
7127 weren't deferring the type itself.
7129 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7131 * decl2.c (finish_objects): Constify a char*.
7133 * method.c (emit_thunk): Likewise.
7135 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
7137 * typeck.c (dubious_conversion_warnings): Look through
7140 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7142 * class.c (dfs_modify_vtables): I is now unsigned.
7143 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
7144 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
7145 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
7146 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
7147 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
7148 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
7149 Call integer_all_onesp.
7150 * typeck2.c (process_init_constructor): Use compare_tree_int.
7152 * lang-specs.h (as): Don't call if -syntax-only.
7154 2000-03-06 Mark Mitchell <mark@codesourcery.com>
7156 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
7157 RTL_EXPR_HAS_NO_SCOPE after all.
7159 2000-03-05 Mark Mitchell <mark@codesourcery.com>
7161 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
7162 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
7163 RTL_EXPR_HAS_NO_SCOPE.
7165 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
7168 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
7170 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
7172 * call.c (convert_like): Macrofy.
7173 (convert_like_with_context): New macro.
7174 (convert_like_real): Renamed from convert_like. Add calling
7175 context parameters, for diagnostics. Add recursive flag. Call
7176 dubious_conversion_warnings for outer conversion.
7177 (build_user_type_conversion): Use convert_like_with_context.
7178 (build_over_call): Likewise. Don't warn about dubious
7179 conversions here. Adjust convert_default_arg calls.
7180 (convert_default_arg): Add context parameters for diagnostics.
7181 Pass throught to convert_like_with_context.
7182 * cp-tree.h (convert_default_arg): Add context parameters.
7183 (dubious_conversion_warnings): Prototype new function.
7184 * typeck.c (convert_arguments): Adjust convert_default_arg call.
7185 (dubious_conversion_warnings): New function, broken
7186 out of convert_for_assignment.
7187 (convert_for_assignment): Adjust.
7189 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
7191 * decl2.c (key_method): Break out from...
7192 (import_export_vtable, import_export_class): ...here.
7194 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
7195 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
7197 * search.c (note_debug_info_needed, dfs_debug_mark,
7198 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
7199 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
7201 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
7203 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
7206 2000-03-02 Mark Mitchell <mark@codesourcery.com>
7208 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
7209 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
7210 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
7211 (lang_type): Split gets_new into has_new and has_array_new.
7212 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7213 (TYPE_GETS_NEW): Split into ...
7214 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
7215 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
7216 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
7217 (build_op_new_call): Don't declare.
7218 (build_new_1): Likewise.
7219 * call.c (build_op_new_call): Remove.
7220 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
7221 instead of TYPE_NEEDS_DESTRUCTOR.
7222 (finish_struct_bits): Likewise.
7223 (add_implicitly_declared_members): Likewise.
7224 (check_field_decl): Likewise.
7225 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
7226 correctly under the new ABI.
7227 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
7228 instead of TYPE_NEEDS_DESTRUCTOR.
7229 (initialize_local_var): Likewise.
7230 (destroy_local_var): Likewise.
7231 (cp_finish_decl): Likewise.
7232 (register_dtor_fn): Likewise.
7233 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
7234 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
7235 TYPE_VEC_DELETE_TAKES_SIZE here.
7236 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
7237 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
7238 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7239 (finish_destructor_body): Likewise.
7240 (maybe_build_cleanup_1): Likewise.
7241 * decl2.c (do_static_destruction): Likewise.
7242 * init.c (build_new_1): Make it static.
7243 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7244 (expand_cleanup_for_base): Likewise.
7245 (get_cookie_size): New function.
7246 (build_new_1): Handle array-new cookies correctly under the new
7248 (build_vec_delete_1): Likewise.
7249 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7250 (build_delete): Likewise.
7251 (build_vec_delete): Handle array-new cookies correctly under the new
7253 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7254 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
7255 TYPE_HAS_ARRAY_NEW_OPERATOR.
7256 * ptree.c (print_lang_type): Check them.
7257 * search.c (context_for_name_lookup): Fix typo in comment.
7258 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7259 * tree.c (break_out_cleanups): Likewise.
7260 (build_cplus_array_test_1): Likewise.
7261 (cp_build_qualified_type_real): Likewise.
7262 * typeck.c (complete_type): Likewise.
7264 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
7265 the command-line, not the end.
7267 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
7269 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
7271 2000-03-02 Tom Tromey <tromey@cygnus.com>
7273 * cp-tree.h (build_java_class_ref): Declare.
7274 * init.c (build_java_class_ref): No longer static.
7275 * except.c (expand_throw): Generate a Java-style `throw' if the
7276 thrown object is a "Java" object.
7277 (initialize_handler_parm): Generate a Java-style lookup of
7278 exception info if the caught object is a "Java" object.
7279 (catch_language, catch_language_init): New globals.
7280 (decl_is_java_type): New function.
7281 (expand_start_catch_block): Don't call push_eh_info() or
7282 push_eh_cleanup() when handling a Java-style "catch". Pass Java
7283 class reference to build_catch_block.
7285 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7287 * typeck.c (comptypes): Treat sizetype like its language equivalent.
7289 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
7291 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
7292 to merge reference/pointer code and fix incorrect warnings.
7294 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
7296 * search.c (protected_accessible_p): Use context_for_name_lookup.
7298 * init.c (construct_virtual_bases): Fix thinko.
7299 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
7301 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
7303 * decl.c (current_function_decl): Move to toplev.c.
7305 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
7307 * pt.c (fn_type_unification): Unify return type, whenever
7309 (get_bindings_real): Only pass return type when necessary.
7310 Remove explicit return type check.
7311 * class.c (resolve_address_of_overloaded_function): Pass desired
7312 return type to fn_type_unification.
7314 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7316 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
7318 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
7320 * rtti.c (expand_class_desc): Likewise.
7321 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
7322 (THUNK_VCALL_OFFSET): Likewise.
7323 (THUNK_DELTA): Reflect changes in ../tree.h.
7325 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
7327 * search.c (protected_accessible_p): Also allow the access if
7328 the member is public in DERIVED. Lose TYPE parm.
7329 (friend_accessible_p): Lose TYPE parm.
7330 (accessible_p): Adjust.
7332 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7334 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
7335 on things that are not sizes; ssize_binop deleted.
7336 Call size_diffop when appropriate.
7337 (dfs_build_vcall_offset_vtbl_entries): Likewise.
7338 (build_primary_vtable, build_secondary_vtable): Likewise.
7339 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
7340 Variable I is HOST_WIDE_INT.
7341 (get_vfield_offset): Pass proper types to size_binop.
7342 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
7343 (finish_struct_1): Likewise.
7344 (skip_rtti_stuff): Arg N is now pointer to signed.
7345 (layout_class_type): Use size_zero_node.
7346 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
7347 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
7348 * decl.c (complete_arry_type): Pass proper types to size_binop.
7349 (xref_basetypes): BINFO_OFFSET is sizetype.
7350 * error.c (dump_expr): Don't use size_binop non-sizes.
7351 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
7352 * init.c (construct_virtual_bases): Fix type error.
7353 (build_vec_delete_1): Pass proper type to size_binop and don't
7355 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
7356 * rtti.c (get_base_offset): Pass proper type to size_binop.
7357 * search.c (dfs_find_vbases): Fix type error.
7358 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
7359 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
7360 * tree.c (debug_binfo): Variable N is signed.
7361 Use HOST_WIDE_INT_PRINT_DEC.
7362 * typeck.c (comptypes): sizetype is same as equivalent integer type.
7363 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
7364 size_one_node and size_zero_node.
7365 (c_alignof): Use size_one_node.
7366 (build_component_addr): Pass proper types to size_binop.
7367 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
7369 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
7371 Implement class scope using-declarations for functions.
7372 * class.c (handle_using_decl): Call add_method for used functions.
7373 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
7374 (add_method): Used functions are hidden by local functions.
7375 (check_bases_and_members): Handle using-decls before finalizing
7376 CLASSTYPE_METHOD_VEC.
7377 * call.c (add_function_candidate): Add ctype parm; if non-zero,
7378 override the type of 'this' accordingly.
7379 (add_template_candidate, add_template_candidate_real): Add ctype parm.
7380 (convert_class_to_reference, build_user_type_conversion_1,
7381 build_new_function_call, build_object_call, build_new_op,
7382 build_new_method_call): Pass ctype parm.
7384 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
7386 * call.c (convert_class_to_reference, build_user_type_conversion_1,
7387 build_new_function_call, build_object_call, build_new_op,
7388 build_new_method_call, build_op_delete_call): Don't get basetype_path
7390 * typeck.c (build_component_ref): Likewise.
7391 * init.c (build_offset_ref): Likewise.
7392 (resolve_offset_ref): Don't call enforce_access.
7393 Call build_scoped_ref.
7394 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
7395 would cause an error or if -pedantic.
7396 * class.c (alter_access): Lose binfo parm.
7398 2000-02-26 Mark Mitchell <mark@codesourcery.com>
7400 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
7403 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
7405 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
7406 pseudo_type_info creation into the std namespace
7408 2000-02-26 Mark Mitchell <mark@codesourcery.com>
7410 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
7411 (import_export_class): Remove declaration.
7412 * decl2.c (import_export_class): Make it static.
7413 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
7414 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
7415 EXPR_WITH_FILE_LOCATION.
7416 * lex.c (check_newline): Tweak filename/lineno setting.
7417 * semantics.c (begin_while_stmt): Fix typo in comment.
7419 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7421 * lang-options.h (-fmessage-length=): Add missing option.
7423 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
7425 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
7427 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
7429 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
7431 * optimize.c (expand_call_inline): Emit the return label before
7432 evaluating the return value.
7434 2000-02-24 Mark Mitchell <mark@codesourcery.com>
7436 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
7437 than duplicating functionality here.
7438 * optimize.c: Include input.h.
7439 (expand_call_inline): Use push_srcloc and pop_srcloc.
7440 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
7441 * parse.c: Regenerated.
7442 * Makefile.in (lex.o): Depend on input.h.
7443 (optimize.o): Likewise.
7445 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
7447 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
7448 function type, rather than ICE.
7450 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
7452 * decl.c (grokdeclarator): Call decl_type_access_control.
7453 * parse.y (parse_end_decl): Don't call decl_type_access_control if
7456 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
7458 * decl.c (decls_match): Remove obsolete static member nadgering.
7460 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7462 * decl.c (grokdeclarator): Change ANSI to ISO.
7463 * lex.c (consume_string, readescape, do_identifier): Likewise.
7464 (parse_float, real_yylex): Likewise.
7465 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
7466 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
7467 new_type_id, maybe_label_decls, simple_stmt,
7468 for.init.statement): Likewise.
7469 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
7470 * semantics.c (finish_named_return_value): Likewise.
7471 * parse.c: Regenerate.
7473 2000-02-21 Mark Mitchell <mark@codesourcery.com>
7475 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
7476 (CPTI_CLASS_STAR_TYPE): Remove.
7477 (vtable_index_type): Likewise.
7478 (class_star_type_node): Remove.
7479 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
7480 (build_binary_op_nodefault): Remove.
7481 * call.c (build_new_op): Use build_binary_op instead of
7482 build_binary_op_nodefault.
7483 * decl.c (init_decl_processing): Remove class_star_type_node
7484 initialization. Make delta_type_node ptrdiff_type_node under the
7485 new ABI. Initialize vtable_index_type.
7486 (build_ptrmemfunc_type): Build different structures for the new
7488 (build_enumerator): Use build_binary_op instead of
7489 build_binary_op_nodefault.
7490 * method.c (build_overload_value): Mangle pointers-to-members
7491 appropriately under the new ABI.
7492 * typeck.c (build_array_ref): Use build_binary_op instead of
7493 build_binary_op_nodefault.
7494 (get_member_function_from_ptrfunc): Adjust for the new ABI.
7495 (build_binary_op_nodefault): Rename to ...
7496 (build_binary_op): ... this. Remove old version. Adjust for
7497 pointer-to-member comparisons under the new ABI.
7498 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
7499 (build_ptrmemfunc): Adjust for the new ABI.
7500 (expand_ptrmemfunc_cst): Likewise.
7501 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
7502 (pfn_from_ptrmemfunc): Adjust for the new ABI.
7504 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
7506 * call.c (build_object_call): Compress consecutive calls to
7508 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
7509 (build_op_delete_call): Adjust message formatting.
7511 * class.c (check_bases): Compress consecutive calls to
7513 (finish_struct_anon): Say 'ISO C++'.
7515 * decl.c (start_decl): Same here.
7516 (grok_reference_init): Likewise.
7517 (grokfndecl): Correct message formatting.
7518 (grokfndecl): Improve diagnostic.
7519 (check_static_variable_definition): Likewise. Say 'ISO C++'
7520 (compute_array_index_type): Say 'ISO C++'
7521 (create_array_type_for_decl): Compress consecutive calls to
7523 (grokdeclarator): Say 'ISO C++'
7524 (grok_op_properties): Likewise.
7526 * decl2.c (delete_sanity): Clairify diagnostic.
7527 (check_member_template): Same here.
7528 (grok_function_init): Use consistent terminology.
7530 * expr.c (do_case): Say 'ISO C++'
7532 * friend.c (do_friend): Compress consecutive calls to warning.
7534 2000-02-20 Mark Mitchell <mark@codesourcery.com>
7536 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
7537 * class.c (build_secondary_vtable): Reorganize. Don't create a
7538 new vtable under the new ABI.
7539 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
7541 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
7542 the initializing elements.
7543 (initialize_vtable): New function.
7544 (dfs_finish_vtbls): Use it.
7545 (dfs_accumulate_vtbl_inits): New function.
7546 (finish_vtbls): Merge primary and secondary vtables under the new
7548 (finish_struct_1): Remove redundant call to layout_vtable_decl.
7549 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
7552 * class.c (build_vtable): New function, split out from ...
7553 (get_vtable_decl): ... here, and ...
7554 (build_secondary_vtable): ... here.
7556 * pt.c (tsubst_decl): Fix formatting.
7558 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7560 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
7561 (avoid_overlap, build_base_field): Likewise.
7562 (build_base_field, build_base_fields, is_empty_class):
7563 Test DECL_SIZE with integer_zero.
7564 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
7565 * cp-tree.h (struct lang_type): New field size_unit.
7566 (CLASSTYPE_SIZE_UNIT): New macro.
7567 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
7568 (cp_finish_decl): Delete -Wlarger-than processing.
7569 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
7570 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
7571 * tree.c (make_binfo): binfo vector is one entry longer.
7572 (walk_tree): Walk DECL_SIZE_UNIT.
7574 2000-02-19 Mark Mitchell <mark@codesourcery.com>
7576 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
7578 (build_vtable_entry): Don't assume all vtable entries are
7580 (build_vtbl_initializer): Adjust accordingly.
7581 (get_vtable_decl): Fix formatting.
7583 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
7585 * semantics.c (deferred_type_access_control): Walk the entire
7587 (save_type_access_control): Rename from
7588 initial_deferred_type_access_control. Just remember the value.
7589 (decl_type_access_control): New fn.
7590 (begin_function_definition): Use deferred_type_access_control, after
7591 we've started the function. Set type_lookups to error_mark_node.
7592 * parse.y (frob_specs, fn.def1): Adjust.
7593 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
7594 (parse_end_decl, parse_bitfield0, parse_method): New fns.
7595 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
7596 (after_type_component_declarator0): Likewise.
7597 (after_type_component_declarator): Likewise.
7598 (notype_component_declarator): Likewise.
7599 * cp-tree.h: Adjust.
7601 * decl.c (redeclaration_error_message): Allow redeclaration of
7602 namespace-scope decls.
7604 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
7606 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
7608 2000-02-17 Mark Mitchell <mark@codesourcery.com>
7610 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
7611 * decl2.c (grokclassfn): Likewise.
7613 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
7615 * decl2.c (lang_decode_option): Don't set default message length
7617 * lex.c (lang_init_options): Set it here.
7619 2000-02-16 Mark Mitchell <mark@codesourcery.com>
7621 Make DECL_CONTEXT mean the class in which a member function was
7622 declared, even for a virtual function.
7623 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
7624 (DECL_FRIEND_CONTEXT): New macro.
7625 (DECL_REAL_CONTEXT): Remove.
7626 (SET_DECL_FRIEND_CONTEXT): Likewise.
7627 (DECL_VIRTUAL_CONTEXT): Adjust.
7628 (DECL_CLASS_SCOPE_P): Use TYPE_P.
7629 (add_friends): Remove.
7630 (hack_decl_function_context): Likewise.
7631 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
7633 (build_over_call): Fix indentation. Use DECL_CONTEXT
7634 instead of DECL_CLASS_CONTEXT.
7635 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
7636 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
7637 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7638 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
7639 (build_base_field): Likewise.
7640 (finish_struct_1): Likewise.
7641 (build_self_reference): Likewise.
7642 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
7644 (pushtag): Use decl_function_context, not
7645 hack_decl_function_context.
7646 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7647 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
7648 (pushdecl): Remove bogus code.
7649 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
7650 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7651 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7652 Use decl_function_context, nothack_decl_function_context.
7653 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
7654 (grokdeclarator): Likewise. Use decl_function_context, not
7655 hack_decl_function_context.
7656 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
7657 (start_function): Use DECL_FRIEND_CONTEXT, not
7658 DECL_CLASS_CONTEXT. Use decl_function_context, not
7659 hack_decl_function_context.
7660 (finish_function): Use decl_function_context, not
7661 hack_decl_function_context.
7662 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
7664 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
7665 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
7666 (grokfield): Likewise.
7667 (finish_builtin_type): Likewise.
7668 (finish_vtable_vardec): Use decl_function_context, not
7669 hack_decl_function_context.
7670 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7671 (start_static_initialization_or_destruction): Likewise.
7672 (finish_static_initialization_or_destruction): Likewise.
7673 (mark_used): Adjust logic for deciding when to synthesize methods.
7674 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
7676 * error.c (dump_function_decl): Use DECL_CONTEXT, not
7678 * friend.c (is_friend): Likewise.
7679 (add_friends): Remove.
7680 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
7681 * lex.c (begin_definition_of_inclass_inline): Use
7682 decl_function_context, not hack_decl_function_context.
7683 (process_next_inline): Likewise.
7684 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7685 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
7686 DECL_CLASSS_CONTEXT.
7687 (hack_identifier): Likewise.
7688 (synthesize_method): Use decl_function_context, not
7689 hack_decl_function_context.
7690 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
7692 (is_member_template): Use decl_function_context, not
7693 hack_decl_function_context. Use DECL_CONTEXT, not
7695 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
7697 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
7699 (push_template_decl_real): Likewise.
7700 (instantiate_class_template): Don't call add_friends.
7701 (tsubst_default_argument): Use DECL_CONTEXT, not
7703 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
7704 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7705 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
7707 * repo.c (repo_inline_used): Likewise.
7708 * search.c (current_scope): Adjust for new _CONTEXT macros.
7709 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
7711 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7712 (lookup_fnfields_here):Likewise.
7713 (check_final_overrider): Likewise.
7714 (init_vbase_pointers): Likewise.
7715 (virtual_context): Likewise.
7716 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
7717 (expand_body): Use decl_function_context, not
7718 hack_decl_function_context.
7719 * tree.c (hack_decl_function_context): Remove.
7720 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
7722 * typeck2.c (error_not_base_type): Likewise.
7724 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
7726 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
7728 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7730 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
7732 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
7734 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
7736 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
7738 * decl2.c (lang_decode_option): Enable automatic line wrapping.
7740 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
7742 * parse.y (frob_specs): Split out...
7743 (parse_decl): From here.
7744 (fn.def2): Call initial_deferred_type_access_control.
7745 (after_type_component_declarator0): Call frob_specs.
7746 (notype_component_declarator0): Likewise.
7747 * search.c (friend_accessible_p): Nested classes are friends of their
7750 2000-02-10 Mark Mitchell <mark@codesourcery.com>
7752 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
7753 used to create an implicit temporary.
7755 * class.c (dfs_modify_vtables): Tweak calculation of functions to
7758 2000-02-08 Nathan Sidwell <nathan@acm.org>
7760 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
7761 strip array element qualifiers too.
7763 2000-02-07 Mark Mitchell <mark@codesourcery.com>
7765 * decl.c (store_parm_decls): Don't build cleanups for parameters
7766 while processing_template_decl.
7768 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
7770 * cp-tree.h (struct saved_scope): Add incomplete field.
7771 (namespace_scope_incomplete): New macro.
7772 * decl.c (pushdecl): Use it.
7773 (hack_incomplete_structures): Use it. See through artificial
7775 (mark_saved_scope): Mark it.
7777 Implement access control for nested types.
7778 * search.c (type_access_control): New fn.
7779 (accessible_p): Now we do perform access control for types.
7780 * semantics.c (deferred_type_access_control): New fn.
7781 (initial_deferred_type_access_control): New fn.
7782 (begin_function_definition): Call it. Add lookups parm.
7783 * decl.c (struct binding_level): Add this_class field.
7784 (pushlevel_class): Set it.
7785 (mark_binding_level): Mark it.
7786 (lookup_name_real): Use it. Call type_access_control.
7787 (mark_saved_scope): Mark lookups field.
7788 * cp-tree.h (flagged_type_tree): Add lookups field.
7789 (struct saved_scope): Add lookups field.
7790 (type_lookups): New macro.
7791 * parse.y (declmods): Now <ftype>.
7792 (parse_decl): Add lookups parm. Call
7793 initial_deferred_type_access_control.
7794 (lang_extdef): Clear type_lookups.
7795 (typed_declspecs, declmods, typespec): Set lookups field.
7796 (initdcl): Call deferred_type_access_control.
7797 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
7798 component_decl_1, named_parm): Adjust.
7799 * friend.c (is_friend): Nested classes are friends of their
7802 * class.c (currently_open_derived_class): New fn.
7803 * method.c (hack_identifier): Use it.
7805 * lex.c (do_identifier): Remove obsolete code.
7807 * parse.y (typed_typespecs): Propagate new_type_flag properly.
7809 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
7811 * tinfo.h: Remove apostrophes from C++ comment (xgettext
7812 thinks this file is plain C).
7814 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7816 * Makefile.in (call.o): Depend on $(EXPR_H).
7818 * call.c: Include "expr.h".
7820 * class.c (dump_class_hierarchy): Add prototype.
7822 * search.c (dfs_get_pure_virtuals): Likewise.
7824 2000-02-1 Ulrich Drepper <drepper@redhat.com>
7826 * parse.y (simple_stmt): Allow :: token in asm parameter list.
7829 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
7831 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
7832 Store it in DECL_FCONTEXT.
7833 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
7835 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
7837 * tinfo.h (old abi): #include "tconfig.h".
7838 * tinfo.cc (convert_to_base): Move into old abi section.
7840 2000-01-31 Mark Mitchell <mark@codesourcery.com>
7842 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
7843 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
7844 (BINFO_PRIMARY_BINFO): New macro.
7845 (BF_DELTA): Rename to ...
7846 (BV_DELTA): ... this.
7847 (BF_VCALL_INDEX): Rename to ...
7848 (BV_VCALL_INDEX): ... this.
7849 (BF_FN): Rename to ...
7851 * class.c (build_vbase_path): Adjust for changes to reverse_path.
7852 (set_rtti_entry): Rename BF_ macros to BV_ variants.
7853 (modify_vtable_entry): Simplify.
7854 (add_virtual_function): Rename BF_ macros to BV_ variants.
7855 (build_vtable_initializer): Likewise.
7856 (get_class_offset_1): Remove.
7857 (dfs_get_class_offset): Likewise.
7858 (get_class_offset): Likewise.
7859 (dfs_find_final_overrider): New function.
7860 (find_final_overrider): Likewise.
7861 (modify_one_vtable): Remove.
7862 (dfs_find_base): New function.
7863 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
7864 find_final_overrider.
7865 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
7867 (dfs_fixup_vtable_deltas): Remove.
7868 (override_one_vtable): Remove.
7869 (merge_overrides): Likewise.
7870 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
7871 unreal chilren of virtual bases.
7872 (finish_struct_1): Don't use merge_overrides. Don't use
7873 dfs_fixup_vtable_deltas.
7874 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
7877 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
7878 Jason Merrill <jason@yorick.cygnus.com>
7880 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
7882 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
7884 * exception.cc (__throw_bad_typeid): Add missing std::.
7886 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7888 * cp-tree.h (make_thunk): PROTO -> PARAMS.
7890 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
7892 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
7894 Runtime support for new-abi rtti.
7895 * inc/typeinfo (type_info::operator!=): Define in class.
7896 (type_info::before, type_info::name, type_info::operator==,
7897 type_info::operator!=): Define new ABI implementations.
7898 (type_info::is_pointer_p, type_info::is_function_p): Declare
7899 new virtual functions.
7900 (type_info::do_catch, type_info::do_upcast): Likewise.
7902 * tinfo.h (__base_class_info): Define new class.
7903 (__class_type_info): Likewise.
7904 (__si_class_type_info): Likewise.
7905 (__vmi_class_type_info): Likewise.
7906 (__dynamic_cast): Prototype.
7908 * tinfo.cc: Conditionalize old and new rtti mechanisms.
7909 (type_info::is_pointer_p): Define new function.
7910 (type_info::is_function_p): Likewise.
7911 (type_info::do_catch): Likewise.
7912 (type_info::do_upcast): Likewise.
7913 (vtable_prefix): New structure for vtable access.
7914 (adjust_pointer): Define new template function.
7915 (contained_p, public_p, virtual_p, contained_public_p,
7916 contained_nonpublic_p, contained_nonvirtual_p): Define new
7918 (nonvirtual_base_type): New local variable.
7919 (__class_type_info::~__class_type_info): Define.
7920 (__si_class_type_info::~__si_class_type_info): Likewise.
7921 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
7922 (__class_type_info::do_catch): Define new function.
7923 (__class_type_info::do_upcast): Likewise.
7924 (__class_type_info::find_public_src): Likewise.
7925 (__class_type_info::do_find_public_src): Likewise.
7926 (__si_class_type_info::do_find_public_src): Likewise.
7927 (__vmi_class_type_info::do_find_public_src): Likewise.
7928 (__class_type_info::do_dyncast): Likewise.
7929 (__si_class_type_info::do_dyncast): Likewise.
7930 (__vmi_class_type_info::do_dyncast): Likewise.
7931 (__class_type_info::do_upcast): Likewise.
7932 (__si_class_type_info::do_upcast): Likewise.
7933 (__vmi_class_type_info::do_upcast): Likewise.
7934 (__dynamic_cast): Likewise.
7936 * tinfo2.cc (__fundamental_type_info): Define new class.
7937 (__pointer_type_info): Likewise.
7938 (__reference_type_info): Likewise.
7939 (__array_type_info): Likewise.
7940 (__function_type_info): Likewise.
7941 (__enum_type_info): Likewise.
7942 (__ptr_to_member_type_info): Likewise.
7943 (__fundamental_type_info::~__fundamental_type_info): Define.
7944 (__pointer_type_info::~__pointer_type_info): Likewise.
7945 (__reference_type_info::~__reference_type_info): Likewise.
7946 (__array_type_info::~__array_type_info): Likewise.
7947 (__function_type_info::~__function_type_info): Likewise.
7948 (__enum_type_info::~__enum_type_info): Likewise.
7949 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
7950 (__pointer_type_info::do_catch): Define new function.
7951 (__ptr_to_member_type_info::do_catch): Define new function.
7953 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
7954 (__is_pointer): Likewise.
7956 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
7958 2000-01-30 Mark Mitchell <mark@codesourcery.com>
7960 * cp/class.c (build_vtable): Rename to build_primary_vtable.
7961 (prepare_fresh_vtable): Rename to build_secondary_vtable.
7962 (make_new_vtable): New function.
7963 (modify_vtable_entry): Handle generation of new vtables correctly.
7964 (modify_one_vtable): Remove unused parameter.
7965 (dfs_fixup_vtable_deltas): Likewise.
7966 (override_one_vtable): Use build_secondary_vtable.
7967 (finish_struct_1): Use build_primary_vtable and
7968 build_secondary_vtable.
7970 2000-01-28 Ulrich Drepper <drepper@redhat.com>
7972 * cp/decl.c: Adjust variable names, comments, help strings.
7974 2000-01-29 Nathan Sidwell <nathan@acm.org>
7976 * new2.cc (operator delete[]): Use operator delete, don't assume
7979 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
7981 * class.c (build_vtbl_initializer): Add argument to
7982 build_vtable_entry call.
7984 2000-01-27 Mark Mitchell <mark@codesourcery.com>
7986 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
7987 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
7988 (BF_DELTA): New macro.
7989 (BF_VCALL_INDEX): Likewise.
7991 (THUNK_VCALL_OFFSET): Likewise.
7992 (make_thunk): Change prototype.
7993 * class.c (build_vtable_entry): Integrate
7994 build_vtable_entry_for_fn. Handle vcall indices.
7995 (build_vtable_entry_for_fn): Remove.
7996 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
7997 BF_VCALL_INDEX, BF_FN.
7998 (modify_vtable_entry): Integrate common code from
7999 modify_one_vtable and dfs_fixup_vtable_deltas.
8000 (add_virtual_function): Set BF_VCALL_INDEX.
8001 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
8003 (modify_one_vtable): Simplify.
8004 (dfs_fixup_vtable_deltas): Likewise.
8005 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
8006 * method.c (make_thunk): Handle vcall indices.
8008 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
8010 Compiler side new abi rtti (not enabled).
8011 * cp-tree.h (new_abi_rtti_p): New macro.
8012 (emit_support_tinfos): Prototype new function.
8013 (tinfo_decl_p): Likewise.
8014 (emit_tinfo_decl): Likwise.
8015 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
8017 (doing_runtime): New local static.
8018 (init_rtti_processing): Add new-abi initializer.
8019 (get_tinfo_decl): Add new-abi logic.
8020 (tinfo_from_decl): Likewise.
8021 (build_dynamic_cast_1): Likewise.
8022 (qualifier_flags): New static function.
8023 (tinfo_base_init): Likewise.
8024 (generic_initializer): Likewise.
8025 (ptr_ref_initializer): Likewise.
8026 (ptmd_initializer): Likewise.
8027 (class_hint_flags): Likewise.
8028 (class_initializer): Likewise.
8029 (synthesize_tinfo_var): Likewise.
8030 (create_real_tinfo_var): Likewise.
8031 (create_pseudo_type_info): Likewise.
8032 (get_vmi_pseudo_type_info): Likewise.
8033 (create_tinfo_types): Likewise.
8034 (emit_support_tinfos): New global function.
8035 (tinfo_decl_p): New global predicate.
8036 (emit_tinfo_decl): New global function.
8037 * class.c (set_rtti_entry): Generalize for old and new rtti.
8038 (build_vtbl_initializer): Likewise.
8039 * decl2.c (finish_file): Likewise.
8041 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
8043 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
8044 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
8046 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
8048 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
8051 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
8053 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
8055 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8057 * optimize.c (calls_setjmp_r): Supply new argument
8058 to special_function_p.
8060 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8062 * call.c: PROTO -> PARAMS.
8063 * class.c: Likewise.
8064 * cp-tree.h: Likewise.
8068 * decl2.c: Likewise.
8070 * errfn.c: Likewise.
8071 * error.c: Likewise.
8072 * except.c: Likewise.
8075 * input.c: Likewise.
8078 * method.c: Likewise.
8079 * optimize.c: Likewise.
8080 * parse.y: Likewise.
8084 * search.c: Likewise.
8085 * semantics.c: Likewise.
8088 * typeck.c: Likewise.
8089 * typeck2.c: Likewise.
8092 2000-01-25 Richard Henderson <rth@cygnus.com>
8094 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
8096 2000-01-25 Mark Mitchell <mark@codesourcery.com>
8098 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
8099 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
8100 (struct vcall_offset_data_s): New type.
8101 (dfs_vcall_offset_queue_p): New function.
8102 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8103 (build_vcall_offset_vtbl_entries): Likewise.
8104 (layout_vtable_decl): Likewise.
8105 (num_vfun_entries): Likewise.
8106 (num_extra_vtbl_entries): Add the entries for vcall offsets.
8107 (build_vtbl_initializer): Likewise.
8108 (dfs_finish_vtabls): Use layout_vtable_decl.
8109 (modify_one_vtables): Always duplicate vtables under the new ABI.
8110 (finish_struct_1): Use layout_vtable_decl.
8112 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8114 * decl.c (member_function_or_else): Change third arg from a format
8115 specifier to an `enum overload_flags'. Callers changed.
8117 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
8119 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
8120 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
8121 build_const_cast, get_delta_difference, check_return_expr): Avoid
8122 ANSI string concatenation usage.
8124 2000-01-24 Mark Mitchell <mark@codesourcery.com>
8126 * class.c (layout_class_type): Put the fields required to make a
8127 class non-empty at the end, not the beginning, of the TYPE_FIELDs
8130 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
8132 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
8135 * decl2.c (mark_used): Do instantiate inlines that have been
8136 explicitly instantiated.
8138 2000-01-24 Richard Henderson <rth@cygnus.com>
8140 * call.c (build_over_call): Use expand_tree_builtin.
8141 * typeck.c (build_function_call_real): Likewise.
8142 (build_binary_op_nodefault): Handle unordered compares.
8144 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8146 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
8147 cp_tree_index values.
8148 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
8149 New global node #defines for them.
8150 * rtti.c (call_void_fn): Replace with ...
8151 (build_runtime_decl): ... new static function.
8152 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
8153 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
8154 (build_dynamic_cast_1): Always produce correctly typed result.
8155 Explicitly produce type_info addresses. Use dynamic_cast_node.
8156 * exception.cc (__throw_bad_cast): Return `void *'.
8157 (__throw_bad_typeid): Return `const type_info &'.
8159 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8161 * cp-tree.h (get_vtable_decl): Prototype new function.
8162 * class.c (get_vtable_decl): New function. Broken out from ...
8163 (build_vtable): ... here. Use it.
8164 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
8167 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8169 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
8170 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
8171 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
8172 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
8173 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
8174 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
8175 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
8176 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
8177 (CPTI_TINFO_VAR_ID): New enumeration.
8178 (__tp_desc_type_node, __access_mode_type_node,
8179 __bltn_desc_type_node, __user_desc_type_node,
8180 __class_desc_type_node, __ptr_desc_type_node,
8181 __attr_desc_type_node, __func_desc_type_node,
8182 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
8183 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
8184 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
8185 enum_desc_type_node, class_desc_type_node,
8186 si_class_desc_type_node, vmi_class_desc_type_node,
8187 ptmd_desc_type_node, base_desc_type_node): New #defines.
8188 (tinfo_fn_id, tinfo_fn_type): Rename to ...
8189 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
8190 (tinfo_var_id): New enumeration.
8191 (DECL_TINFO_FN_P): Augment comment.
8192 * decl.c (cp_global_trees): Adjust documentation.
8193 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
8194 tinfo_decl_type and tinfo_var_id.
8195 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
8196 (build_typeid): Remove unused variable.
8197 (get_tinfo_var): Use tinfo_var_id.
8198 (tinfo_name): New static function.
8199 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
8200 (tinfo_from_decl): Likewise.
8201 (get_base_offset): New static function, broken out of
8203 (expand_si_desc): Use tinfo_name.
8204 (expand_class_desc): Likewise. Lose local static variable.
8205 Use base_desc_type_node. Use get_base_offset.
8206 (expand_ptr_desc): Use tinfo_name.
8207 (expand_attr_desc): Likewise.
8208 (expand_generic_desc): Likewise.
8210 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
8211 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
8213 2000-01-23 Mark Mitchell <mark@codesourcery.com>
8215 * cp-tree.h (__eprintf): Remove declaration.
8216 * tree.c (__eprintf): Remove definition.
8218 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
8219 Mark Mitchell <mark@codesourcery.com>
8221 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
8222 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
8224 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
8226 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
8228 2000-01-23 Mark Mitchell <mark@codesourcery.com>
8230 * cp-tree.h (register_dtor_fn): New function.
8231 * decl.c (destroy_local_static): Rename to ...
8232 (register_dtor_fn): ... this. Give it external linkage.
8233 (expand_static_init): Use it.
8234 * decl2.c (do_static_initialization): Likewise, if using
8236 (do_static_destruction): Check that __cxa_atexit is not in use.
8237 (finish_file): Don't call do_static_destruction if using
8240 * typeck.c (convert_arguments): Restore two-message error
8243 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
8245 Remap dynamic cast hint values to be consistent across ABIs.
8246 * search.c (dynamic_cast_base_recurse): Remap generated value.
8247 (get_dynamic_cast_base_type): Adjust documentation.
8248 * tinfo.h (__user_type_info::dyncast): Likewise.
8249 (__user_type_info::find_public_subobj): Remap BOFF meaning.
8250 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
8251 (__class_type_info::do_dyncast): Likewise.
8252 (__class_type_info::do_find_public_subobj): Likewise.
8253 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
8255 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
8257 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
8259 * typeck2.c (incomplete_type_error): Restore previous
8260 cp_error and cp_error_at call sequence.
8262 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
8264 * class.c (dump_class_hierarchy): Make format agree with argument;
8265 cast pointer to unsigned long and print with %lx.
8267 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
8269 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
8271 * typeck.c (composite_pointer_type, common_type,
8272 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
8273 build_function_call_real, convert_arguments,
8274 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
8275 build_unary_op, mark_addressable, build_compound_expr,
8276 build_static_cast, build_reinterpret_cast, build_const_cast,
8277 build_c_cast, build_modify_expr, get_delta_difference,
8278 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
8279 'ISO C++'. Fusion consecutive calls to diagnotic message routines
8281 * typeck2.c (readonly_error, abstract_virtuals_error,
8282 process_init_constructor, check_for_new_type): Likewise.
8284 2000-01-19 Mark Mitchell <mark@codesourcery.com>
8286 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
8289 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
8291 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
8292 (build_x_typeid): Likewise.
8293 (get_tinfo_fn): Likewise.
8294 (get_tinfo_fn_unused): Rename to ...
8295 (get_tinfo_decl): ... here.
8296 * rtti.c (build_headof): Replace logic error with assertion.
8297 (get_tinfo_fn_dynamic): Rename to ...
8298 (get_tinfo_decl_dynamic): ... here. Make static. Use
8299 complete_type_or_else.
8300 (build_x_typeid): Move into ...
8301 (build_typeid): ... here. Adjust call to
8302 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
8303 throw_bad_typeid expression.
8304 (get_tinfo_fn_unused): Rename to ...
8305 (get_tinfo_decl): ... here. Adjust comment.
8306 (get_tinfo_fn): Delete.
8307 (tinfo_from_decl): New static function.
8308 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
8309 (get_typeid): Use complete_type_or_else.
8310 (build_dynamic_cast_1): Adjust calls to
8311 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
8312 * parse.y (primary): Adjust call to build_typeid.
8313 * except.c (build_eh_type_type_ref): Adjust call to
8314 get_tinfo_decl. Mark as used.
8315 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
8316 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
8317 * parse.c: Regenerated.
8319 2000-01-17 Mark Mitchell <mark@codesourcery.com>
8321 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
8323 (resolves_to_fixed_type_p): Document calling convention.
8324 * rtti.c (build_x_typeid): Initialize NONNULL.
8326 * cp-tree.h (build_shared_int_cst): New function.
8327 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
8328 * class.c (modify_vtable_entry): Likewise.
8329 (add_virtual_function): Split out code to generated shared
8330 INTEGER_CSTs to build_share_int_cst.
8331 (modify_all_vtables): Handle all the overridden functions here.
8332 Add overridden functions from non-primary virtual bases to the
8334 (finish_struct_1): Adjust call to modify_all_vtables. Add
8335 overridden functions from non-primary bases to the vtable.
8336 * tree.c (build_shared_int_cst): New function.
8338 * cp-tree.h (scratchalloc): Remove.
8339 (build_scratch_list): Likewise.
8340 * call.c (convert_class_to_reference): Replace build_scratch_list
8341 and build_expr_list with build_tree_list.
8342 (add_candidate): Replace scratchalloc with expralloc. Note memory
8344 (build_user_type_conversion_1): Replace build_scratch_list
8345 and build_expr_list with build_tree_list.
8346 (build_new_op): Likewise.
8347 (build_op_delete_call): Likewise.
8348 (convert_like): Likewise.
8349 * cvt.c (ocp_convert): Likewise.
8350 * decl.c (start_decl): Likewise.
8351 (start_function): Likewise.
8352 (finish_destructor_body): Likewise.
8353 (maybe_build_cleanup_1): Likewise.
8354 * decl2.c (reparse_decl_as_expr): Likewise.
8355 * init.c (perform_member_init): Likewise.
8356 (expand_cleanup_for_base): Likewise.
8357 (build_builtin_delete_call): Likewise.
8358 (build_new_1): Likewise.
8359 (build_delete): Likewise.
8360 * method.c (do_build_assign_ref): Likewise.
8361 * parse.y (already_scoped_stmt): Likewise.
8362 (nontrivial_exprlist): Likewise.
8363 (net_initializer): Likewise.
8364 (initlist): Likewise.
8365 * parse.c: Regenerated.
8366 * rtti.c (build_x_typeid): Likewise.
8367 (build_dynamic_cast_1): Likewise.
8368 * typeck.c (build_x_compound_expr): Likewise.
8369 (build_static_cast): Likewise.
8370 (build_modify_expr): Likewise.
8372 * cp-tree.h (DECL_VINDEX): Add documentation.
8373 * class.c (build_vtable_entry): Likewise.
8374 (start_vtable): Add comment.
8375 (add_virtual_function): Replace pending_hard_virtuals with
8376 overridden_virtuals and pending_virtuals with new_virtuals.
8377 Replace redundant assignments with assertions.
8378 (check_for_override): Add comment.
8379 (check_bases_and_members): Replace pending_hard_virtuals with
8380 overridden_virtuals and pending_virtuals with new_virtuals.
8381 (create_vtbl_ptr): Likewise.
8382 (layout_class_type): Likewise.
8383 (finish_struct_1): Likewise. Add comments.
8385 2000-01-16 Mark Mitchell <mark@codesourcery.com>
8387 * class.c (finish_struct_1): Replace redundant code with
8390 * cp-tree.h (flag_new_abi): Move.
8391 (flag_use_cxa_atexit): Likewise.
8392 (flag_honor_std): Likewise.
8393 (flag_rtti): Likewise.
8394 (vbase_offsets_in_vtable_p): Define.
8395 (vptrs_present_everywhere_p): Likewise.
8396 (TYPE_CONTAINS_VPTR_P): Likewise.
8397 (dfs_walk_real): Declare.
8398 * class.c (build_vbase_pointer_fields): Check
8399 vbase_offsets_in_vtable_p.
8400 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
8402 (build_vbase_offset_vtbl_entries): Simplify.
8403 (build_vbase_offset_vtbl_entries): Adjust.
8404 (build_vbase_pointer): Add ability to look up vbase offsets in
8406 (start_vtable): New function.
8407 (add_virtual_function): Use it.
8408 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
8409 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
8410 (build_vtbl_initializer): Take the type of the complete object as
8411 input. Use it to correctly calculate vbase offsets.
8412 (dfs_finish_vtbls): Pass the complete type to
8413 build_vtbl_initializer.
8414 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
8415 (create_vtable_ptr): Create a vtable even if there are no
8416 new virtual functions, under the new ABI.
8417 (finish_struct_1): Likewise.
8418 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
8419 * decl.c (exapnd_static_init): Remove call to
8420 preserve_initializer.
8421 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
8423 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
8424 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
8425 (construct_virtual_bases): Don't initialize virtual base pointers
8427 (build_aggr_init): Clean up comment.
8428 (expand_aggr_init_1): Likewise.
8429 * rtti.c (expand_class_desc): Store the virtual function table
8430 index where the vbase offset lives in the offset field.
8431 * search.c (dfs_walk_real): Make it global.
8432 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
8433 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
8435 * tinfo.h (USItype): Make it signed under the new ABI.
8436 * tinfo.cc (convert_to_base): New function. Encapsulate base
8437 conversion logic here.
8438 (__class_type_info::do_upcast): Use it.
8439 (__class_type_info::do_dyncast): Likewise.
8440 (__class_type_info::do_find_public_subobj): Likewise.
8442 * init.c (construct_virtual_bases): Don't look up the addresses of
8443 virtual bases at run-time.
8445 * class.c (build_vbase_pointer): Relocate.
8446 (build_vbase_pointer_fields): Likewise.
8447 (dfs_build_vbase_offset_vtbl_entries): Likewise.
8448 (build_vbase_offset_vtbl_entries): Likewise.
8450 * decl.c (init_decl_processing): Complain if -fnew-abi
8451 -fno-vtable-thunks is used.
8453 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
8456 2000-01-15 Mark Mitchell <mark@codesourcery.com>
8458 * cp-tree.h (num_extra_vtbl_entries): New function.
8459 (size_extra_vtbl_entries): Likewise.
8460 (dfs_vtable_path_unmark): Likewise.
8461 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
8462 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
8463 * class.c (num_extra_vtbl_entries): New function.
8464 (size_extra_vtbl_entries): Likewise.
8465 (dfs_build_vbase_offset_vtbl_entries): New function.
8466 (build_vbase_offset_vtbl_entries): Likewise.
8467 (build_vtbl_initializer): Use it.
8468 (finish_struct_1): Adjust vtable sizes (using
8469 num_extra_vtbl_entries).
8470 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
8471 THUNK_DECL is non-NULL before expanding it.
8472 * init.c (expand_virtual_init): Adjust the vtable pointer by
8473 size_extra_vtbl_entries before storing it.
8474 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
8475 Handle TREE_LIST parameters here, not in the dfs_* functions.
8476 (dfs_unmarked_real_bases_queue_p): Adjust.
8477 (dfs_marked_real_bases_queue_p): Likewise.
8478 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
8479 (dfs_vtable_path_marked_real_bases_queue_p): New function.
8480 (dfs_vtable_path_unmark): Likewise.
8482 2000-01-14 Mark Mitchell <mark@codesourcery.com>
8484 * optimize.c (copy_body_r): Clear the operand three of a
8485 TARGET_EXPR when copying it.
8487 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8489 * method.c (build_decl_overload_real): Check whether we are in ::
8490 before returning __builtin_new/delete.
8492 2000-01-13 Mark Mitchell <mark@codesourcery.com>
8494 * pt.c (tsubst_friend_function): Improve comment.
8495 (instantiate_decl): Avoid crashing when a "nested" function is
8496 instantiated from the top level.
8498 * dump.c (dqeueue_and_dump): Dump
8499 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
8501 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8503 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
8505 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
8507 * g++spec.c (lang_specific_driver): Add -fnew-abi if
8508 ENABLE_NEW_GXX_ABI defined.
8509 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
8510 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
8511 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
8513 2000-01-12 Mark Mitchell <mark@codesourcery.com>
8515 * decl.c (start_cleanup_fn): Call pushdecl.
8517 * call.c (convert_class_to_reference): Fix typos.
8518 (build_conditional_expr): Handle errors gracefully.
8519 * class.c (push_nested_class): Likewise.
8520 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
8521 (DECL_THIS_EXTERN): Use it.
8522 (DECL_THIS_STATIC): Likewise.
8523 * cvt.c (convert_to_void): Handle errors gracefully.
8524 (build_expr_type_conversion): Likewise.
8525 * decl.c (maybe_push_decl): Likewise.
8526 (start_decl_1): Likewise.
8527 (require_complete_types_for_parms): Likewise.
8528 * parse.y (structsp): Likewise.
8529 (base_class): Likewise.
8530 * parse.c: Regenerated.
8531 * pt.c (finish_member_template_decl): Likewise.
8532 * typeck.c (decay_conversion): Likewise.
8534 * cp-tree.h (dfs_skip_vbases): New function.
8535 (find_vbase_instance): Likewise.
8536 * class.c (determine_primary_base): Allow a nearly empty base to
8537 serve as a primary base class under the new ABI.
8538 (get_class_offset_1): Rename to ...
8539 (dfs_get_class_offset): ... this. Simplify. Don't issue error
8541 (get_class_offset): Use it. Issue error messages here.
8542 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
8543 find the right copies of virtual bases.
8544 (fixup_vtable_deltas1): Rename to ...
8545 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
8546 bases as primary bases.
8547 (fixup_vtable_deltas): Remove.
8548 (override_one_vtable): Handle virtual bases as primary bases.
8549 (merge_overrides): Likewise.
8550 (finish_struct_1): Likewise.
8551 (dump_class_hierarchy): Dump primary-ness of bases as well.
8552 * search.c (mark_primary_bases): Use a pre-order traversal to
8553 handle primary virtual bases.
8554 (dfs_skip_vbases): New fiunction.
8555 (expand_upcast_fixups): Adjust to handle primary virtual bases.
8556 (fixup_virtual_upcast_offsets): Likewise.
8557 (fixup_all_virtual_upcast_offsets): Likewise.
8558 (dfs_find_vbase_instances): New function.
8559 (find_vbase_instance): Likewise.
8561 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
8563 * lex.c (DIR_SEPARATOR): Delete macro.
8565 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
8567 * decl2.c (lang_decode_option): Handle automatic line wrapping
8570 2000-01-11 Mark Mitchell <mark@codesourcery.com>
8572 * friend.c (do_friend): Don't resolve scopes when processing
8573 template declarations, even if the qualifying scope doesn't
8574 involve template parameters.
8576 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
8578 * class.c (dfs_modify_vtables_queue_p): Remove.
8579 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
8580 and dfs_marked_real_bases_queue_p instead of
8581 dfs_modify_vtables_queue_p.
8583 * class.c (build_vbase_path): Simplify.
8584 (dfs_propagate_binfo_offsets): New function.
8585 (propagate_binfo_offsets): Use it.
8586 (remove_base_field): Simplify.
8587 (dfs_set_offset_for_vbases): Remove.
8588 (dfs_set_offset_for_shared_vbases): New function.
8589 (dfs_set_offset_for_unshared_vbases): Likewise.
8590 (layout_virtual_bases): Use them.
8591 (layout_basetypes): Don't call propagate_binfo_offsets.
8592 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
8595 * class.c (build_base_field): New function, split out from ...
8596 (build_base_fields): ... here. Use it. Allocate primary bases
8597 first, under the new ABI.
8598 (get_vtable_entry): Remove.
8599 (remove_base_field): New function, split out from ...
8600 (remove_base_fields): ... here. Adjust since primary bases come
8601 first under the new ABI.
8603 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
8604 (initialize_vtbl_ptrs): New function.
8605 (expand_indirect_vtbls_init): Change prototype.
8606 (convert_pointer_to_vbase): Declare.
8607 * init.c (expand_direct_vtbls_init): Remove.
8608 (dfs_initialize_vtbl_ptrs): New function.
8609 (initialize_vtbl_ptrs): Likewise.
8610 (emit_base_init): Use initialize_vtbl_ptrs.
8611 * search.c (convert_pointer_to_vbase): Make it global.
8612 (expand_indirect_vtbls_init): Remove vtable initialization code.
8613 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
8615 * class.c (dfs_finish_vtbls): New function.
8616 (finish_vtbls): Use it.
8617 (dump_class_hierarchy): New function.
8619 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
8620 (BINFO_VBASE_PRIMARY_P): New macro.
8621 (BINFO_VIRTUALS): Add to documentation.
8622 (SET_BINFO_PRIMARY_MARKED_P): Remove.
8623 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8624 (dfs_mark_primary_bases_queue_p): Likewise.
8625 (dfs_unmarked_real_bases_queue_p): New function.
8626 (dfs_marked_real_bases_queue_p): Likewise.
8627 * search.c (dfs_mark_primary_bases): Adjust.
8628 (mark_primary_bases): Likewise.
8629 (get_shared_vbase_if_not_primary): New function.
8630 (dfs_unmarked_real_bases_queue_p): Likewise.
8631 (dfs_marked_real_bases_queue_p): Likewise.
8632 (dfs_get_pure_virtuals): Simplify.
8633 (get_pure_virtuals): Likewise.
8635 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8637 * lex.c: Include tm_p.h.
8639 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
8641 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
8643 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
8645 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
8646 * pt.c (instantiate_decl): Defer comdat templates that might not be
8649 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
8650 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
8651 (finish_file): Likewise.
8653 * decl2.c (import_export_class): Undo 12/14 change.
8655 * error.c (dump_decl): operator new, not operatornew.
8657 * class.c (field_decl_cmp): A nontype is "greater" than a type.
8658 * search.c (lookup_field_1): Look for the last field with the
8661 2000-01-05 Nathan Sidwell <nathan@acm.org>
8663 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
8666 2000-01-05 Nathan Sidwell <nathan@acm.org>
8668 * typeck.c (build_static_cast): Don't strip target qualifiers
8669 when casting from a class.
8671 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8673 * class.c (warn_hidden): Initialize variable `fndecl'.
8675 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
8677 * decl.c (flag_isoc9x): New variable to be able to use code in
8678 c-common.c. For now always zero.
8680 2000-01-03 Mark Mitchell <mark@codesourcery.com>
8682 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
8683 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
8684 or unshare_base_binfos for virtual bases here.
8685 * search.c (dfs_get_vbase_types): Do it here.
8686 (get_vbase_types): Adjust.
8688 2000-01-02 Mark Mitchell <mark@codesourcery.com>
8690 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
8691 (BINFO_PRIMARY_MARKED_P): Use flag 5.
8692 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
8693 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8694 (unmark_primary_bases): Remove declaration.
8695 (unmarkedp): Declare.
8696 (dfs_vbase_unmark): Likewise.
8697 * class.c (determine_primary_base): Return immediately if there
8698 are no base classes. Call mark_primary_bases here.
8699 (modify_all_direct_vtables): Remove.
8700 (modify_all_indirect_vtables): Remove.
8701 (dfs_modify_vtables_queue_p): New function.
8702 (dfs_modify_vtables): New function.
8703 (modify_all_vtables): Use them.
8704 (build_base_fields): Build FIELD_DECLs for primary virtual base
8706 (create_vtable_ptr): Don't call determine_primary_base here.
8707 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
8708 (dfs_set_offset_for_vbases): ... this.
8709 (layout_virtual_bases): Use it.
8710 (layout_class_type): Call determine_primary_base here.
8711 * search.c (unmarkedp): Make it global.
8712 (shared_marked_p): Simplify.
8713 (shared_unmarked_p): Likewise.
8714 (dfs_primary_bases_queue_p): Remove.
8715 (dfs_unmark_primary_bases): Likewise.
8716 (unmark_primary_bases): Likewise.
8717 (mark_primary_bases): Simplify.
8718 (get_pure_virtuals): Don't call mark_primary_bases here.
8719 (dfs_vbase_unmark): New function.
8720 (get_vbase_types): Simplify.
8722 * class.c (struct base_info): Remove.
8723 (determine_primary_base): Take has_virtual_p rather than a
8724 base_info as input. Don't calculate max_has_virtual.
8725 (finish_struct_bits): Remove max_has_virtual argument.
8726 (create_vtable_ptr): Remove max_has_virtual_p argument.
8727 (layout_virtual_bases): Remove max argument.
8728 (layout_basetypes): Likewise.
8729 (layout_class_type): Remove max_has_virtual_p argument.
8730 (finish_struct_1): Remove max_has_virtual.
8732 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
8733 (layout_basetypes): Remove.
8734 * class.c (propagate_binfo_offsets): Moved here from tree.c.
8735 Update to handle primary virtual bases.
8736 (remove_base_fields): New function, split out from
8738 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
8739 (layout_virtual_bases): New function, split out from
8740 layout_basetypes. Update to handle primary virtual bases.
8741 (layout_basetypes): Moved here from tree.c. Use
8742 remove_base_fields and layout_virtual_bases.
8743 * search.c (dfs_mark_primary_bases_queue_p): New function.
8744 (mark_primary_bases): Use it.
8745 * tree.c (CEIL): Remove.
8746 (propagate_binfo_offsets): Remove.
8747 (layout_basetypes): Remove.
8749 2000-01-01 Mark Mitchell <mark@codesourcery.com>
8751 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
8752 (BINFO_PRIMARY_MARKED_P): New macro.
8753 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
8754 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8755 (mark_primary_bases): New function.
8756 (unmark_primary_bases): Likewise.
8757 * search.c (get_abstract_virtuals_1): Remove.
8758 (dfs_mark_primary_bases): New function.
8759 (mark_primary_bases): Likewise.
8760 (dfs_unmark_primary_bases): Likewise.
8761 (unmark_primary_bases): Likewise.
8762 (dfs_get_pure_virtuals): Likewise.
8764 2000-01-01 Mark Mitchell <mark@codesourcery.com>
8766 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
8767 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
8768 (modify_one_vtable): Adjust.
8769 (fixup_vtable_deltas1): Likewise.
8770 (override_one_vtable): Likewise.
8771 * search.c (get_abstract_virtuals_1): Likewise.
8772 (get_pure_virtuals): Likewise.
8773 (expand_upcast_fixups): Likewise.
8774 * tree.c (debug_binfo): Likewise.
8776 * class.c (build_vtable): Don't return a value. Don't rebuild
8777 vtables for bases that have already been handled.
8778 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
8779 already been handled.
8780 (modify_one_vtable): Adjust accordingly.
8781 (fixup_vtable_deltas1): Likewise.
8782 (finish_struct_1): Likewise.
8784 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8786 * call.c (build_new_method_call): Also check destructors.