1 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
3 * cp-tree.def (START_CATCH_STMT): Lose.
4 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
5 * tree.c (cp_statement_code_p): Don't case it.
6 * semantics.c (cp_expand_stmt): Likewise.
7 * cp-tree.h (START_CATCH_TYPE): Lose.
9 * except.c (expand_start_catch_block): Don't start any blocks.
11 (expand_end_catch_block): Don't end any blocks.
12 * parse.y (handler): Don't pass anything from finish_handler_parms
14 * pt.c (tsubst_expr): Likewise.
15 * semantics.c (begin_handler): Call note_level_for_catch here.
16 (finish_handler_parms): Don't return anything.
17 (genrtl_catch_block, begin_catch_block): Lose.
18 (genrtl_handler): Call expand_start_catch here.
20 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
22 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
23 (get_vtable_decl, build_vtt): Not here.
25 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
28 * optimize.c (update_cloned_parm): Copy addressability and other
31 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
33 * pt.c (determine_specialization): Ignore artificial functions.
35 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
37 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
39 * lex.c (cxx_init_options): Call set_identifier_size. Update.
40 (init_parse): Don't do it here.
42 2001-05-18 Diego Novillo <dnovillo@redhat.com>
44 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
45 function declaration to avoid stripping the symbol's attributes.
47 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
49 * decl.c (pushdecl): Adjust error string.
50 (xref_tag): Adjust friend class injection warning. Remove the
51 inherited name from the class shadowed scope.
53 2001-05-17 Mark Mitchell <mark@codesourcery.com>
55 * except.c (cp_protect_cleanup_actions): New function.
56 (init_exception_processing): Don't set protect_cleanup_actions
57 here. Do set lang_protect_cleanup_actions.
59 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
61 * spew.c (read_token): Call yyerror on all unexpected tokens.
63 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
65 * init.c (member_init_ok_or_else): Take a tree rather than
67 (expand_member_init): Adjust.
69 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
71 * decl.c (duplicate_decls): Suppress warning about duplicate
72 decls if the first decl is a friend.
74 2001-05-12 Zack Weinberg <zackw@stanford.edu>
76 * except.c (choose_personality_routine): Export. Add
77 explanatory comment. Take an enum languages, not a boolean.
78 (initialize_handler_parm): Adjust to match.
79 * cp-tree.h: Prototype choose_personality_routine.
80 * lex.c (handle_pragma_java_exceptions): New function.
81 (init_cp_pragma): Register #pragma GCC java_exceptions.
83 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
85 * method.c (build_mangled_C99_name): Remove unused prototype.
87 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
89 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
90 * typeck.c (get_member_function_from_ptrfunc,
91 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
92 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
94 Reverted Geoff Keating's 2001-05-03's patch.
96 2001-05-11 Ira Ruben <ira@apple.com>
98 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
100 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
102 * cp-tree.h (finish_label_expr, lookup_label): Delete.
103 * parse.y: Update for '&&'; don't issue warning here.
104 * semantics.c (finish_label_expr): Delete.
106 2001-05-07 Mark Mitchell <mark@codesourcery.com>
108 * splay-tree.h (splay_tree_max): New function.
109 (splay_tree_min): Likewise.
111 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
113 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
114 (pfn_vflag_identifier): Define.
115 Update comment about layout of pointer functions.
116 (build_ptrmemfunc1): Update prototype.
117 (expand_ptrmemfunc_cst): Update prototype.
118 * decl.c (initialize_predefined_identifiers): Initialize
119 pfn_vflag_identifier.
120 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
121 an extra field to the type.
122 * expr.c (cplus_expand_constant): Pass 'flag' between
123 expand_ptrmemfunc_cst and build_ptrmemfunc1.
124 * typeck.c (get_member_function_from_ptrfunc): When
125 FUNCTION_BOUNDARY < 16, look at additional field to determine
126 if a pointer-to-member is a real pointer or a vtable offset.
127 (build_ptrmemfunc1): Add new parameter to contain extra field.
128 (build_ptrmemfunc): Pass the extra field around.
129 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
130 (pfn_from_ptrmemfunc): Ignore the extra field.
132 2001-05-03 Mark Mitchell <mark@codesourcery.com>
134 * cp-tree.h (flag_inline_trees): Update documentation.
135 * decl.c (init_decl_processing): Adjust handling of
136 flag_inline_functions and flag_inline_trees to support -O3.
137 (grokfndecl): Set DECL_INLINE on all functions if that's what
139 (save_function_data): Clear DECL_INLINE in
140 current_function_cannot_inline is non-NULL.
141 * decl2.c (flag_inline_trees): Update documentation.
143 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
145 * dump.c (cp_dump_tree, USING_STMT case): New case.
146 * tree.c (cp_statement_code_p): Add USING_STMT.
147 * decl2.c (do_using_directive): Add the using directive statement.
149 * tree.c (walk_tree): Reformat an if block.
151 2001-05-02 Mark Mitchell <mark@codesourcery.com>
153 * decl.c (compute_array_index_type): Don't try to do anything with
154 the indices when processing a template.
156 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
158 * call.c: NULL_PTR -> NULL.
163 * except.c: Likewise.
166 * search.c: Likewise.
168 * typeck.c: Likewise.
169 * typeck2.c: Likewise.
171 2001-05-02 Mark Mitchell <mark@codesourcery.com>
173 * decl2.c (do_using_directive): Revert previous patch.
175 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
177 * cp-tree.def (USING_STMT): New statement node.
178 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
179 * decl2.c (do_using_directive): Add USING_STMT to statement
180 tree. Don't emit errors when processing template decl.
181 * pt.c (tsubst_expr, USING_STMT case): New case.
182 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
184 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
186 * call.c (build_new_op): Convert args from reference here.
187 (build_conditional_expr): Don't convert here.
189 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
191 * spew.c (last_token_id): New static variable.
192 (read_token): Set it here.
193 (yyerror): Use it here.
195 2001-04-30 Richard Henderson <rth@redhat.com>
197 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
200 2001-04-30 Mark Mitchell <mark@codesourcery.com>
202 * gxxint.texi: Remove.
203 * Make-lang.in: Remove all traces of gxxint.texi.
205 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
207 * decl2.c (start_static_initialization_or_destruction): Correct
208 logic to handle the -fno-use-cxa-atexit case.
210 2001-04-30 Mark Mitchell <mark@codesourcery.com>
212 * optimize.c (update_cloned_parm): New function.
213 (maybe_clone_body): Use it. Update the `this' parameter too.
215 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
217 * decl2.c (unsupported_options): Add new-abi.
218 * lang-options.h: Remove no longer supported options.
220 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
222 * except.c (can_convert_eh): Don't check template parms,
225 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
227 * optimize.c (maybe_clone_body): Copy parameter names and locations.
229 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
231 * cp-tree.h (adjust_clone_args): Prototype new function.
232 * class.c (adjust_clone_args): New function.
233 * decl.c (start_function): Call it for in charge ctors.
235 2001-04-26 Mark Mitchell <mark@codesourcery.com>
237 * method.c (use_thunk): Make sure that thunks really are emitted
240 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
242 * mangle.c (write_chars): New macro.
243 (hwint_to_ascii): New function
244 (write_number): Use it.
245 (write_integer_cst): Deal with really big numbers.
247 2001-04-25 Mark Mitchell <mark@codesourcery.com>
249 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
252 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
254 * decl.c (grokdeclarator): Set context of namespace scope
257 2001-04-24 Zack Weinberg <zackw@stanford.edu>
259 * cp/optimize.c: Include hashtab.h.
260 (struct inline_data): Add tree_pruner.
261 (expand_call_inline, expand_calls_inline): Use it when calling
263 (optimize_function): Initialize and free tree_pruner.
265 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
267 Lazy __FUNCTION__ generation.
268 * cp-tree.def (FUNCTION_NAME): Remove.
269 * cp-tree.h (function_name_declared_p): Remove.
270 (cp_fname_init): Prototype.
271 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
272 don't call declare_function_name. Call start_fname_decls.
273 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
274 clobber the line number.
275 (cp_fname_init): New function.
276 (start_function): Call start_fname_decls.
277 (finish_function): Call finish_fname_decls.
278 * lex.c (reswords): Add slots for __FUNCTION__ et al.
279 (rid_to_yy): Add mappings for __FUNCTION__ et al.
280 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
281 * parse.y (VAR_FUNC_NAME): New token.
282 (primary): Add VAR_FUNC_NAME.
283 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
285 (tsubst, FUNCTION_NAME case): Remove.
286 (tsubst_copy, FUNCTION_NAME case): Remove.
287 (tsubst_expr, DECL_STMT case): Be careful with a
288 DECL_PRETTY_FUNCTION_P.
289 (instantiate_decl): Remove function_name_declared_p.
290 * semantics.c (begin_compound_statement): Don't call
291 declare_function_name here.
292 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
293 (finish_translation_unit): Call finish_fname_decls.
294 (expand_body): Remove function_name_declared_p.
295 * typeck2.c (digest_init): Allow any ERROR_MARK.
297 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
299 * pt.c (tsubst_decl): Use VOID_TYPE_P.
300 * semantics.c: Fix some typos.
302 2001-04-23 Phil Edwards <pme@sources.redhat.com>
304 * cp/decl2.c (flag_honor_std): Always initialize to 1.
306 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
308 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
310 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
312 * except.c (build_throw): Wrap the initialization of the exception
313 object in a MUST_NOT_THROW_EXPR.
314 (do_free_exception): #if 0.
316 2001-04-20 Mark Mitchell <mark@codesourcery.com>
318 * cp-tree.h (finish_enum): Change prototype.
319 * decl.c (finish_enum): Reorganize.
320 * parse.y (structsp): Adjust calls to finish_enum.
322 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
324 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
327 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
329 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
330 (layout_empty_base): Return at end flag.
331 (build_base_field): Likewise.
332 (build_base_fields): Likewise.
333 (layout_virtual_bases): Don't add 1 to eoc value.
334 (end_of_class): Use full size for empty bases.
335 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
336 empty bases. Don't add 1 to eoc value. Only add trailing padding
337 if we're an empty class with no empty bases.
338 (dump_class_hierarchy): Dump size and alignment.
340 2001-04-20 Jakub Jelinek <jakub@redhat.com>
342 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
345 2001-04-20 Jakub Jelinek <jakub@redhat.com>
347 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
348 is found, look first if name does not match the structure name.
350 2001-04-19 Mark Mitchell <mark@codesourcery.com>
352 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
354 (SET_DECL_LANGUAGE): New macro.
355 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
356 (pushdecl): Likewise.
357 (build_library_fn_1): Likewise.
358 (build_cp_library_fn): Likewise.
359 (grokfndecl): Likewise.
360 (grokvardecl): Mark `extern "C"' variables as having C linkage.
361 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
362 * lex.c (retrofit_lang_decl): Likewise.
363 * mangle.c (mangle_decl_string): Don't mangle the names of
364 variables declared with C language linkage.
365 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
367 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
369 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
370 flag_access_control from uninitialized storage.
372 2001-04-15 Mark Mitchell <mark@codesourcery.com>
374 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
375 * mangle.c (write_pointer_to_member_type): Fix mangling of
376 pointers to cv-qualified member function types.
378 * init.c (build_delete): Create a SAVE_EXPR for the address if
379 we're going to use it more than once.
381 2001-04-13 Mark Mitchell <mark@codesourcery.com>
383 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
384 (expand_ptremfunc_cst): Change prototype.
385 (delta2_from_ptrmemfunc): Remove.
386 * expr.c (cplus_expand_constant): Adjust call to
387 expand_ptrmemfunc_cst.
388 * typeck.c (build_ptrmemfunc1): Simplify.
389 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
390 results in a constant.
391 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
392 (delta2_from_ptrmemfunc): Remove.
393 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
395 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
397 * cp-tree.h (decl_namespace_list): New macro.
398 (struct saved_scope): Add decl_ns_list.
399 * decl.c (mark_saved_scope): Mark it.
400 * decl2.c: Lose static decl_namespace_list.
401 (init_decl2): Don't save it.
403 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
405 * cp-tree.h (warn_return_type, yylex): Delete redundant
408 * decl.c (current_class_depth, global_namespace): Likewise.
410 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
412 * repo.c (flag_use_repository): Likewise.
414 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
416 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
417 set_block, pushdecl, getdecls, gettags, init_decl_processing,
418 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
419 lvalue_or_else, print_lang_statistics, comp_target_types,
420 unsigned_type, signed_type, signed_or_unsigned_type,
421 build_function_call, mark_addressable, incomplete_type_error):
422 Delete redundant declarations.
424 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
426 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
427 (TYPE_ANONYMOUS_P): New macro.
428 (TAGGED_TYPE_P): New macro.
429 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
430 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
431 * tree.c (no_linkage_helper): Likewise.
432 * semantics.c (begin_class_definition): Likewise.
433 * pt.c (convert_template_argument): Likewise.
434 * lex.c (check_for_missing_semicolon): Likewise.
436 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
438 * class.c (dfs_unshared_virtual_bases): New function.
439 (mark_primary_bases): Call it.
440 (check_bases): Ignore virtual bases when determining
443 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
445 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
447 2001-04-11 Mark Mitchell <mark@codesourcery.com>
449 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
450 cloned function to the clone.
452 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
454 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
456 * semantics.c: Include expr.h.
458 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
460 * method.c (implicitly_declare_fn): Commonize code for copy ctor
461 and assignment op. Set TREE_USED for parameter.
463 2001-04-10 Mark Mitchell <mark@codesourcery.com>
465 * class.c (find_final_overrider_data): Add `candidates'.
466 (dfs_find_final_overrider): Don't issue error messages
468 (find_final_overrider): Issue error messages here.
469 (build_base_field): Don't warn about amgibuous direct bases here.
470 (warn_about_ambiguous_direct_bases): New function.
471 (layout_class_type): Use it.
473 2001-04-10 Richard Henderson <rth@redhat.com>
475 * typeck.c (build_array_ref): Push the array reference inside
476 COMPOUND_EXPR and COND_EXPR.
478 2001-04-05 Mark Mitchell <mark@codesourcery.com>
480 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
481 * decl.c (duplicate_decls): Adjust accordingly.
482 (maybe_commonize_var): Likewise.
483 (grokfndecl): Likewise.
484 (start_function): Likewise.
485 (start_method): Likewise.
486 * decl2.c (key_method): Likewise.
487 (import_export_decl): Likewise.
488 * method.c (implicitly_declare_fn): Likewise.
489 * optimize.c (maybe_clone_body): Likewise.
491 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
493 * lang-specs.h: Add __DEPRECATED.
495 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
497 * search.c (get_dynamic_cast_base_type): When building a new
498 constant, set its type to ssizetype.
500 2001-04-04 Jakub Jelinek <jakub@redhat.com>
502 * optimize.c (expand_call_inline): Only add newly inlined statements
505 2001-04-03 Mark Mitchell <mark@codesourcery.com>
507 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
508 (OPERATOR_FORMAT): Likewise.
509 (OPERATOR_TYPENAME_FORMAT): Likewise.
510 * operators.def: Remove old name-mangling information.
511 * decl.c (grok_op_properties): Adjust accordingly.
512 * lex.c (init_operators): Likewise.
513 * rtti.c (get_tinfo_decl): Issue error messages about types that
516 2001-04-03 Mark Mitchell <mark@codesourcery.com>
518 * decl2.c (import_export_decl): Don't call import_export_class
519 when processing an inline member function.
520 * semantics.c (expand_body): Call import_export_decl before
521 emitting inline functions.
523 2001-03-28 Richard Henderson <rth@redhat.com>
525 IA-64 ABI Exception Handling:
526 * cp-tree.def (EH_SPEC_BLOCK): New.
527 (MUST_NOT_THROW_EXPR): New.
528 * cp-tree.h: Update changed function declarations.
529 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
530 (CPTI_CALL_UNEXPECTED): New.
531 (struct cp_language_function): Rename x_eh_spec_try_block
533 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
534 * decl.c (current_binding_level): If no current function
535 bindings, revert to scope_chain.
536 (initialize_predefined_identifiers): Remove __cp_push_exception.
537 (store_parm_decls): Use begin_eh_spec_block.
538 (finish_function): Use finish_eh_spec_block.
539 (mark_lang_function): Update for name changes.
540 * decl2.c (finish_file): No mark_all_runtime_matches.
541 * dump.c (cp_dump_tree): Handle new tree codes.
542 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
543 * except.c (catch_language_init, catch_language): Remove.
544 (init_exception_processing): Don't set language code.
545 Initialize call_unexpected_node, protect_cleanup_actions,
546 eh_personality_libfunc, lang_eh_runtime_type.
547 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
548 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
549 (prepare_eh_type): Split out type canonicalizations ...
550 (build_eh_type_type): ... from here.
551 (build_eh_type_type_ref): Remove.
552 (mark_all_runtime_matches): Remove.
553 (build_exc_ptr): New.
554 (do_begin_catch, do_end_catch): New.
555 (do_pop_exception): Remove.
556 (build_terminate_handler): Remove.
557 (choose_personality_routine): Split out language choice from ...
558 (initialize_handler_parm): ... here.
559 Use MUST_NOT_THROW_EXPR.
560 (expand_start_catch_block): Use do_begin_catch. Simplify Java
561 exception object handling.
562 (expand_start_eh_spec, expand_end_eh_spec): Remove.
563 (expand_exception_blocks, alloc_eh_object): Remove.
564 (begin_eh_spec_block, finish_eh_spec_block): New.
565 (do_allocate_exception, do_free_exception): New.
566 (expand_throw): Merge into ...
567 (build_throw): ... here. Update for abi.
568 * expr.c (cplus_expand_expr): No expand_internal_throw.
569 Handle MUST_NOT_THROW_EXPR.
570 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
571 * semantics.c (*) Update for except.h name changes.
572 (genrtl_try_block): No protect_with_terminate.
573 (genrtl_eh_spec_block): New.
574 (genrtl_handler): Don't emit the goto here.
575 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
576 (genrtl_finish_function): Don't expand_exception_blocks.
577 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
579 2001-03-28 Richard Henderson <rth@redhat.com>
581 * decl.c (struct named_label_list): Rename eh_region to
582 in_try_scope, add in_catch_scope.
583 (struct binding_level): Rename eh_region to is_try_scope,
585 (note_level_for_try): Rename from note_level_for_eh.
586 (note_level_for_catch): New.
587 (poplevel): Copy both is_try_scope and is_catch_scope to
588 the named_label_list struct.
589 (check_previous_goto_1): Don't check for catch block via
590 DECL_ARTIFICIAL; use in_try_scope instead.
591 (check_goto): Likewise.
592 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
593 * except.c (expand_start_catch_block): Call note_level_for_catch.
594 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
596 2001-03-27 Richard Henderson <rth@redhat.com>
598 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
599 exceptions_via_longjmp.
601 2001-03-27 Phil Edwards <pme@sources.redhat.com>
603 * pt.c (check_default_tmpl_args): Make error messages clearer.
605 2001-03-26 Phil Edwards <pme@sources.redhat.com>
607 * error.c: Also undefine 'A' macro used for cp_printers definition.
609 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
611 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
613 2001-03-26 Mike Yang <yang@research.att.com>
614 Mark Mitchell <mark@codesourcery.com>
616 * dump.c (dump_access): New function.
617 (cp_dump_tree): Use it. Dump basetype information for class
620 2001-03-26 Mark Mitchell <mark@codesourcery.com>
622 * Makefile.in (optimize.o): Depend on params.h.
623 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
624 (init_decl_processing): Set flag_no_inline when doing
626 * optimize.c: Include params.h.
627 (struct inline_data): Improve documentation of FNS. Add
628 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
629 (INSNS_PER_STMT): New macro.
630 (remap_block): Use CLONING_P.
631 (inlinable_function_p): Don't inline big functions.
632 (expand_call_inline): Keep track of how much inlining we've done.
633 (optimize_function): Set FIRST_INLINED_FN.
634 (maybe_clone_body): Set CLONING_P.
635 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
637 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
638 rest_of_compilation. Clear DECL_RTL for local variables
640 (clear_decl_rtl): New function.
642 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
645 * cp-tree.h (skip_type_access_control,
646 reset_type_access_control): Prototype.
647 * decl.c (grokdeclarator): Access of friends is not checked.
648 * parse.y (component_decl_list): Reset type access control.
649 * semantics.c (decl_type_access_control): Clear
650 current_type_lookups.
651 (save_type_access_control): Don't save if not deferring.
652 (skip_type_access_control, reset_type_access_control): New
654 (begin_class_definition): Do type access control for basetypes.
655 Start deferred access control.
656 (finish_class_definition): Resume immediate access control if
657 this is a local class.
659 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
661 * class.c (add_method): Use memcpy/memmove, not bcopy.
663 * decl.c (duplicate_decls): Likewise.
665 2001-03-23 Jakub Jelinek <jakub@redhat.com>
667 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
670 2001-03-23 Jakub Jelinek <jakub@redhat.com>
672 * decl.c (local_names): Define.
673 (push_local_name): New.
674 (grok_reference_init): Return init if initializing static reference
675 variable with non-constant instead of emitting it.
676 Move expand_static_init call to cp_finish_decl.
677 (layout_var_decl): Call push_local_name.
678 (maybe_commonize_var): Allow inlining functions even if they have
679 static local variables, use comdat_linkage for them if flag_weak.
680 (check_initializer): Call obscure_complex_init if
681 grok_reference_init returned non-zero.
682 (save_function_data): Clear x_local_names.
683 (pop_cp_function_context): Free x_local_names.
684 (mark_inlined_fns): Remove.
685 (mark_lang_function): Mark x_local_names.
686 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
687 Mark inlined_fns as tree, remove call to mark_inlined_fns.
688 * class.c (alter_access): Ensure DECL_ACCESS is never set if
689 DECL_DISCRIMINATOR_P.
690 * cp-tree.h (cp_language_function): Add x_local_names.
691 (lang_decl_flags): Add discriminator into u2.
692 (lang_decl_inlined_fns): Remove.
693 (lang_decl): inlined_fns is now a TREE_VEC.
694 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
695 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
696 TREE_VEC, not a custom structure.
697 (optimize_function): Likewise.
698 * mangle.c (discriminator_for_local_entity): Discriminate among
699 VAR_DECL local entities.
700 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
703 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
705 Add support for Java interface method calls.
706 * cp-tree.h (struct lang_type): Add java_interface flag.
707 (TYPE_JAVA_INTERFACE): New macro.
708 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
709 by setting TYPE_JAVA_INTERFACE.
710 * call.c (java_iface_lookup_fn): New static.
711 (build_over_call): If calling a method declared in a
712 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
713 expression which resolves the function address.
714 (build_java_interface_fn_ref): New function.
716 2001-03-22 Richard Henderson <rth@redhat.com>
718 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
719 * except.c: Don't include it.
721 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
722 based on an idea from Joe Buck <jbuck@synopsys.com>
724 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
726 (data_def, component_decl): Add reductions to bad_decl.
728 2001-03-22 Jakub Jelinek <jakub@redhat.com>
730 * method.c (do_build_assign_ref): Don't use build_modify_expr for
731 anonymous aggregates, since they don't have assignment operator
733 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
734 assignment operators for anonymous structure fields.
736 2001-03-21 Jason Merrill <jason@redhat.com>
738 * pt.c (instantiate_decl): Abort if we see a member constant
739 instantiation that doesn't already have its initializer.
740 Downgrade explicit instantiation without definition to pedwarn.
742 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
743 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
744 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
746 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
747 (pending_vtables): Remove.
748 * decl2.c (pending_vtables): Remove.
749 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
750 CLASSTYPE_VTABLE_NEEDS_WRITING.
751 (import_export_class): Likewise.
752 (init_decl2): Don't mark pending_vtables.
753 * lex.c (handle_pragma_vtable): Just sorry.
754 * pt.c (instantiate_class_template): Don't mess with
755 CLASSTYPE_VTABLE_NEEDS_WRITING.
756 (mark_class_instantiated): Likewise.
757 * ptree.c (print_lang_type): Don't print it.
758 * semantics.c (begin_class_definition): Don't set it.
760 * pt.c (template_tail): Replace with last_pending_template.
761 (maybe_templates, maybe_template_tail): Remove.
762 (add_pending_template): Adjust.
763 (instantiate_pending_templates): Adjust.
765 * cp-tree.h (struct saved_scope): Remove lang_stack field.
766 (current_lang_stack): Remove.
767 * decl.c (maybe_push_to_top_level): Don't initialize it.
768 (duplicate_decls): Use current_lang_depth.
769 (xref_basetypes): Likewise.
770 * class.c (current_lang_depth): New fn.
771 (push_lang_context): Use more varray functionality.
772 (pop_lang_context): Likewise.
774 * error.c (GLOBAL_THING): Always use '__'.
776 2001-03-21 Mark Mitchell <mark@codesourcery.com>
778 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
780 * mangle.c (mangle_decl_string): Mangle the names of overloaded
781 operators, even when they have `extern "C"' linkage.
783 2001-03-19 Mark Mitchell <mark@codesourcery.com>
785 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
786 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
787 where it's not necessary.
788 (add_method): Remove optimization involving comparison of
790 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
791 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
792 where it's not necessary.
793 (check_methods): Likewise.
794 (build_clone): Likewise.
795 (built_vtt): Likewise.
796 * cp-tree.h (DECL_NEEDED_P): Likewise.
797 * decl.c (pushtag): Likewise.
798 (duplicate_decls): Likewise.
799 (pushdecl): Likewise.
800 (builtin_function): Likewise.
801 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
802 (build_cp_library_fn): Likewise.
803 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
804 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
805 where it's not necessary.
806 (make_rtl_for_nonlocal_decl): Likewise.
807 (cp_finish_decl): Likewise.
808 (grokfndecl): Likewise.
809 (grokvardecl): Likewise.
810 (grokdeclarator): Likewise.
811 (start_function): Likewise.
812 (cp_missing_return_ok_p): Likewise.
813 * decl2.c (grokclassfn): Likewise.
814 (check_classfn): Likewise.
815 (finish_static_data_member_decl): Likewise.
816 (grokfield): Likewise.
817 * error.c (GLOBAL_IORD_P): Remove.
818 (dump_global_iord): Improve output.
819 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
820 * except.c (nothrow_libfn_p): Summarily reject any function not in
822 * init.c (build_java_class_ref): Don't explicitly set
823 DECL_ASSEMBLER_NAME after calling mangle_decl.
824 * mangle.c (mangle_decl_string): Handle extern "C" functions.
825 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
826 * method.c (set_mangled_name_for_decl): Don't explicitly set
827 DECL_ASSEMBLER_NAME after calling mangle_decl.
828 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
829 IDENTIFIER_GLOBAL_VALUE for the thunk.
830 * pt.c (set_mangled_name_for_template_decl): Remove.
831 (check_explicit_specialization): Don't use it.
832 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
833 (tsubst_friend_function): Likewise.
834 (tsubst_decl): Likewise.
835 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
836 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
837 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
838 where it's not necessary.
839 (tinfo_base_init): Likewise.
840 (create_real_tinfo_var): Likewise.
841 * search.c (looup_field_1): Likewise.
842 * semantics.c (finish_named_return_value): Likewise.
843 * tree.c (init_tree): Set lang_set_decl_assembler_name.
845 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
847 Correct semantics restrictions checking in throw-expression.
848 * except.c (is_admissible_throw_operand): New function.
849 (build_throw): Use it.
851 2001-03-14 Mark Mitchell <mark@codesourcery.com>
853 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
856 2001-03-14 Mark Mitchell <mark@codesourcery.com>
858 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
859 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
860 * decl.c (duplicate_decls): Likewise.
861 (builtin_function): Likewise.
862 (build_library_fn): Likewise.
863 (build_cp_library_fn): Likewise.
864 (check_initializer): Likewise.
865 (cp_finish_decl): Likewise.
866 * decl2.c (grokfield): Likewise.
867 (grok_function_init): Remove #if 0'd code.
868 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
869 * friend.c (do_friend): Likewise.
870 * init.c (get_temp_regvar): Likewise.
871 * method.c (make_thunk): Likewise.
872 * pt.c (tsubst_friend_function): Likewise.
873 (tsubst_decl): Likewise.
874 (regenerate_decl_from_template): Likewise.
875 * semantics.c (genrtl_named_return_value): Likewise.
876 (expand_body): Likewise.
877 (genrtl_finish_function): Likewise.
878 * tree.c (cp_tree_equal): Likewise.
880 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
882 * call.c (convert_like_real): Add extra semantics to INNER
883 parameter. Don't convert to temporary if a user conversion
884 gives us an lvalue that we're about to bind to a reference.
885 Set INNER to indicate pending reference binding on recursive
888 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
890 * cp/lex.c: Delete duplicate pending_lang_change.
892 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
894 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
896 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
897 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
899 2001-03-09 Zack Weinberg <zackw@stanford.edu>
901 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
903 2001-03-08 Stan Shebs <shebs@apple.com>
905 * cp-tree.h (set_identifier_local_value): Remove unused decl.
907 2001-03-06 Zack Weinberg <zackw@stanford.edu>
909 * spew.c: Remove references to CPP_OSTRING.
911 2001-03-06 Andrew Haley <aph@redhat.com>
913 * typeck.c (convert_arguments): Check that we have an fndecl.
915 2001-03-05 Andrew Haley <aph@redhat.com>
917 * typeck.c (convert_arguments): Don't do ellipsis conversion for
918 __built_in_constant_p.
920 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
922 * typeck.c (build_static_cast): Allow enum to enum conversions
925 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
927 * class.c (check_field_decls): Pointers to member do not a
928 non-pod struct make, as per DR 148.
930 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
932 * call.c (joust): cp_pedwarn when using gnu extension concerning
933 worst conversion sequences.
935 2001-03-01 Zack Weinberg <zackw@stanford.edu>
937 * decl.c: Replace all uses of 'boolean' with 'bool'.
939 2001-03-01 Zack Weinberg <zackw@stanford.edu>
941 * lang-specs.h: Add zero initializer for cpp_spec field to
942 all array elements that need one. Don't put an #ifdef inside
943 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
946 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
948 Implement using decls inside template functions.
949 * decl2.c (validate_nonmember_using_decl): Don't special case
950 fake_std_node in the global namespace. Don't reject early when
951 processing a template.
952 (do_local_using_decl): Add to statement tree. Don't do further
953 processing when building a template.
954 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
956 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
958 * decl2.c (do_nonmember_using_decl): Don't complain if we find
959 same function. Do complain about ambiguating extern "C"
962 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
964 Remove floating point and complex type template constant parms.
965 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
966 COMPLEX_TYPE extensions.
967 (invalid_nontype_parm_type_p): Likewise.
969 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
971 * except.c (call_eh_info): Revert "match_function"'s type.
973 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
975 Fix ctor vtable vcall offsets.
976 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
977 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
978 (get_matching_base): Remove.
979 (get_original_base): New function.
980 (build_vtbl_initializer): Initialize vid.rtti_binfo.
981 Use a virtual thunk for a ctor vtable with an index
982 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
983 primary base within a constructor vtable. Only set
984 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
985 when primary base has been lost.
986 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
988 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
990 * call.c (joust): Ensure more_specialized()'s argument length
991 parameter has correct value for constructors.
993 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
995 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
997 * decl.c (mark_inlined_fns): Prototype.
999 2001-02-22 Mark Mitchell <mark@codesourcery.com>
1001 * spew.c (yylex): Correct handling of friends.
1003 2001-02-22 Mark Mitchell <mark@codesourcery.com>
1005 * mangle.c (write_encoding): Pass write_function_type the
1006 FUNCTION_DECL for the function being encoded.
1007 (write_function_type): Pass it along to write_bare_function_type.
1008 (write_bare_function_type): Pass it along to write_method_parms.
1009 (write_method_parms): Don't mangle the compiler-generated
1010 parameters to a constructor or destructor.
1012 2001-02-22 Andreas Jaeger <aj@suse.de>
1014 * optimize.c: Include toplev.h for
1015 note_deferral_of_defined_inline_function prototype.
1017 2001-02-22 Jakub Jelinek <jakub@redhat.com>
1019 * cp-tree.h (struct lang_decl_inlined_fns): New.
1020 (struct lang_decls): Add inlined_fns.
1021 (DECL_INLINED_FNS): New macro.
1022 * optimize.c (struct inline_data): Add inlined_fns.
1023 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
1024 (inlinable_function_p): Likewise, fix typo in comment,
1025 function is not inlinable if it already inlined function currently
1027 (expand_call_inline): Add fn to inlined_fns if neccessary.
1028 (optimize_function): Initialize inlined_fns.
1029 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
1030 * decl.c (mark_inlined_fns): New function.
1031 (lang_mark_tree): Call it.
1033 2001-02-21 Jason Merrill <jason@redhat.com>
1035 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
1036 (DECL_UNINLINABLE): Move to middle-end.
1038 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
1039 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
1040 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
1041 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
1042 parms and outer BLOCK. note_deferral_of_defined_inline_function.
1044 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
1047 2001-02-19 Mark Mitchell <mark@codesourcery.com>
1049 * decl2.c (set_decl_namespace): Allow explicit instantiations in
1052 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1054 * optimize.c (expand_call_inline): Don't walk subtrees of type
1057 2001-02-18 Mark Mitchell <mark@codesourcery.com>
1059 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
1062 2001-02-18 Jason Merrill <jason@redhat.com>
1064 Do put the VTT parameter in DECL_ARGUMENTS.
1065 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
1066 (current_vtt_parm): New macro.
1067 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
1068 (DECL_HAS_VTT_PARM_P): New macro.
1069 (DECL_VTT_PARM): Remove.
1070 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
1071 * decl.c (duplicate_decls): Only copy the operator code if
1073 (start_function): Set current_vtt_parm.
1074 (lang_mark_tree): Don't mark vtt_parm.
1075 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
1076 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
1077 * class.c (build_clone): Maybe remove the VTT parm.
1078 * optimize.c (maybe_clone_body): Set up the VTT parm.
1079 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
1080 * call.c (build_over_call): Just allow the VTT arg.
1081 * method.c (make_thunk): Don't set DECL_VTT_PARM.
1082 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
1083 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
1084 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
1085 * error.c (dump_function_decl): Likewise.
1086 * call.c (build_user_type_conversion_1, convert_like_real): Abort
1087 if we try to call a constructor with in-charge or VTT parms.
1088 * method.c (skip_artificial_parms_for): New fn.
1089 * call.c (add_function_candidate, build_over_call): Call it.
1090 * call.c (build_new_method_call): Use current_vtt_parm.
1091 * init.c (expand_virtual_init): Likewise.
1092 * class.c (same_signature_p): No longer static.
1093 * cp-tree.h: Declare it.
1094 * search.c (look_for_overrides_r): Use it.
1096 2001-02-17 Mark Mitchell <mark@codesourcery.com>
1098 * cp-tree.h (new_abi_rtti_p): Remove.
1099 (name_mangling_version): Likewise.
1100 (flag_do_squangling): Likewise.
1101 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
1102 * decl.c (grokfndecl): Likewise.
1103 * decl2.c (name_mangling_version): Remove.
1104 (flag_do_squangling): Likewise.
1105 (lang_f_options): Remove `squangle'.
1106 (unsupported_options): Add `squangle'.
1107 (cxx_decode_option): Issue a warning about uses of
1108 -fname-mangling-version.
1109 (finish_file): Remove old ABI support.
1110 * pt.c (check_explicit_specialization): Likewise.
1111 (tsubst_decl): Likewise.
1112 * rtti.c (init_rtti_processing): Likewise.
1113 (build_headof): Likewise.
1114 (get_tinfo_decl_dynamic): Likewise.
1115 (tinfo_from_decl): Likewise.
1116 (build_dynamic_cast_1): Likewise.
1117 (synthesize_tinfo_var): Likewise.
1118 * init.c (build_new): Allow enumeration types for the array-bounds
1119 in a direct-new-declarator.
1121 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
1123 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
1124 TREE_PROTECTED from the template being specialized.
1126 2001-02-17 Jason Merrill <jason@redhat.com>
1128 * decl2.c (build_artificial_parm): Set TREE_READONLY.
1130 * decl.c (bad_specifiers): Allow throw specs on things with
1131 pointer-to-function or -member-function type.
1132 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
1135 2001-02-17 Mark Mitchell <mark@codesourcery.com>
1137 * call.c (check_dtor_name): Handle template names correctly.
1139 2001-02-16 Jason Merrill <jason@redhat.com>
1141 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
1142 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
1143 * optimize.c (maybe_clone_body): Don't substitute it.
1144 * call.c (build_new_method_call): Check in_chrg instead.
1145 * init.c (expand_virtual_init): Likewise.
1147 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
1149 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
1150 class-type introduces at least a type-name.
1152 2001-02-16 Jakub Jelinek <jakub@redhat.com>
1154 * call.c (convert_like_real): Create a temporary for non-lvalue.
1156 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
1158 * cp-tree.h: Fix typos in comments.
1160 2001-02-16 Jason Merrill <jason@redhat.com>
1162 * optimize.c (remap_block): If we're compiling a clone, pass the
1163 new block to insert_block.
1165 2001-02-16 Mark Mitchell <mark@codesourcery.com>
1167 * semantics.c (finish_asm_stmt): Robustify.
1169 2001-02-15 Mark Mitchell <mark@codesourcery.com>
1171 * pt.c (push_template_decl_real): Don't remangle the name of a
1174 2001-02-15 Jim Meyering <meyering@lucent.com>
1176 * Make-lang.in (c++.install-common): Depend on installdirs.
1177 (c++.install-info): Likewise.
1178 (c++.install-man): Likewise.
1180 2001-02-15 Mark Mitchell <mark@codesourcery.com>
1182 * typeck2.c (build_m_component_ref): Robustify.
1184 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
1186 * friend.c (do_friend): Don't take the nested [template] class
1187 into account when deciding whether to warn about the friend
1188 function not referring to a template function.
1190 2001-02-14 Jakub Jelinek <jakub@redhat.com>
1192 * typeck.c (build_unary_op): Clarify error message.
1194 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
1196 * parse.y (component_constructor_declarator): allow optional
1197 parentheses around constructor class name.
1199 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1201 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
1203 * init.c (emit_base_init): Remove incorrect comment about
1205 * method.c (make_thunk): Fix comment alignment.
1207 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1209 Kill remnants of this is variable.
1210 * cp-tree.h (flag_this_is_variable): Remove.
1211 * decl2.c (flag_this_is_variable): Remove.
1212 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
1213 (build_vbase_path): The path is non-static, even in a cdtor.
1214 (resolves_to_fixed_type_p): Add additional return value.
1215 * search.c (init_vbase_pointers): Adjust.
1216 * tree.c (lvalue_p_1): Adjust.
1217 * typeck.c (mark_addressable): Adjust.
1219 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1221 * pt.c (unify): Don't check cv quals of array types.
1223 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1225 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
1226 check whether we already have the type.
1228 2001-02-13 Mark Mitchell <mark@codesourcery.com>
1230 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
1231 * call.c (build_op_delete_call): Simplify to remove duplicate
1233 * class.c (clone_function_decl): Don't build the deleting variant
1234 of a non-virtual destructor.
1235 * decl.c (finish_destructor_body): Don't call delete if this is a
1236 non-virtual destructor.
1237 * init.c (build_delete): Explicitly call `operator delete' when
1238 deleting an object with a non-virtual destructor.
1240 2001-02-13 Jason Merrill <jason@redhat.com>
1242 * lang-specs.h: Add more __EXCEPTIONS.
1244 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
1246 * typeck2.c (process_init_constructor): Check
1247 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
1249 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
1251 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
1252 Remove spurious information in comment. Allow further
1253 adjustments of REFERENCE_TYPE args.
1255 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
1257 * errfn.c (cp_deprecated): Tweak diagnostic text.
1258 * parse.y (new_initializer): Deprecate initializer lists
1261 2001-02-12 Mark Mitchell <mark@codesourcery.com>
1263 Remove old ABI support.
1265 2001-02-11 Mark Mitchell <mark@codesourcery.com>
1267 * decl2.c (flag_vtable_thunks): Always set it to 1.
1268 (flag_new_abi): Likewise.
1269 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
1271 * Makefile.in (g++spec.o): Fix typo.
1273 2001-02-09 Jason Merrill <jason@redhat.com>
1275 * lang-specs.h: Restore definition of __EXCEPTIONS.
1277 2001-02-08 Jason Merrill <jason@redhat.com>
1279 * search.c (shared_member_p): New function.
1280 (lookup_field_r): Use it.
1281 * cp-tree.h (SHARED_MEMBER_P): Remove.
1283 * method.c (process_overload_item): Handle template-dependent array
1285 * pt.c (type_unification_real): If we end up with undeduced nontype
1288 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
1291 * typeck2.c (friendly_abort): Don't say anything if we have
1292 earlier errors or sorries.
1294 * decl.c (check_tag_decl): Notice attempts to redefine bool and
1295 wchar_t. Ignore if in_system_header.
1297 * decl.c (maybe_push_cleanup_level): New fn...
1298 (start_decl_1): ...split out from here.
1299 * cvt.c (build_up_reference): Use it.
1300 * cp-tree.h: Declare it.
1302 2001-02-07 Mark Mitchell <mark@codesourcery.com>
1304 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
1307 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
1309 * pt.c (lookup_template_class): Make sure it's a primary
1310 template or template_template_parm when called from the parser.
1311 (instantiate_template_class): Add assertion.
1313 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
1315 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
1316 from error_mark_node.
1318 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
1320 Fix specification and implementation bugs in V3 ABI
1321 construction vtables.
1322 * cp-tree.h (flag_dump_class_layout): New flag.
1323 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
1324 (BINFO_LOST_PRIMARY_P): New flag.
1325 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
1326 (BINFO_PRIMARY_MARKED_P): Rename to ...
1327 (BINFO_PRIMARY_P): ... here.
1328 (binfo_via_virtual): New prototype.
1329 * decl2.c (flag_dump_class_layout): New flag.
1330 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
1331 use `=' as a file name separator.
1332 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
1334 (build_vtbl_address): If this is a virtual primary base, then
1335 get the vtbl of what it is ultimately primary for.
1336 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
1337 for BINFO_PRIMARY_P.
1338 (dfs_skip_nonprimary_vbases_markedp): Likewise.
1339 (get_shared_vbase_if_not_primary): Likewise.
1340 (dfs_get_pure_virtuals): Likewise.
1341 (expand_upcast_fixups): Likewise.
1342 (fixup_virtual_upcast_offsets): Likewise.
1343 (dfs_find_vbase_instance): Likewise.
1344 (find_vbase_instance): Likewise.
1345 (binfo_from_vbase): Adjust comment to reflect reality.
1346 (binfo_via_virtual): New function.
1347 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
1348 for binfo walking during VTT construction.
1349 (dfs_mark_primary_bases): Remove.
1350 (force_canonical_binfo_r): New function.
1351 (force_canonical_binfo): New function.
1352 (mark_primary_virtual_base): New function.
1353 (mark_primary_bases): Walk in inheritance graph order, use
1354 mark_primary_virtual_base.
1355 (determine_primary_base): Use some more intermediate variables.
1356 (dfs_find_final_overrider): Don't check for overriding along a
1358 (dfs_modify_vtables): Walk into primary virtual bases too.
1359 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
1360 (build_base_fields): Likewise.
1361 (dfs_set_offset_for_unshared_vbases): Likewise.
1362 (layout_virtual_bases): Likewise.
1363 (end_of_class): Likewise.
1364 (finish_struct_1): Call dump_class_hierarchy, if requested.
1365 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
1366 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
1367 (dump_class_hierarchy): Add file parameter. Append to file, if
1369 (finish_vtbls): Adjust accumulate_vtbl_inits call.
1370 Use canonical base for virtual bases.
1371 (build_vtt): Add more comments. Adjust build_vtt_inits call.
1372 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
1373 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
1374 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
1376 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
1377 from DATA. We want virtual primary bases and all bases via virtual.
1378 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
1379 virtual base when not a construction vtable.
1380 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
1381 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
1382 Use canonical bases when processing virtual bases.
1383 (accumulate_vtbl_inits): We're interested in any base via a
1385 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
1386 within a construction vtable, determine what is being overridden.
1387 (build_vtbl_initializer): Add more comments
1388 (add_vcall_offset_vtbl_entries_1): Adjust comment.
1389 (build_rtti_vtbl_entries): Check if the base has lost its
1392 2001-02-05 Mark Mitchell <mark@codesourcery.com>
1394 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
1396 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1398 * decl.c (pushdecl): Call abort instead of fatal.
1399 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
1400 * init.c (build_new_1): Likewise.
1401 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
1402 * decl.c (build_typename_type): hash_table_init now returns void.
1403 decl.c (init_decl_processing): Make an error non-fatal.
1405 2001-02-04 Mark Mitchell <mark@codesourcery.com>
1407 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
1409 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
1410 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
1411 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1412 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
1413 * decl.c (maybe_commonize_var): Use the new name-mangling where
1415 * decl2.c (comdat_linkage): Enhance comments. Make all
1416 compiler-generated things static, if COMDAT is not available.
1417 (get_tinfo_decl): Do not make typeinfo objects that belong in the
1419 (tinfo_base_init): Use the correct mangled name for typeinfo
1420 strings, and push them into the global scope.
1421 (typeinfo_in_lib_p): New function.
1422 (synthesize_tinfo_var): Use it.
1423 (create_real_tinfo_var): Likewise.
1425 2001-02-03 Jakub Jelinek <jakub@redhat.com>
1427 * decl.c (push_class_binding): Use context_for_name_lookup instead
1429 * search.c (context_for_name_lookup): Remove static. Check for NULL
1430 context in the loop.
1431 * cp-tree.h (context_for_name_lookup): Add prototype.
1433 2001-02-02 Jakub Jelinek <jakub@redhat.com>
1435 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
1436 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
1438 * call.c (convert_class_to_reference, build_user_type_conversion_1,
1439 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
1441 2001-02-02 Mark Mitchell <mark@codesourcery.com>
1443 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
1444 of macros used when compiling g++spec.c.
1445 * g++spec.c (lang_specific_driver): Link with the shared
1448 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
1450 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
1451 make_reference_declarator, make_call_declarator), method.c
1452 (implicitly_declare_fn), parse.y (namespace_using_decl,
1453 notype_unqualified_id, expr_or_declarator, new_type_id,
1454 after_type_declarator, direct_after_type_declarator,
1455 notype_declarator, complex_notype_declarator,
1456 complex_direct_notype_declarator, qualified_id,
1457 notype_qualified_id, overqualified_id, direct_new_declarator,
1458 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
1459 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
1460 instead of build_parse_node.
1462 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1464 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
1465 (minus_one_node): Moved to top level gcc directory. Renamed
1466 to integer_minus_one_node.
1468 * init.c (init_init_processing): Don't set minus_one_node.
1469 (build_vec_init): Use integer_minus_one_node.
1471 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1473 2001-01-28 Jakub Jelinek <jakub@redhat.com>
1475 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
1476 identical and they would be replaced with constant, remove
1477 MODIFY_EXPR from the tree.
1479 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1481 * Make-lang.in: Remove all dependencies on defaults.h.
1482 * call.c: Don't include defaults.h.
1484 * decl2.c: Likewise.
1485 * except.c: Likewise.
1489 * typeck.c: Likewise.
1491 2001-01-25 Jakub Jelinek <jakub@redhat.com>
1493 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
1494 operators even in "C" linkage.
1495 * method.c (set_mangled_name_for_decl): Likewise.
1496 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
1497 overloaded operators in "C" linkage.
1499 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
1501 * pt.c (tsubst_decl): Remove IN_DECL parameter.
1502 (tsubst_arg_types): Check parameter is not void.
1503 (tsubst): Adjust tsubst_decl call.
1505 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
1507 * call.c (add_builtin_candidate): Quote std properly, from
1510 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1512 * pt.c (check_explicit_specialization): Clone constructors and
1515 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
1517 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
1518 indicates anything special about template depth. Make sure we
1519 only count the user visible template classes.
1521 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
1523 * call.c (build_conv): Typo in comment.
1524 (add_builtin_candidate): Add more explanation.
1525 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
1526 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
1527 when we have enumeral types.
1528 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
1529 candidates for relops and eqops.
1530 (joust): Simplify control flow. Allow a non-template user
1531 function to hide a builtin.
1533 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
1535 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
1536 (more_specialized): Add deduction parameter.
1537 * call.c (joust): Adjust more_specialized call.
1538 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
1539 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
1540 (get_bindings_order): Remove.
1541 (get_bindings_real): Add DEDUCE parameter.
1542 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
1543 REFERENCE_TYPE jig for DEDUCE_ORDER.
1544 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
1545 maybe_adjust_types_for_deduction.
1546 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
1548 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
1549 (check_cv_quals_for_unify): Use new unify qualifier flags.
1550 (unify): Clear new unify qualifier flags.
1551 (get_bindings_real): Add DEDUCE parameter.
1552 (get_bindings): Adjust call to get_bindings_real.
1553 (get_bindings_overload): Likewise.
1554 (most_specialized_instantiation): Adjust call to
1557 2001-01-19 Jason Merrill <jason@redhat.com>
1559 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
1561 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
1564 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
1566 * decl2.c (arg_assoc_class): Fix double iteration logic.
1568 2001-01-19 Jason Merrill <jason@redhat.com>
1570 * init.c (build_delete): Always call convert_force to strip cv-quals.
1572 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
1573 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
1574 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
1576 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1578 * search.c (get_vbase_1): Count only virtual bases.
1580 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1582 * class.c (duplicate_tag_error): Robustify flag clearing.
1584 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1586 * cp-tree.h (lookup_template_class): Add complain parm.
1587 * decl.c (lookup_namespace_name): Adjust call to
1588 lookup_template_class.
1589 (make_typename_type): Likewise.
1590 * semantics.c (finish_template_type): Likewise.
1591 * pt.c (lookup_template_class): Add complain parm. Adjust.
1592 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
1595 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1597 * pt.c (copy_default_args_to_explicit_spec): Preserve
1598 object's CV quals. Reorganize.
1600 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1602 * typeck.c (build_modify_expr): Say `initialization' for
1604 * init.c (build_default_init): Convert to enumeral type, if
1607 2001-01-18 Jakub Jelinek <jakub@redhat.com>
1609 * parse.y (nomods_initdcl0): Properly set things up for
1612 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1614 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
1615 (type_unification_real): Set it.
1618 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1620 * decl.c (finish_destructor_body): Convert to vbase pointer here.
1622 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1624 * semantics.c (begin_class_definition): Check we're not inside a
1627 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1629 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
1632 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1634 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
1635 * call.c (build_over_call): Add comment.
1637 2001-01-16 Daniel Berlin <dberlin@redhat.com>
1639 * cvt.c (ocp_convert): Handle vector type conversion
1640 * typeck2.c (digest_init): Handle vector type initializations
1642 2001-01-16 Phil Edwards <pme@sources.redhat.com>
1644 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
1647 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
1649 * pt.c (check_nontype_parm): Rename to ...
1650 (invalid_nontype_parm_type_p): ... here.
1651 (process_template_parm): Adjust.
1652 (convert_template_argument): Adjust.
1654 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
1656 * pt.c (check_nontype_parm): New function.
1657 (process_template_parm): Use it.
1658 (convert_template_argument): Use it.
1659 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
1662 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
1664 * tree.c: Add defaults.h
1665 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
1666 * Make-lang.in (cp/tree.o): Add defaults.h.
1668 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1670 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
1672 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1674 * g++.1: Change to be ".so man1/gcc.1".
1676 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1678 * Make-lang.in (c++.info, c++.install-info): Build and install g++
1680 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
1681 ($(srcdir)/cp/g++int.info): New target.
1682 * gxxint.texi: Add info directory entry. Use @@ in email address.
1683 * .cvsignore: Update.
1685 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
1687 * typeck.c (build_c_cast): Do template processing earlier.
1688 Always pedwarn on array casts.
1690 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
1692 * friend.c (make_friend_class): Make sure a templated class is
1693 actually a template.
1695 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1697 * decl2.c (get_guard): Set linkage from guarded decl.
1699 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1701 * call.c (convert_default_arg): Check for unprocessed
1703 * cp-tree.h (replace_defarg): Move to spew.c.
1704 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
1705 spew.c, which is where they really are.
1706 (done_pending_defargs): Declare.
1707 (unprocessed_defarg_fn): Declare.
1708 * decl.c (replace_defarg): Move to spew.c
1709 * parse.y (structsp): Call done_pending_defargs.
1710 * spew.c (defarg_fns): Rearrange list structure.
1711 (defarg_fnsdone): New static variable.
1712 (defarg_depfns): New static variable.
1713 (init_spew): Adjust.
1714 (add_defarg_fn): Store the type in TREE_TYPE.
1715 (do_pending_defargs): Detect and deal with ordering constraints
1717 (done_pending_defargs): New function.
1718 (unprocessed_defarg_fn): New function.
1719 (replace_defarg): Moved from decl.c. Robustify. Don't save
1720 if circularity detected.
1722 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1724 * pt.c (unify): Check array has a domain, before checking
1725 whether it is variable sized.
1727 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1729 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
1730 parameters with pointers to arrays of unknown bound.
1732 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1734 * parse.y (template_parm_header, template_spec_header): New
1735 reductions. Split out from ...
1736 (template_header): ... here. Use them.
1737 (template_template_parm): Use template_parm_header.
1738 * semantics.c (finish_template_template_parm): Add assert.
1740 2001-01-10 Mark Mitchell <mark@codesourcery.com>
1742 * mangle.c (write_builtin_type): Fix thinko.
1744 * pt.c (copy_default_args_to_explicit_spec_1): New function.
1745 (copy_default_args_to_explicit_spec): Likewise.
1746 (check_explicit_specialization): Use it.
1748 * class.c (finish_struct_1): Remove last argument in call to
1749 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
1750 * decl.c (builtin_function): Likewise.
1751 (build_cp_library_fn): Likewise.
1752 (check_initializer): Likewise.
1753 (make_rtl_for_nonlocal_decl): Likewise.
1754 (cp_finish_decl): Likewise.
1755 (start_function): Likewise.
1756 * decl2.c (finish_anon_union): Likewise.
1757 * friend.c (do_friend): Likewise.
1758 * init.c (build_java_class_ref): Likewise.
1759 * method.c (make_thunk): Likewise.
1760 * pt.c (tsubst_friend_function): Likewise.
1761 * semantics.c (expand_body): Likewise.
1763 2001-01-10 Mark Mitchell <mark@codesourcery.com>
1765 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
1766 looking at DECL_CLONED_FUNCTION for non-functions.
1768 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1770 * error.c (dump_template_parameter): Use parm to determine how
1771 to print default value.
1773 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1775 * class.c (duplicate_tag_error): Clear more flags.
1777 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1779 * call.c (build_new_method_call): Use binfo_for_vbase.
1781 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
1783 * cp-tree.h (flag_cond_mismatch): Don't declare.
1784 * decl2.c (flag_cond_mismatch): Don't define.
1785 (lang_f_options): Remove cond-mismatch.
1786 (unsupported_options): Add cond-mismatch.
1788 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
1790 * class.c (handle_using_decl): Reject using of constructor name
1791 of sourcing class. Allow injecting of a method with same name as
1792 nested class. Fixup error messages.
1794 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
1796 * decl2.c (lang_decode_option): Handle -Wformat=2.
1798 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1800 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
1801 initialized_in_class.
1802 (DECL_DEFINED_IN_CLASS_P): Rename to ...
1803 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
1804 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
1805 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
1806 * pt.c (check_default_tmpl_args): Adjust for
1807 DECL_INITIALIZED_IN_CLASS_P.
1808 (instantiate_class_template): Likewise.
1809 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
1811 * class.c (finish_struct): Constify saved_filename.
1813 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1815 * class.c (duplicate_tag_error): Adjust diagnostic.
1816 (finish_struct): Locally set location to start of struct.
1817 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
1819 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1821 * decl.c (struct binding_level): Adjust class_shadowed comments
1823 (push_class_level_binding): Ajust comments to reflect reality.
1824 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
1825 Don't set TREE_VALUE on the class_shadowed list.
1827 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
1829 * decl2.c (acceptable_java_type): Allow references too.
1830 * init.c (build_java_class_ref): When using the new ABI, search
1831 `class$' and have it mangled with `mangle_decl.'
1832 * mangle.c (write_java_integer_type_codes): New function.
1833 (write_builtin_type): Detect and mangle Java integer and real
1836 2001-01-07 Mark Mitchell <mark@codesourcery.com>
1838 * decl2.c (grokfield): Don't accept `asm' specifiers for
1839 non-static data members.
1841 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1843 * expr.c (cplus_expand_expr): Don't reset `target'.
1845 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
1847 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
1849 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
1851 * parse.y (template_datadef): Check for error_mark_node.
1853 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
1855 * cp-tree.def (DEFAULT_ARG): Make `x' class.
1857 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
1859 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
1860 (record_builtin_type): Make non-static.
1861 (flag_short_double): Don't declare.
1862 (init_decl_processing): Remove the creation of many tree nodes now
1863 in c_common_nodes_and_builtins.
1864 (build_void_list_node): New function.
1865 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
1866 * cp-tree.h (flag_short_wchar): Don't declare.
1868 2001-01-04 Mark Mitchell <mark@codesourcery.com>
1870 * call.c (build_conv): Don't use build1 for USER_CONV.
1871 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
1873 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
1875 * lex.c (lang_init): Call c_common_lang_init.
1877 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
1879 * search.c (lookup_fnfields_here): Remove.
1880 (look_for_overrides_r): Use lookup_fnfields_1.
1881 Ignore functions from using declarations.
1883 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
1885 Implement exceptions specifiers for implicit member functions.
1886 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
1887 * method.c (synthesize_exception_spec): New function.
1888 (locate_dtor, locate_ctor, locate_copy): New functions.
1889 (implicitly_declare_fn): Generate the exception spec too.
1890 * search.c (check_final_overrider): Check artificial functions
1892 * typeck2.c (merge_exception_specifiers): New function.
1894 2001-01-03 Jason Merrill <jason@redhat.com>
1896 * init.c (build_default_init): New fn.
1897 (perform_member_init): Split out from here.
1898 (build_new_1): Use it. Simplify initialization logic.
1899 (build_vec_init): Take an array, rather than a pointer and maxindex.
1900 Speed up simple initializations. Don't clean up if we're assigning.
1901 * cp-tree.h: Adjust.
1902 * decl2.c (do_static_initialization): Remove TREE_VEC case.
1903 * parse.y (new_initializer): Return void_zero_node for ().
1904 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
1905 * typeck2.c (digest_init): Only complain about user-written
1908 2000-12-22 Mike Stump <mrs@wrs.com>
1910 * decl2.c: (max_tinst_depth): Increase to 50.
1912 2001-01-02 Mark Mitchell <mark@codesourcery.com>
1914 * class.c (invalidate_class_lookup_cache): Zero the
1915 previous_class_values.
1916 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
1918 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
1919 * decl.c (free_bindings): New variable.
1920 (push_binding): Don't create a new binding if we have one on the
1922 (pop_binding): Put old bindings on the free list.
1923 (init_decl_processing): Use size_int, not build_int_2.
1924 Register free_bindings as a GC root.
1925 (cp_make_fname_decl): Use size_int, not build_int_2.
1926 (push_inline_template_parms_recursive): Likewise.
1927 (end_template_parm_list): Likewise.
1928 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
1929 (tsubst_template_parms): Use size_int, not build_int_2.
1931 * rtti.c (get_vmi_pseudo_type_info): Likewise.
1933 2001-01-02 Richard Henderson <rth@redhat.com>
1935 * parse.y (asm): Set ASM_INPUT_P.
1937 2001-01-02 Jason Merrill <jason@redhat.com>
1939 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
1942 * typeck.c (cp_truthvalue_conversion): New fn.
1943 * cvt.c (ocp_convert): Use it.
1945 * cp-tree.h: Lose c-common.c decls.
1947 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
1948 * cvt.c (convert_to_void): Use type_unknown_p.
1950 * typeck.c (strip_all_pointer_quals): Also strip quals from
1951 pointer-to-member types.
1953 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
1956 * call.c (build_new_method_call): Do evaluate the object parameter
1957 when accessing a static member.
1958 * typeck.c (build_component_ref): Likewise.
1960 2001-01-02 Andreas Jaeger <aj@suse.de>
1962 * decl.c (cp_missing_noreturn_ok_p): New.
1963 (init_decl_processing): Set lang_missing_noreturn_ok_p.
1965 2000-12-29 Jakub Jelinek <jakub@redhat.com>
1967 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
1969 2000-12-29 Mark Mitchell <mark@codesourcery.com>
1971 * class.c (pushclass): Remove #if 0'd code.
1972 * cp-tree.h (overload_template_name): Remove.
1973 * decl.c (store_bindings): Simplify.
1974 (pop_from_top_level): Likewise.
1975 * pt.c (overload_template_name): Remove.
1976 (instantiate_decl): Don't call push_to_top_level if it's not
1979 2000-12-28 Mark Mitchell <mark@codesourcery.com>
1981 * pt.c (register_local_specialization): Don't return a value.
1982 (lookup_template_class): Use move-to-front heuristic when looking
1983 up template instantiations.
1984 (instantiate_decl): Only push_to_top_level when we're actually
1985 going to instantiate the template.
1987 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
1989 * search.c (binfo_for_vtable): Return least derived class, not
1990 most. Handle secondary vtables.
1992 2000-12-22 Jason Merrill <jason@redhat.com>
1994 * pt.c (more_specialized): Don't optimize len==0.
1995 (fn_type_unification): If we're adding the return type, increase len.
1997 * typeck.c (build_binary_op): Fix pmf comparison logic.
1999 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
2000 DECL_STATIC_FUNCTION_P.
2002 * semantics.c (genrtl_finish_function): Don't try to jump to
2003 return_label unless it exists.
2005 In partial ordering for a call, ignore parms for which we don't have
2007 * call.c (joust): Pass len to more_specialized.
2008 (add_template_candidate_real): Strip 'this', pass len.
2009 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
2010 (get_bindings_order): New fn. Pass len down.
2011 (get_bindings_real): Strip 'this', pass len.
2012 (fn_type_unification): Likewise.
2013 (type_unification_real): Succeed after checking 'len' args.
2014 (most_specialized_instantiation): Lose explicit_args parm.
2015 * class.c (resolve_address_of_overloaded_function): Strip 'this',
2018 2000-12-21 Jason Merrill <jason@redhat.com>
2020 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
2021 DECL_TEMPLATE_RESULT.
2023 * search.c (lookup_field_r): Call lookup_fnfields_1, not
2024 lookup_fnfields_here.
2026 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
2028 * call.c (build_object_call): Also allow conversions that return
2029 reference to pointer to function.
2030 (add_conv_candidate): Handle totype being ref to ptr to fn.
2031 (build_field_call): Also allow members of type reference to function.
2032 Lose support for calling pointer to METHOD_TYPE fields.
2034 * error.c (dump_expr): Handle *_CAST_EXPR.
2036 * typeck2.c (build_scoped_ref): Always convert to the naming class.
2038 * tree.c (break_out_cleanups): Lose.
2039 * cp-tree.h: Remove prototype.
2040 * typeck.c (build_component_ref): Don't break_out_cleanups.
2041 (build_compound_expr): Likewise.
2042 * semantics.c (finish_expr_stmt): Likewise.
2044 2000-12-20 Richard Henderson <rth@redhat.com>
2046 * cp-tree.h: Update declarations.
2047 * decl.c (finish_case_label): Return the new stmt node.
2048 * semantics.c (finish_goto_stmt): Likewise.
2049 (finish_expr_stmt, finish_return_stmt): Likewise.
2050 (finish_break_stmt, finish_continue_stmt): Likewise.
2051 (finish_asm_stmt): Likewise.
2052 * parse.y (already_scoped_stmt): Set STMT_LINENO.
2053 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
2054 (simple_if, simple_stmt): Return the new stmt node.
2057 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
2059 * cp-tree.h: Don't declare warn_long_long.
2061 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2063 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
2066 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2068 * pt.c (unify): Handle when both ARG and PARM are
2069 BOUND_TEMPLATE_TEMPLATE_PARM.
2071 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2073 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
2074 DECL_TEMPLATE_PARM_P.
2076 2000-12-15 Jason Merrill <jason@redhat.com>
2078 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
2080 * init.c (build_new_1): Don't strip quals from type.
2082 * decl.c (pushdecl): Don't check for linkage on a non-decl.
2084 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
2086 * call.c (build_new_function_call): Lose space before paren in
2088 (build_new_method_call): Likewise.
2090 * typeck2.c (build_m_component_ref): Propagate quals from datum.
2092 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2094 * pt.c (check_explicit_specialization): Propagate default
2095 function arguments to explicit specializations.
2097 2000-12-13 DJ Delorie <dj@redhat.com>
2099 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
2102 2000-12-08 Jason Merrill <jason@redhat.com>
2104 * error.c (dump_function_name): Don't let the user see __comp_ctor.
2106 Clean up copy-initialization in overloading code.
2107 * call.c (build_user_type_conversion_1): Die if we are asked to
2108 convert to the same or a base type.
2109 (implicit_conversion): Avoid doing so. Lose reference binding code.
2110 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
2111 direct-initialization. Also do direct-init part of copy-init.
2112 (build_user_type_conversion): Don't provide context to convert_like.
2113 * cvt.c (ocp_convert): build_user_type_conversion will now provide
2114 the constructor call for copy-init.
2116 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
2117 instantiation of a member template.
2118 (do_decl_instantiation): Not here.
2120 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
2122 * class.c (check_field_decls): Don't special case anonymous
2123 fields in error messages.
2124 (note_name_declared_in_class): Use %D on diagnostic.
2126 * tree.c (pod_type_p): Use strip_array_types.
2127 (cp_valid_lang_attribute): Likewise.
2128 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
2129 multiple evaluations.
2130 (cp_has_mutable_p): Use strip_array_types.
2132 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
2134 * cp-tree.h (sufficient_parms_p): Declare new function.
2135 * call.c (sufficient_parms_p): New function, broken out of ...
2136 (add_function_candidate): ... here. Use it.
2137 (add_conv_candidate): Use it.
2138 * decl.c (grok_ctor_properties): Use it.
2140 2000-12-07 Jakub Jelinek <jakub@redhat.com>
2142 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
2144 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
2146 * decl2.c (lang_decode_option): Handle -Wformat-security.
2148 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2150 * pt.c (verify_class_unification): New function.
2151 (get_class_bindings): Use it.
2152 (try_class_unification): Tidy.
2153 (unify): Handle when argument of a template-id is not
2154 template parameter dependent.
2155 (template_args_equal): Handle when TREE_CODE's do not match.
2157 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
2159 * lang-specs.h (c++): When invoking the stand-alone preprocessor
2160 for -save-temps, pass all relevant -Defines to it, and then don't
2161 pass them to cc1plus.
2163 2000-12-05 Will Cohen <wcohen@redhat.com>
2165 * decl.c (finish_case_label): Cleared
2166 more_cleanups_ok in surrounding function scopes.
2167 (define_label): Likewise.
2169 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
2171 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
2172 (get_matching_virtual): Remove.
2173 (look_for_overrides): Declare new function.
2174 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
2176 * class.c (check_for_override): Move base class iteration code
2177 to look_for_overrides.
2178 * search.c (next_baselink): Remove.
2179 (get_virtuals_named_this): Remove.
2180 (get_virtual_destructor): Remove.
2181 (tree_has_any_destructors_p): Remove.
2182 (struct gvnt_info): Remove.
2183 (check_final_overrider): Remove `virtual' from error messages.
2184 (get_matching_virtuals): Remove. Move functionality to ...
2185 (look_for_overrides): ... here, and ...
2186 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
2189 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
2191 * typeck.c (get_delta_difference): If via a virtual base,
2193 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
2196 2000-12-04 Richard Henderson <rth@redhat.com>
2198 * error.c (dump_tree): Use output_add_string not OB_PUTS.
2200 2000-12-04 Jason Merrill <jason@redhat.com>
2202 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
2203 (write_builtin_type): Pass intSI_type_node and the like through
2205 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
2206 Pass intSI_type_node and the like through type_for_mode.
2207 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
2208 * pt.c (tsubst, unify): Likewise.
2209 * tree.c (walk_tree): Likewise.
2210 * error.c (dump_type): Likewise.
2211 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
2213 * Make-lang.in: Tweak top comment for emacs.
2216 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
2218 * class.c (clone_function_decl): Robustify.
2220 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
2222 * decl.c (store_bindings): Only search in the non modified
2223 old_bindings for duplicates.
2225 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
2227 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
2230 * typeck.c (build_static_cast): Remove unused variable.
2232 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2234 * pt.c: Fix typo in comment.
2236 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
2238 * decl2.c (warn_format): Remove definition.
2239 (lang_decode_option): Handle -Wformat-nonliteral,
2240 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
2242 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
2244 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
2245 (init_decl_processing): Don't create string_type_node,
2246 const_string_type_node, wint_type_node, intmax_type_node,
2247 uintmax_type_node, default_function_type, ptrdiff_type_node and
2248 unsigned_ptrdiff_type_node. Adjust position of call to
2249 c_common_nodes_and_builtins.
2250 (identifier_global_value): New function.
2252 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
2254 * call.c (standard_conversion): Reject pointer to member
2255 conversions from ambiguous, inaccessible or virtual bases.
2256 * typeck.c (build_static_cast): Don't check pointers to members
2259 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2261 * method.c (do_build_copy_constructor): Preserve cv
2262 qualifications when accessing source object members.
2263 (do_build_assign_ref): Likewise. Remove separate diagnostics for
2266 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2268 * method.c (do_build_assign_ref): Construct appropriately
2269 CV-qualified base reference. Don't allow const casts in base
2272 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2274 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
2275 incomplete return type.
2277 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2279 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
2280 * semantics.c (finish_base_specifier): Accept a _TYPE not a
2283 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2285 * spew.c (yyerror): Cope if yylval.ttype is NULL.
2287 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2289 * decl.c (grokdeclarator): Diagnose undefined template contexts.
2291 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2293 * decl.c (grokdeclarator): Do type access control on friend
2296 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
2298 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
2299 bison parser ickiness.
2300 * pt.c (tsubst_friend_function): Enter namespace scope when
2301 tsubsting the function name.
2302 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
2304 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
2306 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
2307 * cvt.c (cp_convert_to_pointer): Add force parameter.
2308 Allow conversions via virtual base if forced.
2309 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
2310 (ocp_convert): Likewise.
2311 * search.c (binfo_from_vbase): Return the virtual base's binfo.
2312 * typeck.c (get_delta_difference): Adjust handling of virtual
2315 2000-11-26 Mark Mitchell <mark@codesourcery.com>
2317 * tree.c (struct list_hash): Remove.
2318 (list_hash_table): Make it be an htab.
2319 (struct list_proxy): New type.
2320 (list_hash_eq): New function.
2321 (list_hash_pieces): Renamed from ...
2322 (list_hash): ... this.
2323 (list_hash_lookup): Remove.
2324 (list_hash_add): Remove.
2325 (hash_tree_cons): Use the generic hashtable.
2326 (mark_list_hash): Remove.
2327 (init_tree): Create the hashtable.
2329 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
2331 * method.c (build_mangled_C9x_name): Rename to
2332 build_mangled_C99_name. Change C9X references in comments to
2335 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
2337 * parse.y (unary_expr): Move VA_ARG from here ...
2338 (primary): ... to here.
2340 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
2342 * semantics.c (finish_id_expr): If type is error_mark, return
2345 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
2347 * pt.c (lookup_template_class): Simplify loop exit constructs.
2348 Cope when there is no partial instantiation of a template
2351 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
2353 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
2355 2000-11-22 Mark Mitchell <mark@codesourcery.com>
2357 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
2360 * pt.c (do_decl_instantiate): Explicitly clone constructors and
2361 destructors that haven't already been cloned.
2363 2000-11-20 Richard Henderson <rth@redhat.com>
2365 * parse.y (yyparse_1): Rename the parser entry point.
2367 2000-11-20 Alex Samuel <samuel@codesourcery.com>
2369 * mangle.c (write_name): Use <unscoped-name> for names directly in
2371 (write_unscoped_name): Accept names directly in function scope.
2373 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
2375 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
2376 * parse.y (extdef): Add EXPORT reduction.
2377 * spew.c (yylex): Don't skip export here.
2379 2000-11-19 Mark Mitchell <mark@codesourcery.com>
2381 * decl.c (init_decl_processing): Correct name of pure virtual
2382 function under the new ABI.
2383 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
2384 (throw_bad_typeid): Likewise for bad typeid function.
2386 2000-11-18 Mark Mitchell <mark@codesourcery.com>
2388 * decl.c (grokparms): Don't even function types of `void' type,
2390 * mangle.c (write_type): Don't crash when confronted with the
2393 * decl.c (grokparms): Don't create parameters of `void' type.
2395 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
2397 * lex.c (mark_impl_file_chain): Delete.
2398 (init_parse): Remove call to ggc_add_string_root. No need to
2399 ggc_strdup a string constant. Do not add impl_file_chain to GC
2401 (handle_pragma_implementation): No need to ggc_strdup main_filename.
2403 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
2405 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
2407 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
2409 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
2410 * decl.c (grokdeclarator): Don't reject void parms here.
2411 (require_complete_types_for_parms): Simplify, use
2412 complete_type_or_else.
2413 (grokparms): Remove bitrot. Remove funcdef parm.
2414 Deal with ellipsis parm lists here.
2415 * semantics.c (finish_parmlist): Don't append void_list_node
2416 here. Set PARMLIST_ELLIPSIS_P.
2418 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
2420 * typeck2.c (incomplete_type_error): Reorganise to avoid
2421 excessive diagnostics.
2423 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
2425 * lex.c (struct impl_files, internal_filename): Constify a char *.
2427 2000-11-16 Mark Mitchell <mark@codesourcery.com>
2429 * mangle.c (write_special_name_constructor): Don't generate
2430 assembler junk when confronted with an old-style constructor.
2431 (write_special_name_destructor): Likewise.
2432 (mangle_decl_string): Do it here instead.
2434 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
2436 * call.c (op_error): Make error messages clearer.
2438 2000-11-15 Mark Mitchell <mark@codesourcery.com>
2440 * decl.c (wrapup_globals_for_namespace): Don't mark things
2441 TREE_ASM_WRITTEN when they're not.
2443 2000-11-15 Jason Merrill <jason@redhat.com>
2445 * typeck2.c (friendly_abort): Uncount the error before handing
2448 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
2450 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
2452 2000-11-14 Mark Mitchell <mark@codesourcery.com>
2454 * class.c (build_vtbl_initializer): Fix typo in comment.
2455 * typeck.c (expr_sizeof): Don't crash on errors.
2457 2000-11-14 Jim Wilson <wilson@redhat.com>
2459 * lang-specs.h: Add %2 after %(cc1_options).
2461 2000-11-14 Richard Henderson <rth@redhat.com>
2463 * typeck.c (c_sizeof): Be strict about casting result value
2464 back to c_size_type_node.
2465 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
2467 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
2469 * typeck.c (build_unary_op): Use boolean_increment from
2470 c-common.c, moving the relevant code there.
2472 2000-11-11 Jason Merrill <jason@redhat.com>
2474 * typeck.c (mark_addressable): Don't call put_var_into_stack.
2476 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
2479 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2481 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
2482 * lex.c (copy_lang_decl): Likewise.
2484 2000-11-09 Mark Mitchell <mark@codesourcery.com>
2486 * dump.c (cp_dump_tree): Don't dump function bodies here.
2488 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2489 (dump.o): Update dependency list.
2490 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
2491 (flag_dump_translation_unit): Likewise.
2492 (CP_TYPE_QUALS): Adjust definition.
2493 (DECL_C_BIT_FIELD): Remove.
2494 (SET_DECL_C_BIT_FIELD): Likewise.
2495 (CLEAR_DECL_C_BIT_FIELD): Likewise.
2496 (add_maybe_template): Likewise.
2497 (strip_array_types): Likewise.
2498 (dump_node_to_file): Likewise.
2499 (cp_dump_tree): New function.
2500 * decl.c (init_decl_processing): Set lang_dump_tree.
2501 * decl2.c (flag_dump_translation_unit): Remove.
2502 * dump.c: Move most of it to ../c-dump.c.
2503 (cp_dump_tree): New function.
2504 * pt.c (add_maybe_template): Remove.
2505 * typeck.c (strip_array_types): Likewise.
2507 2000-11-07 Eric Christopher <echristo@redhat.com>
2509 * decl.c (init_decl_processing): Change definition of
2510 __wchar_t to wchar_t. Remove artificial declaration of
2512 * lex.c: Change instances of __wchar_t to wchar_t.
2514 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
2516 * lex.c (do_identifier): Don't lookup_name for operators.
2517 * parse.y (operator): Save looking_for_typename.
2518 (unoperator): Restore it.
2519 * spew.c (frob_opname): Use nth_token for lookahead.
2521 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
2523 * decl.c (grok_op_properties): Always use coerce_new_type and
2525 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
2526 exception specification. Tidy up.
2527 (coerce_delete_type): Preserve exception specification. Tidy up.
2529 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
2531 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
2532 (push_binding_level), error.c (cp_tree_printer), pt.c
2533 (process_partial_specialization, tsubst_template_arg_vector),
2534 search.c (lookup_member): Use memset () instead of bzero ().
2536 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
2538 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
2540 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
2542 * Make-lang.in (c++.distdir): Remove.
2544 2000-11-04 Mark Mitchell <mark@codesourcery.com>
2546 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
2547 declarations from different namespaces to be combined.
2549 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
2551 * decl.c: Include tm_p.h.
2553 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
2555 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
2557 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
2559 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
2560 (build_overload_value), repo.c (open_repo_file), xref.c
2561 (open_xref_file): Use strchr () and strrchr () instead of index ()
2564 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
2566 * call.c (build_over_call): Call fold on the CALL_EXPR.
2568 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
2570 * error.c (dump_template_decl): Separate template hearders with
2573 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
2575 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
2576 TS_* flags with corresponding TFF_*. Adjust prototypes of
2577 functions (which used to take a tree_string_flags) to take an int.
2579 * cp-tree.h (enum tree_string_flags): Remove
2580 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
2581 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
2582 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
2583 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
2584 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
2585 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
2586 (type_as_string, decl_as_string, expr_as_string,
2587 context_as_string): Adjust prototype.
2589 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
2590 instead of TS_PLAIN.
2592 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
2593 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
2596 2000-10-30 Mark Mitchell <mark@codesourcery.com>
2598 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
2599 (linkage_kind): New enumeration.
2600 (decl_linkage): New function.
2601 * decl2.c (comdat_linkage): Extend comment.
2602 * error.c (dump_function_decl): Print the arguments used to
2603 instantiate a template, even when not printing the type of the
2605 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
2606 not TREE_PUBLIC, to test for external linkage.
2607 * tree.c (decl_linkage): New function.
2609 2000-10-28 Mark Mitchell <mark@codesourcery.com>
2611 * pt.c (instantiate_decl): Always instantiate static data members
2612 initialized in-class.
2614 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
2616 * Make-lang.in: Move all build rules here from Makefile.in,
2617 adapt to new context. Wrap all rules that change the current
2618 directory in parentheses. Expunge all references to $(P).
2619 When one command depends on another and they're run all at
2620 once, use && to separate them, not ;. Add OUTPUT_OPTION to
2621 all object-file generation rules. Delete obsolete variables.
2623 * Makefile.in: Delete.
2624 * config-lang.in: Delete outputs= line.
2626 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
2628 * error.c (dump_function_decl): Print no space between
2629 `ptr-operator' the `type-specifier' of the return type.
2630 (dump_type_prefix): Make sure we put space at the appropriate
2633 2000-10-23 Jason Merrill <jason@redhat.com>
2635 * call.c (equal_functions): Also call decls_match for extern "C" fns.
2637 2000-10-22 Jason Merrill <jason@redhat.com>
2639 * call.c (build_conditional_expr): Use ocp_convert to force
2642 2000-10-22 Mark Mitchell <mark@codesourcery.com>
2644 * call.c (standard_conversion): Use RVALUE_CONVs for all
2645 expressions that satisfy lvalue_p, not just those that satisfy
2648 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
2650 * typeck.c (c_sizeof): Return an expression of `size_t' type,
2651 not one with TYPE_IS_SIZETYPE set.
2652 (dubious_conversion_warnings): Remove special-case code.
2654 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
2656 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
2657 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
2658 (dump_type_prefix): Print vector-of-int as 'int vector'.
2659 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
2660 * tree.c (walk_tree): Handle VECTOR_TYPE.
2662 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
2664 2000-10-21 Jason Merrill <jason@redhat.com>
2666 * parse.y (operator): Set got_object from got_scope.
2667 Set looking_for_typename.
2668 * decl.c (lookup_name_real): Clear val after setting from_obj.
2669 Reorganize diagnostic.
2671 2000-10-20 Jason Merrill <jason@redhat.com>
2673 * tree.c (walk_tree): Don't walk into default args.
2675 * error.c (dump_expr): Use host_integerp.
2677 2000-10-20 David Edelsohn <edelsohn@gnu.org>
2679 * typeck2.c (abstract_virtuals_error): Use "because" instead of
2680 "since" in error message.
2682 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2684 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
2686 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
2688 * decl.c (revert_static_member_fn): Fixed typo.
2690 2000-10-19 Mark Mitchell <mark@codesourcery.com>
2692 * class.c (subobject_offset_fn): New type.
2693 (dfs_record_base_offsets): Remove.
2694 (record_base_offsets): Likewise.
2695 (dfs_search_base_offsets): Likewise.
2696 (record_subobject_offset): New function.
2697 (check_subobject_offset): Likewise.
2698 (walk_subobject_offsets): Likewise.
2699 (record_subobject_offsets): Likewise.
2700 (layout_conflict_p): Reimplement.
2701 (layout_nonempty_base_or_field): Correct handling of type
2702 conflicts during layout.
2703 (layout_empty_base): Likewise.
2704 (build_base_field): Adjust to handle new representation of empty
2706 (build_base_fields): Likewise.
2707 (layout_virtual_bases): Likewise.
2708 (splay_tree_compare_integer_csts): New function.
2709 (layout_class_type): Use a splay_tree, rather than a varray, to
2710 represent the offsets of empty bases.
2712 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
2713 * decl.c (select_decl): Don't return declarations that are
2716 2000-10-18 Mark Mitchell <mark@codesourcery.com>
2718 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
2719 (fake_std_node): New macro.
2720 * decl.c (in_std): Rename to ...
2721 (in_fake_std): ... this.
2722 (flag_no_builtin): Remove.
2723 (flag_no_nonansi_builtin): Likewise.
2724 (walk_namespaces_r): Use fake_std_node.
2725 (push_namespace): Use std_identifier.
2726 (pop_namespace): Use in_fake_std.
2727 (lookup_name_real): Use fake_std_node.
2728 (init_decl_processing): When -fhonor-std, create the `std'
2729 namespace. Don't create a dummy fake_std_node in that case.
2730 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
2731 (builtin_function): Put builtins whose names don't begin
2732 with `_' in the std namespace.
2733 * decl2.c (flag_no_builtin): Remove.
2734 (flag_no_nonansi_builtin): Likewise.
2735 (set_decl_namespace): Use fake_std_node.
2736 (validate_nonmember_using_decl): Likewise.
2737 (do_using_directive): Likewise.
2738 (handle_class_head): Likewise.
2739 * dump.c (dequeue_and_dump): Likewise.
2740 * except.c (init_exception_processing): Use std_identifier.
2741 * init.c (build_member_call): Use fake_std_node.
2742 * rtti.c (init_rtti_processing): Use std_identifier.
2744 2000-10-17 Mark Mitchell <mark@codesourcery.com>
2746 * cp-tree.h (back_end_hook): Remove declaration.
2747 * decl2.c (back_end_hook): Remove definition.
2749 * dump.c (dequeue_and_dump): Dump TREE_USED.
2751 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
2753 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
2755 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
2757 * decl.c (WINT_TYPE): Define.
2758 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
2759 c_size_type_node, signed_size_type_node and wint_type_node.
2761 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
2763 * decl2.c (warn_missing_format_attribute): New variable.
2764 (lang_decode_option): Decode -Wmissing-format-attribute.
2766 2000-10-16 Mark Mitchell <mark@codesourcery.com>
2768 * typeck.c (qualify_type): Remove.
2769 (composite_pointer_type): Fix handling of conversions to `cv void*'.
2771 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2773 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
2775 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2777 * Makefile.in (parse.c, parse.h): Create atomically.
2779 2000-10-12 Mark Mitchell <mark@codesourcery.com>
2781 * class.c (current_obstack): Remove.
2782 * decl.c (ggc_p): Remove.
2783 (start_decl): Don't use decl_tree_cons.
2784 (grokdeclarator): Don't use build_decl_list.
2785 (start_function): Don't use decl_tree_cons.
2786 (finish_function): Don't mess with obstacks.
2787 * decl2.c (grok_x_components): Don't use build_decl_list.
2788 * lex.c (make_call_declarator): Don't call decl_tree_cons.
2789 (implicitly_declare_fn): Don't call build_decl_list.
2790 * parse.y (frob_specs): Don't call build_decl_list or
2792 (expr_or_declarator_intern): Don't call decl_tree_cons.
2793 (primary): Don't call build_decl_list.
2794 (fcast_or_absdcl): Likewise.
2795 (typed_declspecs): Don't call decl_tree_cons.
2796 (reserved_declspecs): Don't call build_decl_list.
2797 (declmods): Likewise.
2798 (reserved_typespecquals): Likewise.
2800 (new_type_id): Likewise.
2801 (cv_qualifiers): Likewise.
2802 (after_type_declarator_intern): Likewise.
2803 (notype_declarator_intern): Likewise.
2804 (absdcl_intern): Likewise.
2805 (named_parm): Likewise.
2806 * pt.c (most_specialized_class): Likewise.
2807 * repo.c (temporary_obstack): Make it a structure, not a pointer.
2808 (init_repo): Initialize it.
2809 * search.c (current_obstack): Remove.
2810 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
2812 2000-10-09 Richard Henderson <rth@cygnus.com>
2814 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
2815 (c++ language support bits for libgcc): Remove.
2816 (c++.clean): Remove cplib2.txt cleanup.
2817 * config-lang.in (headers, lib2funcs): Remove.
2819 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
2820 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
2821 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
2822 * inc/new.h, inc/typeinfo: Remove files.
2824 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
2826 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
2828 (init_decl_processing): Initialize intmax_type_node and
2831 2000-10-06 Richard Henderson <rth@cygnus.com>
2833 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
2834 (original_result_rtx): Remove.
2835 * decl.c (save_function_data): Don't clear x_result_rtx.
2836 (mark_lang_function): Don't mark it either.
2837 * expr.c (fixup_result_decl): Remove.
2838 * semantics.c (genrtl_named_return_value): Frob the return decl
2839 before calling emit_local_var.
2840 (genrtl_finish_function): Don't call fixup_result_decl.
2841 Always emit the jump to return_label.
2843 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
2845 * pt.c (lookup_template_class): Set current access for enum.
2846 (tsubst_enum): Set file & line for enum decl.
2848 * spew.c (yylex): Remove unused variable.
2850 2000-10-05 Richard Henderson <rth@cygnus.com>
2852 * semantics.c (genrtl_finish_function): Don't init or check
2853 can_reach_end; remove noreturn and return value checks.
2855 2000-10-05 Tom Tromey <tromey@cygnus.com>
2857 * init.c (build_java_class_ref): Use `build_static_name' with a
2858 suffix, not a prefix, to build the class object's name.
2860 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2862 * cp-tree.h (access_kind): Fix comment typo.
2863 * decl2.c (grokfield): Fix diagnostic typo.
2864 * semantics.c (finish_template_type): Fix comment typo.
2865 (finish_qualified_object_call_expr): Likewise.
2867 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2869 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
2872 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2874 * spew.c (frob_id): New static function.
2875 (frob_opname): Use it.
2878 2000-10-01 Mark Mitchell <mark@codesourcery.com>
2880 * decl.c (lang_mark_false_label_stack): Remove.
2881 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
2883 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
2885 * gxxint.texi: Use @email for formatting email addresses.
2887 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
2889 * error.c: Remove direct obstack manipulation. Replace with
2890 output_buffer-based formatting. Adjust calls to removed macros.
2891 (obstack_chunk_alloc, obstack_chunk_free): Remove.
2892 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
2893 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
2895 2000-09-24 Mark Mitchell <mark@codesourcery.com>
2897 * ir.texi: Move to ../c-tree.texi.
2899 2000-09-20 Jason Merrill <jason@redhat.com>
2901 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
2903 2000-09-21 Andreas Jaeger <aj@suse.de>
2905 * errfn.c: Move declaration of cp_printer and cp_printers to ...
2906 * cp-tree.h: ... here.
2908 * error.c: Remove declaration of cp_printer.
2910 2000-09-20 Mark Mitchell <mark@codesourcery.com>
2912 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
2914 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
2916 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
2919 2000-09-18 Mark Mitchell <mark@codesourcery.com>
2921 * decl.c (start_function): Robustify.
2923 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2925 * cp-tree.h (check_function_format): Accept a `status' parameter.
2927 * call.c, typeck.c: Updates calls to `check_function_format'.
2929 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
2931 * decl2.c (handle_class_head): Always push some scope even
2934 2000-09-16 Mark Mitchell <mark@codesourcery.com>
2936 * cp-tree.h (struct cp_language_function): Remove
2937 x_scope_stmt_stack and name_declared.
2938 (current_scope_stmt_stack): Remove.
2939 (function_name_declared_p): New macro.
2940 (struct lang_decl_flags): Use c_lang_decl as a base class.
2942 (struct lang_decl): Replace saved_tree with context.
2943 (DECL_FRIEND_CONTEXT): Adjust accordingly.
2944 (SET_DECL_FRIEND_CONTEXT): Likewise.
2945 (DECL_VIRTUAL_CONTEXT): Likewise.
2946 (DECL_SAVED_TREE): Remove.
2947 (C_DECLARED_LABEL_FLAG): Likewise.
2948 (cplus_expand_expr_stmt): Don't declare.
2949 (add_decl_stmt): Likewise.
2950 (add_scope_stmt): Likewise.
2951 * decl.c (mark_stmt_tree): Remove.
2952 (case_compare): Likewise.
2953 (finish_case_label): Use c_add_case_label.
2954 (init_decl_processing): Set more language-specific hooks.
2955 (build_enumerator): Fix typo in comment.
2956 (cplus_expand_expr_stmt): Remove.
2957 (mark_lang_function): Use mark_c_language_function.
2958 (lang_mark_tree): Use c_mark_lang_decl.
2959 * decl2.c: Change order of inclusion.
2960 * except.c: Likewise.
2961 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
2962 back on c_expand_expr.
2963 * friend.c: Include expr.h.
2964 * init.c: Change order of inclusion.
2965 * Makefile.in: Update dependencies.
2966 * lex.h (free_lang_decl_chain): Remove.
2967 * optimize.c (maybe_clone_body): Use function_name_declared_p.
2968 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
2970 (instantiate_decl): Use function_name_declared_p.
2971 * semantics.c (lang_expand_expr_stmt): Remove.
2972 (set_current_function_name_declared): Likewise.
2973 (current_function_name_declared): Likewise.
2974 (begin_compound_stmt): Use function_name_declared_p.
2975 (add_decl_stmt): Remove.
2976 (setup_vtbl_ptr): Use function_name_declared_p.
2977 (add_scope_stmt): Remove.
2978 (current_scope_stmt_stack): New function.
2979 (cp_expand_stmt): Don't handle SCOPE_STMTs.
2980 (expand_body): Use function_name_declared_p.
2981 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
2982 * typeck.c: Change order of includes.
2983 (convert_sequence): Remove.
2985 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
2987 * lex.c (reswords): Add _Complex.
2989 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2991 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
2993 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
2995 * init.c (begin_init_stmts): Don't use // comments.
2997 2000-09-12 Jason Merrill <jason@redhat.com>
2999 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
3000 all non-extern arrays.
3002 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
3003 typenames, too. Downgrade complaint to pedwarn.
3004 (xref_tag): Warn about surprising behavior of 'friend struct T'.
3005 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
3006 'class This::Inherited'.
3008 2000-09-12 Mark Mitchell <mark@codesourcery.com>
3010 * decl.c (finish_case_label): Given the LABEL_DECL a
3013 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
3015 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
3016 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
3017 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3018 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3019 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
3021 (sorry_for_unsupported_tree, print_scope_operator,
3022 print_left_paren, print_right_paren, print_left_bracket,
3023 print_right_bracket, print_whitespace): Likewise.
3024 (aggr_variety): Rename to class_key_or_enum.
3025 (print_type): Rename to print_type_id.
3026 (print_type_specifier_seq, print_simple_type_specifier,
3027 print_elaborated_type_specifier,
3028 print_rest_of_abstract_declarator,
3029 print_parameter_declaration_clause, print_exception_specification,
3030 print_nested_name_specifier, print_template_id,
3031 typedef_original_name, print_template_argument_list_start,
3032 print_template_argument_list_end): New functions.
3034 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
3036 * ir.texi: Add more documentation.
3038 2000-09-11 Mark Mitchell <mark@codesourcery.com>
3040 * cp-tree.h (struct saved_scope): Remove x_function_parms.
3041 (current_function_parms): Don't define.
3042 (struct cp_language_function): Remove parms_stored.
3043 (current_function_just_assigned_this): Don't define.
3044 (current_function_parms_stored): Likewise.
3045 (static_ctors): Declare.
3046 (static_dtors): Likewise.
3047 (SF_EXPAND): Don't define.
3048 (expand_start_early_try_stmts): Remove declaration.
3049 (store_parm_decls): Likewise.
3050 * decl.c (static_ctors): Don't declare.
3051 (static_dtors): Likewise.
3052 (struct binding_level): Remove this_block.
3053 (poplevel): Remove dead code.
3054 (set_block): Likewise.
3055 (mark_binding_level): Don't mark this_block.
3056 (mark_saved_scope): Don't mark x_function_parms.
3057 (init_decl_processing): Don't add current_function_parms as a GC
3059 (check_function_type): Change prototype.
3060 (start_function): Remove RTL-generation code.
3061 (expand_start_early_try_stmts): Remove.
3062 (store_parm_decls): Give it internal linkage. Remove
3063 RTL-generation code.
3064 (finish_function): Remove RTL-generation code.
3065 * decl2.c (static_ctors): Fix formatting.
3066 (static_dtors): Likewise.
3067 * method.c (use_thunk): Don't call store_parm_decls.
3068 (synthesize_method): Likewise.
3069 * optimize.c (maybe_clone_body): Likewise.
3070 * parse.y (fn.def2): Likewise.
3071 (.set_base_init): Likewise.
3072 (nodecls): Likewise.
3073 * pt.c (instantiate_decl): Likewise.
3074 * rtti.c (synthesize_tinfo_fn): Likewise.
3075 * semantics.c (genrtl_try_block): Simplify.
3076 (expand_body): Use genrtl_start_function and
3077 genrtl_finish_function.
3078 (genrtl_start_function): New function.
3079 (genrtl_finish_function): Likewise.
3081 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
3083 * error.c (cp_tree_printer, case 'P'): Append break.
3085 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
3087 * cp-tree.h (frob_opname): Declare.
3088 * parse.y (saved_scopes): New static variable.
3089 (cp_parse_init): Adjust.
3090 (do_id): If lastiddecl is NULL, do do_identifier.
3091 (operator): Save scope information.
3092 (unoperator): New reduction. Restore scope information.
3093 (operator_name): Append unoperator. Call frob_opname.
3094 * spew.c (frob_opname): Define.
3096 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
3098 * decl.c, rtti.c: Include defaults.h if not already included.
3099 Don't define the *_TYPE_SIZE macros.
3101 2000-09-09 Mark Mitchell <mark@codesourcery.com>
3103 * cp-tree.h (push_switch): Change prototype.
3104 (check_cp_case_value): Remove declaration.
3105 (decl_constant_value): Likewise.
3106 * decl.c (struct cp_switch): Add switch_stmt and cases.
3107 (case_compare): New function.
3108 (push_switch): Set switch_stmt. Initialize cases.
3109 (pop_switch): Clean up cases.
3110 (define_case_label): Rename to ...
3111 (finish_case_label): ... this. Do semantic analysis for case
3113 (start_function): Correct comment.
3114 * decl2.c (check_cp_case_value): Remove.
3115 * expr.c (do_case): Remove.
3116 * pt.c (tsubst_expr): Adjust call to finish_case_label.
3117 * semantics.c (genrtl_do_poplevel): Remove declaration.
3118 (RECHAIN_STMTS): Remove.
3119 (finish_break_stmt): Use build_break_stmt.
3120 (finish_continue_stmt): Use build_continue_stmt.
3121 (finish_switch_cond): Adjust condition here, rater than in
3122 c_expand_start_case.
3123 (finish_case_label): Remove.
3124 * typeck.c (c_expand_return): Remove.
3125 (c_expand_start_case): Likewise.
3127 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
3129 * ir.texi: Document type nodes.
3131 2000-09-06 Mark Mitchell <mark@codesourcery.com>
3133 * cp-tree.h (init_cp_semantics): Declare.
3134 (genrtl_try_block): Don't declare.
3135 (genrtl_handler): Likewise.
3136 (genrtl_catch_block): Likewise.
3137 (genrtl_ctor_stmt): Likewise.
3138 (genrtl_subobject): Likewise.
3139 (genrtl_do_poplevel): Likewise.
3140 (genrtl_named_return_value): Likewise.
3141 * lex.c (init_parse): Call init_cp_semantics.
3142 * semantics.c (genrtl_try_block): Give it internal linkage.
3143 (genrtl_handler): Likewise.
3144 (genrtl_catch_block): Likewise.
3145 (genrtl_ctor_stmt): Likewise.
3146 (genrtl_subobject): Likewise.
3147 (genrtl_do_poplevel): Likewise.
3148 (genrtl_named_return_value): Likewise.
3149 (lang_expand_stmt): Rename to ...
3150 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
3151 (init_cp_semantics): Define.
3153 * decl.c (initialize_local_var): Remove RTL-generating code.
3154 * semantics.c (genrtl_try_block): Fix formatting.
3156 Move statement-tree facilities from C++ to C front-end.
3157 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
3158 (void_zero_node): Remove.
3159 (stmt_tree): Likewise.
3160 (scope_chain): Adjust.
3161 (language_function): Rename to cp_language_function.
3162 (cp_function_chain): Adjust.
3163 (current_stmt_tree): Remove.
3164 (last_tree): Likewise.
3165 (last_expr_type): Likewise.
3166 (struct lang_decl): Adjust.
3167 (STMT_IS_FULL_EXPR_P): Remove.
3169 (begin_stmt_tree): Likewise.
3170 (finish_stmt_tree): Likewise.
3171 (walk_tree_fn): Likewise.
3172 (walk_stmt_tree): Likewise.
3173 * class.c (finish_struct): Replace use of add_tree with add_stmt.
3174 * decl.c (mark_stmt_tree): Adjust type.
3175 (init_decl_processing): Don't build void_zero_node.
3176 (initialize_local_var): Adjust usage of current_stmt_tree.
3177 (finish_enum): Use add_stmt, not add_tree.
3178 (save_function_data): Adjust use of language_function.
3179 (finish_constructor_body): Use add_stmt, not add_tree.
3180 (finish_destructor_body): Likewise.
3181 (push_cp_function_context): Adjust use of language_function.
3182 (pop_cp_function_context): Likewise.
3183 (mark_lang_function): Likewise.
3184 (mark_cp_function_context): Likewise.
3185 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
3186 (build_vec_init): Likewise.
3187 * semantics.c (SET_LAST_STMT): Remove.
3188 (RECHAIN_STMTS): Don't use it.
3189 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
3190 (current_stmt_tree): Define.
3192 (finish_goto_stmt): Use add_stmt, not add_tree.
3193 (finish_expr_stmt): Likewise.
3194 (begin_if_stmt): Likewise.
3195 (finish_then_clause): Likewise.
3196 (begin_while_stmt): Likewise.
3197 (begin_do_stmt): Likewise.
3198 (finish_return_stmt): Likewise.
3199 (begin_for_stmt): Likewise.
3200 (finish_break_stmt): Likewise.
3201 (finish_continue_stmt): Likewise.
3202 (begin_switch_stmt): Likewise.
3203 (finish_case_label): Likewise.
3204 (begin_try_block): Likewise.
3205 (begin_function_try_block): Likewise.
3206 (begin_handler): Likewise.
3207 (begin_catch_block): Likewise.
3208 (begin_compound_stmt): Likewise.
3209 (begin_asm_stmt): Likewise.
3210 (finish_asm_stmt): Likewise.
3211 (finish_label_stmt): Likewise.
3212 (add_decl_stmt): Likewise.
3213 (finish_subobject): Likewise.
3214 (finish_decl_cleanup): Likewise.
3215 (finish_named_return_value): Likewise.
3216 (setup_vtbl_ptr): Likewise.
3217 (add_scope_stmt): Likewise.
3218 (finish_stmt_expr): Likewise.
3219 (prune_unused_decls): Remove.
3220 (begin_stmt_tree): Likewise.
3221 (finish_stmt_tree): Likewise.
3222 (prep_stmt): Adjust use of current_stmt_tree.
3223 (lang_expand_stmt): Likewise.
3224 * tree.c (statement_code_p): Remove.
3225 (cp_statement_code_p): New function.
3226 (walk_stmt_tree): Remove.
3227 (init_tree): Set lang_statement_code_p.
3229 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
3231 Integrated preprocessor.
3233 * Make-lang.in, Makefile.in: Remove all references to input.c,
3234 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
3235 * gxx.gperf, hash.h, input.c: Delete.
3236 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
3237 initialized properly.
3239 * class.c (fixup_pending_inline): Take a tree, not a
3240 struct pending_inline *. All callers changed.
3241 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
3242 RID_PROTECTED entries in ridpointers[] array here.
3243 * decl.c (duplicate_decls): Do not refer to struct
3245 (record_builtin_type, init_decl_processing): Use RID_MAX not
3247 (grokdeclarator): Use C_IS_RESERVED_WORD.
3248 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
3250 (grok_x_components): Do not inspect pending_inlines chain.
3252 * cp-tree.h (struct lang_identifier): Add rid_code entry.
3253 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
3254 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
3255 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
3256 TIME_IDENTIFIER_FILEINFO): Kill.
3258 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
3260 * parse.y: Call do_pending_inlines unconditionally.
3261 reinit_parse_for_method is now snarf_method. fn.defpen is no
3262 longer necessary. Remove unnecessary <itype> annotation on
3263 SCOPE. Do not refer to end_of_file or struct pending_inline.
3264 * semantics.c (begin_inline_definitions): Call
3265 do_pending_inlines unconditionally.
3267 * lex.c: Remove all code now shared with C front end.
3268 Initialize cpplib properly if USE_CPPLIB. Put reserved words
3269 into the get_identifier table. Rewrite pragma handling to
3270 work with the registry. Move code to save tokens for later
3271 processing to spew.c.
3273 * spew.c: Rewrite everything in terms of token streams instead
3274 of text. Move routines here from lex.c / input.c as
3275 appropriate. GC-mark trees hanging off the pending inlines
3278 2000-09-06 Mark Mitchell <mark@codesourcery.com>
3280 * NEWS: Mention that the named return value extension has been
3282 * cp-tree.h (original_result_rtx): Define.
3283 (TREE_REFERENCE_EXPR): Remove.
3284 (DECL_VPARENT): Likewise.
3285 (pushdecl_nonclass_level): Likewise.
3286 (store_return_init): Likewise.
3287 (reinit_lang_specific): Likewise.
3288 (genrtl_named_return_value): Change prototype.
3289 * decl.c (original_result_rtx): Remove.
3290 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
3291 Do not generate RTL for local variables here.
3292 (store_return_init): Remove.
3293 * semantics.c (genrtl_named_return_value): Simplify. Fold in
3295 (finish_named_return_value): Adjust accordingly. Warn that this
3296 extension is deprecated.
3297 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
3299 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3301 * pt.c (type_unification_real): Replace switch with if.
3302 (unify): Tsubst non-type parms before comparing.
3304 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3306 * error.c (dump_typename): New function, broken out of ...
3307 (dump_type): ... here. Use it.
3308 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
3310 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3312 * init.c (build_offset_ref): Deal with namespace scoped
3315 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3317 * class.c (resolve_address_of_overloaded_function): Add
3318 explanation message.
3319 * decl.c (define_case_label): Reformat explanation.
3320 * decl2.c (finish_static_data_member_decl): Likewise.
3321 (grokfield): Likewise.
3322 * friend.c (do_friend): Likewise.
3324 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
3326 * tree.c (walk_tree): Expose tail recursion.
3327 (walk_stmt_tree): New function.
3328 * cp-tree.h: Prototype walk_stmt_tree.
3329 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
3330 the BLOCKs directly. If a BLOCK has no variables after
3331 pruning, discard it.
3332 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
3333 restore the line number.
3335 2000-09-05 Mark Mitchell <mark@codesourcery.com>
3337 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
3338 (pt.o): Remove dependency on HTAB_H.
3339 * cp-tree.h: Include hashtab.h.
3340 (walk_tree): Change prototype.
3341 (walk_tree_without_duplicates): New function.
3342 * decl.c (check_default_argument): Use it.
3343 * optimize.c (remap_decl): Adjust calls to walk_tree.
3344 (copy_body): Likewise.
3345 (expand_calls_inline): Likewise.
3346 (calls_setjmp_p): Use walk_tree_without_duplicates.
3347 * pt.c: Don't include hashtab.h.
3348 (for_each_template_parm): Use walk_tree_without_duplicates.
3349 * semantics.c (finish-stmt_tree): Likewise.
3350 (expand_body): Likewise.
3351 * tree.c (walk_tree): Add additional parameter.
3352 (walk_tree_without_duplicates): New function.
3353 (count_trees): Use it.
3354 (verify_stmt_tree): Adjust call to walk_tree.
3355 (find_tree): Use walk_tree_without_duplicates.
3356 (no_linkage_check): Likewise.
3357 (break_out_target_exprs): Adjust call to walk_tree.
3358 (cp_unsave): Likewise.
3360 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3362 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
3363 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
3364 * cp-tree.h (TYPE_BINFO): Adjust comment.
3365 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
3366 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
3367 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
3368 (TYPE_TEMPLATE_INFO): Likewise.
3369 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
3370 * class.c (push_nested_class): Likewise.
3371 * decl.c (lookup_name_real): Likewise.
3372 (grokdeclarator): Likewise.
3373 (grok_op_properties): Likewise.
3374 (xref_tag): Likewise.
3375 (xref_basetypes): Likewise.
3376 * decl2.c (constructor_name_full): Likewise.
3377 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
3378 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
3379 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
3380 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3381 (dump_type_suffix): Likewise.
3382 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
3384 (get_aggr_from_typedef): Likewise.
3385 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
3386 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3387 (write_template_parm): Likewise.
3388 (write_template_template_parm): Check tree code instead of
3389 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3390 * method.c (build_overload_nested_name): Add
3391 BOUND_TEMPLATE_TEMPLATE_PARM.
3392 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
3393 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3394 * pt.c (convert_template_argument): Check tree code instead of
3395 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3396 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
3397 (for_each_template_parm): Adjust comment.
3398 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
3399 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3400 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
3401 template_args_equal to compare template template parameter cases.
3402 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3403 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
3405 * tree.c (copy_template_template_parm): Decide whether to create
3406 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
3407 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3408 (copy_tree_r): Likewise.
3409 * typeck.c (comptypes): Likewise. Check tree code instead of
3410 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3412 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
3414 * decl.c (finish_function): Move the code for handling functions
3415 marked with the constructor and destructor attributes inside the
3418 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
3420 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
3422 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
3424 * pt.c (lookup_template_class): Remove abort.
3425 * tree.c (get_type_decl): Allow error_mark_node.
3427 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
3429 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
3432 2000-09-03 Mark Mitchell <mark@codesourcery.com>
3434 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
3437 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
3439 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
3440 union tag mismatch error reporting.
3442 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
3444 * call.c (build_scoped_method_call): Check it is not a namespace.
3446 2000-08-30 Jason Merrill <jason@redhat.com>
3448 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
3450 * tree.c (bot_manip): Check TREE_CONSTANT rather than
3451 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
3452 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
3454 * decl.c (start_function): Always call make_function_rtl.
3456 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
3458 * semantics.c (prune_unused_decls): New function.
3459 (finish_stmt_tree): Call it via walk_tree.
3461 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
3463 * class.c (build_secondary_vtable): Constify a char *.
3464 * decl.c (init_decl_processing): Initialize function_id_node,
3465 pretty_function_id_node, and func_id_node.
3466 * input.c (struct input_source): Constify 'str'.
3467 (feed_input): Constify first argument.
3468 * mangle.c (write_identifier): Constify argument.
3469 * pt.c (mangle_class_name_for_template): Constify argument.
3471 2000-08-29 Mark Mitchell <mark@codesourcery.com>
3473 * typeck.c (mark_addressable): Remove code that pokes around in
3476 2000-08-28 Jason Merrill <jason@redhat.com>
3478 * lex.c (file_name_nondirectory): Move to toplev.c.
3480 * cp-tree.h (LOCAL_CLASS_P): New macro.
3481 * class.c (finish_struct_1): Use it.
3483 2000-08-27 Alex Samuel <samuel@codesourcery.com>
3485 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
3486 (write_encoding): Pass another argument to write_name.
3487 (write_name): Add ignore_local_scope parameter. Fix handling of
3489 (write_nested_name): Use write_unqualified_name.
3490 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
3491 (write_template_prefix): Use write_unqualified_name.
3492 (write_component): Remove.
3493 (write_local_name): Add parameter. Use direct local entity to
3494 discriminator calculation.
3495 (write_class_enum_type): Pass another argument to write_name.
3496 (write_template_template_arg): Likewise.
3497 (make_guard_variable): Likewise.
3499 2000-08-27 Jason Merrill <jason@redhat.com>
3501 * decl.c (pushdecl): Matching decls for local externs are found in
3502 the current level. Propagate linkage information from previous
3505 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
3507 * ir.texi (Expressions): Fix typo.
3509 2000-08-25 Greg McGary <greg@mcgary.org>
3511 * tree.c (init_tree): Use ARRAY_SIZE.
3513 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
3515 * error.c (cp_tree_printer): Rework.
3517 2000-08-25 Mark Mitchell <mark@codesourcery.com>
3519 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
3521 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
3522 (cp-demangle.o): Remove target.
3523 (dyn-string.o): Likewise.
3525 * decl.c (grokfndecl): Require that `main' return an `int'.
3526 * mangle.c (write_encoding): Don't mangle return types for
3527 conversion functions.
3529 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
3531 * error.c (tree_formatting_info): New data type.
3532 (tree_being_formatted): New macro.
3533 (tree_formatting_flags): Likewise.
3534 (put_whitespace): Likewise.
3535 (print_tree_identifier): Likewise.
3536 (print_identifier): Likewise.
3537 (cp_tree_printer, print_function_argument_list, print_declaration,
3538 print_expression, print_function_declaration,
3539 print_function_parameter, print_type, print_cv_qualifier): New
3541 (init_error): Initialize lang_printer.
3543 2000-08-24 Jason Merrill <jason@redhat.com>
3545 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
3546 adjustment necessary.
3548 2000-08-24 Greg McGary <greg@mcgary.org>
3550 * cp-tree.h (MAIN_NAME_P): Remove macro.
3552 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
3554 * error.c (print_instantiation_context): Don't forget to flush the
3557 2000-08-23 Jason Merrill <jason@redhat.com>
3559 * typeck.c (build_ptrmemfunc): Save the input pmf.
3561 * method.c (process_modifiers): Use same_type_p.
3563 2000-08-23 Mark Mitchell <mark@codesourcery.com>
3565 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
3566 * mangle.c (write_function_type): Change prototype.
3567 (write_encoding): Don't mangle return types for
3568 constructors or destructors.
3569 (write_type): Adjust call to write_function_type.
3570 * pt.c (instantiate_template): Instantiate alternate entry points
3571 when instantiating the main function.
3573 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
3575 * error.c (cp_print_error_function): Don't use embedded '\n' in
3578 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
3580 * decl.c (init_decl_processing): Remove bogus initialization.
3581 * error.c (lang_print_error_function): Restore here.
3582 (init_error): Initialize print_error_function.
3584 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3586 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
3588 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
3590 * Makefile.in (error.o): Depends on diagnostic.h
3592 * cp-tree.h (problematic_instantiation_changed,
3593 record_last_problematic_instantiation, current_instantiation,
3594 print_instantiation_context): Declare.
3595 (maybe_print_template_context): Remove.
3597 * decl.c (init_decl_processing): Set print_error_function to NULL.
3598 (lang_print_error_function): Remove, since we're using a new
3601 * error.c: #include diagnostic.h
3602 (function_category): New function.
3603 (cp_diagnostic_starter): Likewise.
3604 (cp_diagnostic_finalizer): Likewise.
3605 (cp_print_error_function): Likewise.
3606 (maybe_print_instantiation_context): Likewise.
3607 (print_instantiation_full_context): Likewise.
3608 (print_instantiation_partial_context): Likewise.
3609 (print_instantiation_context): Define.
3610 (init_error): Initialize diagnostic pager and finalizer.
3612 * pt.c (problematic_instantiation_changed): Define.
3613 (record_last_problematic_instantiation): Likewise.
3614 (current_instantiation): Likewise.
3615 (maybe_print_template_context): Remove.
3616 (print_template_context): Likewise.
3617 (current_tinst_level): Make static to reflect Brendan Kehoe's
3618 change of 1995-04-13.
3619 (push_tinst_level): Call print_instantiation_context.
3621 2000-08-21 Nix <nix@esperi.demon.co.uk>
3623 * lang-specs.h: Do not process -o or run the assembler if
3626 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
3628 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
3630 * decl2.c (lang_decode_option): Disable gettext attributes for
3633 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
3635 * lex.c (lang_init_options): Default diagnostic message maximum
3636 length to 80, when line-wrapping.
3638 2000-08-20 Mark Mitchell <mark@codesourcery.com>
3640 * class.c (build_vtbl_initializer): Clear the entire
3641 vtbl_init_data. Start keeping track of the functions for which we
3642 have created vcall offsets here.
3643 (dfs_build_vcall_offset_vtbl_entries): Remove.
3644 (build_vcall_offset_vtbl_entries): Reimplement.
3645 (add_vcall_offset_vtbl_entries_r): New function.
3646 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
3647 computing when vcall offsets are necessary.
3649 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3651 * decl.c (member_function_or_else): Use cp_error ... %T.
3652 (grokdeclarator): Likewise.
3653 (start_method): Likewise.
3654 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
3656 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3658 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
3661 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3663 * cp-tree.h (PTRMEM_OK_P): New macro.
3664 (itf_ptrmem_ok): New enumeration value.
3665 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
3666 argument. Diagnose implicit pointer to member.
3667 (instantiate_type): Don't diagnose implicit pointer to member
3668 here. Pass itf_ptrmem_ok if ok. Adjust calls to
3669 resolve_address_of_overloaded_function.
3670 * init.c (build_offset_ref): Set PTRMEM_OK_P.
3671 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
3672 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
3673 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
3674 (build_unary_op): Deal with single non-static member in
3677 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3679 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
3681 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3683 * cp-tree.h (enum_name_string): Remove prototype.
3684 (report_case_error): Remove prototype.
3685 * cp/typeck2.c (enum_name_string): Remove.
3686 (report_case_error): Remove.
3687 * error.c (dump_expr): Deal with enum values directly.
3688 Correctly negate integer constant.
3690 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3692 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
3693 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
3694 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
3695 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
3696 (__cxa_vec_new): Use __cxa_vec_new2.
3697 (__cxa_vec_delete): Use __cxa_vec_delete2.
3699 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3701 * vec.cc (__cxa_vec_new): Set "C" linkage.
3702 (__cxa_vec_ctor): Likewise.
3703 (__cxa_vec_cctor): Likewise.
3704 (__cxa_vec_dtor): Likewise.
3705 (__cxa_vec_delete): Likewise.
3706 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
3707 (__cxa_vec_ctor): Likewise.
3708 (__cxa_vec_cctor): Likewise.
3709 (__cxa_vec_dtor): Likewise.
3710 (__cxa_vec_delete): Likewise.
3712 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3714 * class.c (instantiate_type): Reinstate local variable
3715 deleted in previous change.
3717 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
3720 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3722 * cp-tree.h (instantiate_type_flags): New enumeration.
3723 (instantiate_type): Change parameter.
3724 * class.c (instantiate_type): Adjust prototype. Adjust.
3725 * call.c (standard_conversion): Adjust instantiate_type call.
3726 (reference_binding): Likewise.
3727 (build_op_delete_call): Likewise.
3728 (convert_like_real): Likewise.
3729 * cvt.c (cp_convert_to_pointer): Likewise.
3730 (convert_to_reference): Likewise.
3731 * pt.c (convert_nontype_argument): Likewise.
3732 * typeck.c (build_binary_op): Likewise.
3733 (build_ptrmemfunc): Likewise.
3734 (convert_for_assignment): Likewise.
3736 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3738 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
3739 (current_aggr): Define.
3740 * decl.c (grokdeclarator): Make sure a friend class is an
3741 elaborated type specifier.
3742 * parse.y (current_aggr): Remove static definition.
3743 (cp_parse_init): Adjust.
3744 (structsp): Clear and restore current_aggr.
3745 (component_decl_list): Clear current_aggr.
3747 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
3748 aggregate tag on the typename's context.
3750 * pt.c (tsubst_friend_class): Return error_mark_node, if
3752 (instantiate_class_template): Ignore error_mark_node friend types.
3754 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
3756 * cvt.c (warn_ref_binding): New static function, broken out of ...
3757 (convert_to_reference): ... here. Use it.
3759 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3761 * parse.y (template_arg): Add rule for template qualified with
3764 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3766 * decl2.c (add_function): Reorganize.
3767 (arg_assoc): Do not consider function template decls.
3769 2000-08-11 Jason Merrill <jason@redhat.com>
3771 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
3774 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3776 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
3777 (lookup_nested_tag): Likewise.
3779 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
3782 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3784 * parse.y (named_complex_class_head_sans_basetype): Remove
3787 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3789 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
3790 explicit TEMPLATE_ID_EXPR args.
3791 (build_expr_from_tree, case CALL_EXPR): Likewise.
3793 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3795 * decl.c (check_tag_decl): Diagnose typename's which don't
3798 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
3800 * init.c (build_aggr_init): Reject bogus array initializers
3803 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
3805 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
3807 * cp/tinfo.cc (__dynamic_cast): Likewise.
3808 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
3810 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
3812 * cvt.c (convert_to_pointer_force): Fix error message when
3813 attempting to cast from ambiguous base.
3815 2000-08-08 Jason Merrill <jason@redhat.com>
3817 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
3818 (tsubst_template_arg_vector): Likewise.
3820 * decl2.c (build_anon_union_vars): Choose the largest field; don't
3821 assume that one will be as large as the union.
3823 2000-08-07 Kazu Hirata <kazu@hxi.com>
3825 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
3826 * decl.c (pop_labels): Likewise.
3828 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
3830 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
3832 (__pointer_to_member_type_info): Likewise.
3833 (__base_class_info): Likewise.
3834 (__class_type_info): Likewise.
3835 (__si_class_type_info): Likewise.
3836 (__vmi_class_type_info): Likewise.
3837 * tinfo.cc (__si_class_type_info::__do_find_public_src):
3838 Changed member names to match specifications.
3839 (__vmi_class_type_info::__do_find_public_src): Likewise.
3840 (__si_class_type_info::__do_dyncast): Likewise.
3841 (__vmi_class_type_info::__do_dyncast): Likewise.
3842 (__si_class_type_info::__do_upcast): Likewise.
3843 (__vmi_class_type_info::__do_upcast): Likewise.
3844 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
3845 (__pbase_type_info::__pointer_catch): Likewise.
3846 (__pointer_type_info::__pointer_catch): Likewise.
3847 (__pointer_to_member_type_info::__pointer_catch): Likewise.
3849 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
3851 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
3852 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
3853 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
3855 2000-08-04 Mark Mitchell <mark@codesourcery.com>
3857 * cp-tree.h (add_method): Change prototype.
3858 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
3859 Don't double the size of the method vector in the error case.
3860 (handle_using_decl): Adjust call to add_method.
3861 (add_implicitly_declared_members): Likewise.
3862 (clone_function_decl): Likewise.
3863 * decl2.c (check_classfn): Likewise.
3864 * semantics.c (finish_member_declaration): Likewise.
3866 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
3868 * decl.c (flag_isoc94): New variable.
3870 2000-08-02 Jason Merrill <jason@redhat.com>
3872 * pt.c (do_type_instantiation): Add complain parm; don't complain
3873 if called recursively.
3874 * cp-tree.h, parse.y: Adjust.
3876 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
3878 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
3879 -Wno-strict-prototypes.
3881 * g++spec.c: Adjust type of second argument to
3882 lang_specific_driver, and update code as necessary.
3884 * cp-tree.h: Don't prototype min_precision here.
3885 (my_friendly_assert): Cast expression to void.
3886 * semantics.c (do_poplevel): Initialize scope_stmts.
3888 2000-08-02 Mark Mitchell <mark@codesourcery.com>
3890 * cp-tree.h (DECL_NEEDED_P): Tweak.
3892 2000-07-28 Jason Merrill <jason@redhat.com>
3894 * lang-specs.h: Use %i in rule for .ii files.
3896 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
3898 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
3900 2000-07-30 Mark Mitchell <mark@codesourcery.com>
3902 Allow indirect primary bases.
3903 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
3905 (CLASSTYPE_VFIELD_PARENT): Remove.
3906 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
3907 (BINFO_PRIMARY_BINFO): Remove.
3908 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
3909 (BINFO_VBASE_PRIMARY_P): Likewise.
3910 (BINFO_PRIMARY_BASE_OF): New macro.
3911 (BINFO_INDIRECT_PRIMARY_P): Likewise.
3912 (get_primary_binfo): New function.
3913 * decl.c (lang_mark_tree): Make lang_type::primary_base.
3914 * class.c (vcall_offset_data_s): Rename to ...
3915 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
3916 and add ctor_vtbl_p.
3917 (get_derived_offset): Use get_primary_binfo.
3918 (dfs_mark_primary_bases): Adjust handling of virtual primary
3920 (mark_primary_bases): Likewise.
3921 (set_primary_base): Take a binfo, not an integer, as a
3922 representation of the primary base.
3923 (indirect_primary_base_p): Remove.
3924 (determine_primary_base): Adjust for indirect primary bases.
3925 (dfs_find_final_overrider): Fix typo in coment.
3926 (update_vtable_entry_for_fn): Use get_primary_binfo.
3927 (layout_nonempty_base_or_field): Tweak.
3928 (build_base_fields): Adjust for new primary base semantics.
3929 (dfs_propagate_binfo_offsets): Remove.
3930 (propagate_binfo_offsets): Rewrite.
3931 (dfs_set_offset_for_shared_vbases): Remove.
3932 (layout_virtual_bases): Don't use it.
3933 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
3935 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
3936 CLASSTYPE_VFIELD_PARENT.
3937 (dfs_get_primary_binfo): New function.
3938 (get_primary_binfo): Likewise.
3939 (dump_class_hierarchy_r): Tweak printing of primary bases.
3940 (build_vtbl_initializer): Fix typo in comments. Use
3942 (build_vcall_and_vbase_vtbl_entries): Likewise.
3943 (build_vbaes_offset_vtbl_entries): Likewise.
3944 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
3945 BV_VCALL_INDEX to handle indirect primary bases.
3946 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
3947 (build_rtti_vtbl_entries): Likewise.
3948 * search.c (get_shared_vbase_if_not_primary): Tweak.
3949 (find_vbase_instance): Likewise.
3950 (binfo_for_vtable): Simplify.
3951 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
3952 (make_binfo): Make it have 11 entries.
3954 2000-07-30 Alex Samuel <samuel@codesourcery.com>
3956 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
3957 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
3958 ascertaining primaryness.
3959 (G): Remove template_args.
3960 (decl_is_template_id): New function.
3961 (write_encoding): Use decl_is_template_id.
3962 (write_name): Likewise. Handle type_decls. Get main variant of
3964 (write_nested_name): Likewise.
3965 (write_prefix): Likewise.
3966 (write_template_prefix): Likewise.
3967 (write_special_name_constructor): Remove defunct production from
3969 (write_bare_function_type): Remove comment about absent parameter.
3970 (write_template_template_arg): Add missing grammar production to
3973 2000-07-27 Jason Merrill <jason@redhat.com>
3975 * decl.c (duplicate_decls): If common_type produces a non-typedef
3976 type for a typedef, just use the old type.
3978 2000-07-27 Mark Mitchell <mark@codesourcery.com>
3980 * cp-tree.h (function_depth): Declare.
3981 (verify_stmt_tree): Likewise.
3982 (find_tree): Likewise.
3983 * decl.c (function_depth): Give it external linkage.
3984 * optimize.c (optimize_function): Increment and decrement it.
3985 * tree.c (verify_stmt_tree_r): New function.
3986 (verify_stmt_tree): Likewise.
3987 (find_tree_r): Likewise.
3988 (find_tree): Likewise.
3990 2000-07-27 Jason Merrill <jason@redhat.com>
3992 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
3994 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
3996 2000-07-26 Mark Mitchell <mark@codesourcery.com>
3998 * decl.c (start_cleanup_fn): Mark the function as `inline'.
3999 * decl2.c (get_guard): Call cp_finish_decl, not
4000 rest_of_decl_compilation, for local guards.
4001 * lex.c (do_identifier): Remove unused variable.
4003 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
4005 * parse.y: Add missing ';'.
4007 2000-07-26 Mark Mitchell <mark@codesourcery.com>
4009 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
4012 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
4014 Kill strict_prototype. Backwards compatibility only for
4015 non NO_IMPLICIT_EXTERN_C systems.
4016 * cp-tree.h (flag_strict_prototype): Remove.
4017 (strict_prototype): Remove.
4018 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4019 * decl.c (maybe_push_to_top_level): Adjust.
4020 (pop_from_top_level): Adjust.
4021 (decls_match): Only allow sloppy parm matching for ancient
4023 (init_decl_processing): Adjust.
4024 (grokdeclarator): Adjust.
4025 * decl2.c (flag_strict_prototype): Remove.
4026 (strict_prototype): Remove.
4027 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4028 (lang_f_options): Remove "strict-prototype".
4029 (unsupported-options): Add "strict-prototype".
4030 * lex.c (do_identifier): Adjust.
4031 (do_scoped_id): Adjust.
4032 * parse.y (empty_parms): Adjust.
4033 * class.c (push_lang_context): Adjust.
4034 (pop_lang_context): Adjust.
4035 * typeck.c (comp_target_parms): Adjust.
4037 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
4039 * decl.c (poplevel): Deal with anonymous variables at for scope.
4040 (maybe_inject_for_scope_var): Likewise.
4042 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
4044 * decl.c: Remove all signal handling code, now done in toplev.c.
4046 2000-07-23 Mark Mitchell <mark@codesourcery.com>
4048 * decl.c (make_rtl_for_nonlocal_decl): Rework.
4050 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
4053 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
4055 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
4056 Define my_friendly_assert and my_friendly_abort as macros
4057 which may call friendly_abort. Prototype friendly abort, not
4058 my_friendly_abort or my_friendly_assert.
4059 * decl.c (signal_catch): Report the signal caught in the error
4060 message. Call fatal directly.
4061 * typeck2.c (ack, my_friendly_assert): Delete.
4062 (my_friendly_abort): Rename to friendly_abort. Expect file,
4063 line, and function parameters. Report the abort code, then
4064 call fancy_abort. Do not mask an abort if errors have
4067 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
4069 * typeck.c (comp_target_parms): Remove obsolete parameter.
4070 (comp_target_types): Adjust.
4072 2000-07-17 Jason Merrill <jason@redhat.com>
4074 * typeck.c (mark_addressable): Never set TREE_USED.
4075 * call.c (build_call): Don't abort on calls to library functions
4076 that have been declared normally.
4078 * typeck.c (build_binary_op): Fix grammar in warning.
4080 * exception.cc (__eh_free): Fix prototype.
4082 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
4084 * decl.c (pushdecl): Handle seeing an OVERLOAD in
4085 IDENTIFIER_NAMESPACE_VALUE.
4087 2000-07-16 Mark Mitchell <mark@codesourcery.com>
4089 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
4090 * method.c (use_thunk): Correct handling of vcall offsets.
4092 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
4094 * .cvsignore: parse.h and parse.c have no cp- prefix.
4096 2000-07-13 Mark Mitchell <mark@codesourcery.com>
4098 * .cvsignore: New file.
4100 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
4102 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
4104 2000-07-12 Mark Mitchell <mark@codesourcery.com>
4106 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
4108 * parse.h: Likewise.
4110 2000-07-11 Mark Mitchell <mark@codesourcery.com>
4112 * class.c (layout_class_type): Add pointers to virtual bases after
4113 base classes under the old ABI.
4115 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
4117 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
4118 (finish_continue_stmt): Likewise.
4119 (begin_for_stmt): Remove call to note_level_for_for.
4120 (finish_goto_stmt): Change call from build_min_nt
4122 (finish_expr_stmt): Likewise.
4123 (begin_if_stmt): Likewise.
4124 (begin_while_stmt): Likewise.
4125 (finish_while_stmt): Likewise.
4126 (finish_return_stmt): Likewise.
4127 (begin_for_stmt): Likewise.
4128 (finish_for_stmt): Likewise.
4129 (finish_break_stmt): Likewise.
4130 (begin_switch_stmt): Likewise.
4131 (finish_case_label): Likewise.
4132 (genrtl_try_block): Likewise.
4133 (begin_try_block): Likewise.
4134 (begin_handler): Likewise.
4135 (begin_compound_stmt): Likewise.
4136 (finish_asm_stmt): Likewise.
4137 (finish_label_stmt): Likewise.
4138 (add_decl_stmt): Likewise.
4139 (finish_subobject): Likewise.
4140 (finish_decl_cleanup): Likewise.
4141 (finish_named_return_value): Likewise.
4142 (setup_vtbl_ptr): Likewise.
4143 (add_scope_stmt): Likewise.
4144 * decl.c (finish_constructor_body): Likewise.
4145 (finish_destructor_body): Likewise.
4146 * optimize.c (copy_body_r): Likewise.
4147 (initialize_inlined_parameters): Likewise.
4148 (declare_return_variable): Likewise.
4149 (expand_call_inline): Likewise.
4151 2000-07-10 Jakub Jelinek <jakub@redhat.com>
4153 * semantics.c (expand_body): Sync interface information
4154 at the end of function body expansion.
4156 2000-07-09 Jason Merrill <jason@redhat.com>
4158 * init.c (build_new_1): Bail early if the call to new fails.
4160 * decl.c (compute_array_index_type): Check specifically for
4161 an INTEGER_CST, not just TREE_CONSTANT.
4163 * decl.c (duplicate_decls): Don't call duplicate_decls on
4164 the DECL_TEMPLATE_RESULT.
4165 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
4168 * error.c (dump_template_bindings): Don't crash if we had an
4169 invalid argument list.
4171 * typeck.c (c_expand_start_case): Do narrowing here.
4172 * semantics.c (finish_switch_cond): Not here.
4174 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
4176 * parse.y (asm_clobbers): Do string concatenation.
4178 2000-07-09 Mark Mitchell <mark@codesourcery.com>
4180 * decl.c (pushtag): Don't put local classes in template functions
4181 on the local_classes list.
4183 2000-07-04 Scott Snyder <snyder@fnal.gov>
4185 * decl2.c (get_guard): Add missing return for old ABI local
4188 2000-07-09 Mark Mitchell <mark@codesourcery.com>
4190 * cp-tree.h (char_type_p): New function.
4191 * decl.c (init_decl_processing): Don't initialize
4192 signed_wchar_type_node or unsigned_wchar_type_node.
4193 (complete_array_type): Handle brace-enclosed string-constants.
4194 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
4195 * tree.c (char_type_p): New function.
4196 * typeck2.c (digest_init): Use char_type_p.
4198 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
4200 * pt.c (tsubst): Don't layout type, if it's error_mark.
4202 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
4204 * pt.c (instantiate_pending_templates): Reset template level.
4206 2000-07-05 Jason Merrill <jason@redhat.com>
4208 * call.c (joust): Don't complain about `operator char *()' beating
4209 `operator const char *() const'.
4211 2000-07-04 scott snyder <snyder@fnal.gov>
4212 Jason Merrill <jason@redhat.com>
4214 * repo.c (repo_get_id): Handle the case where a class with virtual
4215 bases has a null TYPE_BINFO_VTABLE.
4217 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
4218 Jason Merrill <jason@redhat.com>
4220 * parse.y (member_init): Just pass in the type.
4221 * init.c (expand_member_init): Handle getting a type.
4223 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4224 Jason Merrill <jason@redhat.com>
4226 * decl.c (finish_function): Warn if a function has no return
4228 Suggested by Andrew Koenig.
4229 * typeck.c (check_return_expr): Do set current_function_returns_value
4230 if we got an error_mark_node.
4232 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
4234 * decl2.c (push_decl_namespace): Push the original namespace.
4236 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
4238 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
4239 * semantics.c (begin_class_definition): Clear it.
4241 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
4243 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
4244 (genrtl_expr_stmt): Likewise.
4245 (genrtl_decl_stmt): Likewise.
4246 (genrtl_if_stmt): Likewise.
4247 (genrtl_while_stmt): Likewise.
4248 (genrtl_do_stmt): Likewise.
4249 (genrtl_return_stmt): Likewise.
4250 (genrtl_for_stmt): Likewise.
4251 (genrtl_break_stmt): Likewise.
4252 (genrtl_continue_stmt): Likewise.
4253 (genrtl_scope_stmt): Likewise.
4254 (genrtl_switch_stmt): Likewise.
4255 (genrtl_case_label): Likewise.
4256 (genrtl_begin_compound_stmt): Likewise.
4257 (genrtl_finish_compound_stmt): Likewise.
4258 (genrtl_compound_stmt): Likewise.
4259 (genrtl_asm_stmt): Likewise.
4261 * init.c (begin_init_stmts): Remove call to
4262 genrtl_begin_compound_stmt.
4263 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
4265 * semantics.c (lang_expand_stmt): Changed call to
4266 genrtl_compound_stmt to ignore return value.
4268 2000-07-02 Mark Mitchell <mark@codesourcery.com>
4270 * mangle.c (canonicalize_for_substitution): Return the canonical
4273 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
4275 * typeck.c (commonparms): Remove obstack manipulations.
4277 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
4279 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
4281 * Makefile.in (OBJS): Added ../c-semantics.o.
4282 (OBJDEPS): Likewise.
4284 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
4286 (struct stmt_tree): Added comment.
4287 (current_function_name_declared): Removed.
4288 (stmts_are_full_exprs_p): Likewise.
4289 (genrtl_do_pushlevel): Likewise.
4290 (genrtl_clear_out_block): Likewise.
4291 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
4292 (DECL_ANON_UNION_ELEMS): Likewise.
4293 (emit_local_var): Likewise.
4294 (make_rtl_for_local_static): Likewise.
4295 (do_case): Likewise.
4296 (expand_stmt): Likewise.
4297 (genrtl_decl_cleanup): Likewise.
4298 (c_expand_asm_operands): Likewise.
4299 (c_expand_return): Likewise.
4300 (c_expand_start_case): Likewise.
4302 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
4303 (emit_local_var): Likewise.
4304 (initialize_local_var): Change reference to
4305 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
4306 Change reference to stmts_are_full_exprs_p to
4307 current_stmt_tree->stmts_are_full_exprs_p.
4308 (push_cp_function_context): Likewise.
4310 * expect.c (expand_throw): Change reference to
4311 stmts_are_full_exprs_p.
4313 * init.c (build_aggr_init): Change reference to
4314 stmts_are_full_exprs_p.
4315 (build_vec_init): Likewise.
4317 * optimize.c (maybe_clone_body): Change reference to
4318 current_function_name_declared to
4319 cp_function_chain->name_declared.
4321 * pt.c (instantiate_decl): Change reference to
4322 current_function_name_declared to
4323 cp_function_chain->name_declared.
4325 * semantics.c (expand_cond): Moved declaration to c-common.h.
4326 (genrtl_do_pushlevel): Moved to c-semantics.c.
4327 (genrtl_clear_out_block): Likewise.
4328 (genrtl_goto_stmt): Likewise.
4329 (genrtl_expr_stmt): Likewise.
4330 (genrtl_decl_stmt): Likewise.
4331 (gerntl_if_stmt): Likewise.
4332 (genrtl_while_stmt): Likewise.
4333 (genrtl_do_stmt): Likewise.
4334 (genrtl_return_stmt): Likewise.
4335 (genrtl_for_stmt): Likewise.
4336 (genrtl_break_stmt): Likewise.
4337 (genrtl_continue_stmt): Likewise.
4338 (genrtl_scope_stmt): Likewise.
4339 (genrtl_switch_stmt): Likewise.
4340 (genrtl_case_label): Likewise.
4341 (genrtl_begin_compound_stmt): Likewise.
4342 (genrtl_finish_compound_stmt): Likewise.
4343 (genrtl_compound_stmt): Likewise.
4344 (genrtl_asm_stmt): Likewise.
4345 (genrtl_decl_cleanup): Likewise.
4346 (expand_cond): Likewise.
4347 (expand_stmt): Renamed to ...
4348 (lang_expand_stmt): ... this.
4349 (lang_expand_expr_stmt): Initialize.
4350 (set_current_function_name_declared): Likewise.
4351 (stmts_are_full_exprs_p): Likewise.
4352 (current_function_name_declared): Likewise.
4353 (anon_aggr_type_p): Likewise.
4354 (do_poplevel): Change reference to
4355 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
4356 Change reference to stmts_are_full_exprs_p to
4357 current_stmt_tree->stmts_are_full_exprs_p.
4358 (add_tree): Likewise.
4359 (finish_expr_stmt): Likewise.
4360 (prep_stmt): Likewise.
4361 (lang_expand_stmt): Likewise.
4362 (begin_compound_stmt): Change reference to
4363 current_function_name_declared to
4364 cp_function_chain->name_declared and call to
4365 current_function_name_declared().
4366 (setup_vtbl_ptr): Likewise.
4367 (genrtl_do_poplevel): Removed.
4369 2000-06-30 Jason Merrill <jason@redhat.com>
4371 * init.c (init_init_processing): Go back to aligning like
4372 double_type_node for old ABI.
4373 (get_cookie_size): Make cookie larger if we get a type that needs
4375 (build_vec_delete): Call it.
4377 * typeck.c (qualify_type_recursive): New fn.
4378 (composite_pointer_type): Use it.
4379 (build_binary_op): Use composite_pointer_type.
4381 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
4382 Jason Merrill <jason@redhat.com>
4384 * typeck.c (check_return_expr): Don't complain about returning
4385 NULL from operator new if -fcheck-new.
4386 * cp-tree.h: Declare flag_check_new here.
4389 2000-06-28 Alex Samuel <samuel@codesourcery.com>
4391 * mangle.c (find_substitution): Use same_type_p.
4392 (write_encoding): Don't check for substitutions.
4394 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
4396 * parse.y (expr_no_comma_rangle): New non-terminal.
4397 (template_parm): Use it for default parameter case.
4398 (template_arg): Use it.
4399 (expr_no_commas): Remove commented out undefined extensions.
4400 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
4401 * parse.h, parse.c: Rebuilt.
4403 2000-06-30 Mark Mitchell <mark@codesourcery.com>
4405 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
4406 (finish_asm_stmt): Do it here, instead.
4408 * cp-tree.h (ridpointers): Don't declare.
4409 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
4410 (record_builtin_java_type): Likewise.
4411 (init_decl_processing): Likewise.
4412 * lex.c: Move inclusion of lex.h.
4413 (ridpointers): Don't define.
4414 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
4416 * lex.h (enum rid): Rename to ...
4417 (enum cp_rid): ... this.
4418 (ridpointers): Don't declare.
4419 * parse.y: Move inclusion of lex.h.
4420 * parse.c: Regenerated.
4421 * spew.c: Move inclusion of lex.h.
4423 * cp-tree.h (struct language_function): Remove temp_name_counter.
4424 (temp_name_counter): Remove.
4425 (get_temp_name): Change prototype.
4426 (get_guard): New function.
4427 (get_guard_cond): Likewise.
4428 (set_guard): Likewise.
4429 * cvt.c (build_up_reference): Adjust call to get_temp_name.
4430 * decl.c (expand_static_init): Use get_guard and friends to
4431 implement guard variables.
4432 * decl2.c (get_temp_name): Assume that the variables created are
4434 (get_sentry): Rename to ...
4435 (get_guard): ... this. Implement new ABI guard variables.
4436 (get_guard_bits): New function.
4437 (get_guard_cond): Likewise.
4438 (set_guard): Likewise.
4439 (start_static_initialization_or_destruction): Use them.
4440 (do_static_initialization): Replace sentry with guard throughout.
4441 (do_static_destruction): Likewise.
4442 * init.c (create_temporary_var): Add comment.
4444 2000-06-28 Alex Samuel <samuel@codesourcery.com>
4446 * mangle.c (find_substitution): Use same_type_p.
4447 (write_encoding): Don't check for substitutions.
4449 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
4451 * parse.y (expr_no_comma_rangle): New non-terminal.
4452 (template_parm): Use it for default parameter case.
4453 (template_arg): Use it.
4454 (expr_no_commas): Remove commented out undefined extensions.
4455 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
4456 * parse.h, parse.c: Rebuilt.
4458 2000-06-29 Mark Mitchell <mark@codesourcery.com>
4460 * cp-tree.h (flag_const_strings): Remove.
4461 (warn_parentheses): Likewise.
4462 (warn_format): Likewise.
4463 (common_type): Likewise.
4464 (default_conversion): Likewise.
4465 (build_binary_op): Likewise.
4466 (cp_build_binary_op): New macro.
4467 * call.c (build_new_op): Use cp_build_binary_op instead of
4469 * class.c (build_vtable_entry_ref): Likewise.
4470 * decl.c (expand_static_init): Likewise.
4471 (compute_array_index_type): Likewise.
4472 (build_enumerator): Likewise.
4473 * decl2.c (delete_sanity): Likewise.
4474 (start_static_initialization_or_destruction): Likewise.
4475 * error.c (dump_type_suffix): Likewise.
4476 * init.c (resolve_offset_ref): Likewise.
4477 (build_new): Likewise.
4478 (build_new_1): Likewise.
4479 (build_vec_delete_1): Likewise.
4480 (build_vec_init): Likewise.
4481 (build_delete): Likewise.
4482 * rtti.c (synthesize_tinfo_fn): Likewise.
4483 (synthesize_tinfo_var): Likewise.
4484 * search.c (expand_upcast_fixups): Likewise.
4485 (fixup_all_virtual_upcast_offsets): Likewise.
4486 * typeck.c (build_array_ref): Likewise.
4487 (get_member_function_from_ptrfunc): Likewise.
4488 (build_binary_op): Add parameter.
4489 (pointer_int_sum): Use cp_build_binary_op.
4490 (pointer_diff): Likewise.
4491 (build_modify_expr): Likewise.
4492 (get_delta_difference): Likewise.
4493 (build_ptrmemfunc): Likewise.
4495 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
4497 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
4498 * decl.c (create_implicit_typedef): Adjust.
4499 * decl2.c (build_artificial_parm): Adjust.
4500 * method.c (implicitly_declare_fn): Adjust.
4501 * pt.c (push_inline_template_parms_recursive): Adjust.
4502 (process_template_parm): Adjust.
4503 (overloaded_template_name): Adjust.
4504 * semantics.c (finish_template_template_parm): Adjust.
4506 2000-06-28 Mark Mitchell <mark@codesourcery.com>
4508 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
4509 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
4510 where to emit thunks.
4511 (build_vtt): Adjust call to build_vtt_inits.
4512 (build_vtt_inits): Add parameter to indicate whether or not
4513 sub-VTTs for virtual bases should be included. Adjust handling of
4514 construction vtables.
4515 (get_matching_base): New function.
4516 (dfs_build_vtt_inits): Rename to ...
4517 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
4518 construction vtables.
4519 (dfs_fixup_binfo_vtbls): Likewise.
4520 (build_ctor_vtbl_groups): Build construction vtables for virtual
4522 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
4523 to build construction vtbls.
4524 (dfs_accumulate_vtbl_inits): Adjust handling of
4525 construction vtables.
4527 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
4530 2000-06-27 Mark Mitchell <mark@codesourcery.com>
4532 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
4534 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
4536 * search.c (hides): Remove.
4537 (is_subobject_of_p): Add most_derived parameter. Use
4539 (lookup_field_queue_p): Adjust.
4540 (lookup_field_r): Adjust.
4542 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
4544 * decl2.c (handle_class_head): Bash typedefs to the type's main
4547 2000-06-25 Mark Mitchell <mark@codesourcery.com>
4549 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
4550 (begin_global_stmt_expr): ... this.
4551 (genrtl_finish_stmt_expr): Rename to ...
4552 (finish_global_stmt_expr): ... this.
4553 * init.c (begin_init_stmts): Adjust calls.
4554 (finish_init_stmts): Likewise.
4555 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
4556 (begin_global_stmt_expr): ... this.
4557 (genrtl_finish_stmt_expr): Rename to ...
4558 (finish_global_stmt_expr): ... this.
4560 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4562 * search.c (lookup_member): Fix typo in comment.
4564 2000-06-24 Jason Merrill <jason@redhat.com>
4566 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
4567 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
4569 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4571 * parse.y (complex_direct_notype_declarator): Support global_scope.
4572 * Makefile.in: Adjust conflict count.
4574 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
4576 * parse.y (template_arg): Convert TEMPLATE_DECL
4577 that is a template template paramter to
4578 TEMPLATE_TEMPLATE_PARM here.
4580 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4581 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
4582 (copy_template_template_parm): Adjust prototype.
4583 * decl.c (grokdeclarator): Remove dead code.
4584 * pt.c (process_template_parm): Tidy.
4585 (lookup_template_class): Construct nodes in
4586 copy_template_template_parm.
4587 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
4588 lookup_template_class. Use TYPE_TI_TEMPLATE.
4589 * tree.c (copy_template_template_parm): Add NEWARGS
4591 (mapcar): Adjust call to copy_template_template_parm.
4592 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
4593 * method.c (build_template_template_parm_names): Change error
4594 code to avoid compilation warning.
4596 * gxxint.texi: Document template template parameter
4599 2000-06-21 Alex Samuel <samuel@codesourcery.com>
4601 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
4602 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
4603 (cp-demangle.o): New rule.
4604 (dyn-string.o): Likewise.
4605 * inc/cxxabi.h (__cxa_demangle): New declaration.
4607 2000-06-22 Mark Mitchell <mark@codesourcery.com>
4609 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
4610 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
4611 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
4613 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
4614 (make_thunk): Change prototype.
4615 (emit_thunk): Rename to use_thunk.
4616 (mangle_thunk): Change prototype.
4617 * class.c (get_derived_offset): Simplify.
4618 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
4619 BV_GENERATE_THUNK_WITH_VTABLE_P.
4620 (build_primary_vtable): Simplify.
4621 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
4622 (dfs_find_base): Remove.
4623 (update_vtable_entry_for_fn): Correct bug in finding the base
4624 where a virtual function was first declared. Figure out whether
4625 or not to emit a vcall-thunk with the vtables in which it appears.
4626 Correct logic for deciding whether to use an ordinary thunk, or a
4628 (finish_struct_1): Remove unnecssary code.
4629 (build_vtbl_initializer): Use ssize_int for the running counter of
4631 (build_vtbl_initializer): Only use vcall thunks where necessary.
4632 Mark thunks as needing to be emitted with their vtables, or not.
4633 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
4634 indices. Use size_binop.
4635 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
4636 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
4638 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
4639 (build_vtable_entry): Mark thunks as needing to be emitted with
4640 their vtables, or not.
4641 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
4642 * decl2.c (mark_vtable_entries): Use use_thunk instead of
4644 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
4646 * error.c (dump_expr): Use BV_FN.
4647 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
4649 * method.c (make_thunk): Likewise.
4650 (emit_thunk): Rename to use_thunk. Allow callers to decide
4651 whether or not to actually emit the thunk. Adjust for changes in
4652 representation of vcall offsets.
4653 * search.c (dfs_get_pure_virtuals): Use BV_FN.
4654 * semantics.c (emit_associated_thunks): New function.
4655 (expand_body): Use it.
4656 * ir.texi: Adjust decriptions of thunks.
4658 2000-06-22 Jason Merrill <jason@redhat.com>
4660 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
4661 (tsubst_friend_function): Copy it here.
4663 * decl.c (grok_op_properties): Fix typo.
4665 * decl2.c (delete_sanity): Clarify warning, avoid failure on
4668 * pt.c (check_explicit_specialization): Clarify error.
4670 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
4671 an old OVERLOAD when we're declaring a non-function.
4672 (pushdecl, destroy_local_var): Check for error_mark_node.
4673 (warn_extern_redeclared_static): Also bail early if
4675 (push_overloaded_decl): Ignore an old error_mark_node.
4677 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
4679 * call.c (build_x_va_arg): Check if in a template decl.
4680 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
4682 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4684 * class.c (push_lang_context): TYPE_NAME gets you to the Java
4686 * decl.c (check_goto): Computed gotos assumed OK.
4688 2000-06-20 Jason Merrill <jason@redhat.com>
4690 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
4691 for which we don't need to look for instantiations.
4693 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
4695 * parse.y (program): Always call finish_translation_unit.
4696 * parse.c, parse.h: Rebuilt.
4698 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
4700 * method.c: Don't include hard-reg-set.h.
4702 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
4704 * rtti.c (get_base_offset): Cope when vbase field is in a base.
4706 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
4708 * call.c (build_conditional_expr): Use VOID_TYPE_P.
4709 * cvt.c (cp_convert_to_pointer): Likewise.
4710 (convert_to_void): Likewise.
4711 * error.c (dump_expr): Likewise.
4712 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
4713 * init.c (build_delete): Likewise.
4714 * method.c (emit_thunk): Likewise.
4715 * optmize.c (declare_return_variable): Likewise.
4716 * rtti.c (get_tinfo_decl_dynamic): Likewise.
4717 (get_typeid): Likewise.
4718 (build_dynamic_cast_1): Likewise.
4719 * typeck.c (composite_pointer_type): Likewise.
4720 (common_type): Likewise.
4721 (build_indirect_ref): Likewise.
4722 (build_binary_op): Likewise.
4723 (build_x_compound_expr): Likewise.
4724 (check_return_expr): Likewise.
4725 * typeck2.c (add_exception_specifier): Likewise.
4727 * mangle.c (write_method_parms): Use direct comparison for end
4730 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
4732 * cp-tree.h (genrtl_try_block): Declare function.
4733 (genrtl_handler): Likewise.
4734 (genrtl_catch_block): Likewise.
4735 (genrtl_ctor_stmt): Likewise.
4736 (genrtl_subobject): Likewise.
4737 (genrtl_decl_cleanup): Likewise.
4738 (genrtl_do_poplevel): Likewise.
4739 (genrtl_do_pushlevel): Likewise.
4740 (genrtl_clear_out_block): Likewise.
4741 (genrtl_goto_stmt): Likewise.
4742 (genrtl_expr_stmt): Likewise.
4743 (genrtl_decl_stmt): Likewise.
4744 (genrtl_if_stmt): Likewise.
4745 (genrtl_while_stmt): Likewise.
4746 (genrtl_do_stmt): Likewise.
4747 (genrtl_return_stmt): Likewise.
4748 (genrtl_for_stmt): Likewise.
4749 (genrtl_break_stmt): Likewise.
4750 (genrtl_continue_stmt): Likewise.
4751 (genrtl_scope_stmt): Likewise.
4752 (genrtl_switch_stmt): Likewise.
4753 (genrtl_case_label): Likewise.
4754 (genrtl_begin_compound_stmt): Likewise.
4755 (genrtl_finish_compound_stmt): Likewise.
4756 (genrtl_compound_stmt): Likewise.
4757 (genrtl_asm_stmt): Likewise.
4758 (genrtl_named_return_value): Likewise.
4759 (genrtl_begin_stmt_expr): Likewise.
4760 (genrtl_finish_stmt_expr): Likewise.
4761 (finish_for_stmt): Removed first argument.
4762 (finish_switch_stmt): Likewise.
4764 * semantics.c (genrtl_try_block): Define function.
4765 (genrtl_handler): Likewise.
4766 (genrtl_catch_block): Likewise.
4767 (genrtl_ctor_stmt): Likewise.
4768 (genrtl_subobject): Likewise.
4769 (genrtl_decl_cleanup): Likewise.
4770 (genrtl_do_poplevel): Likewise.
4771 (genrtl_do_pushlevel): Likewise.
4772 (genrtl_clear_out_block): Likewise.
4773 (genrtl_goto_stmt): Likewise.
4774 (genrtl_expr_stmt): Likewise.
4775 (genrtl_decl_stmt): Likewise.
4776 (genrtl_if_stmt): Likewise.
4777 (genrtl_while_stmt): Likewise.
4778 (genrtl_do_stmt): Likewise.
4779 (genrtl_return_stmt): Likewise.
4780 (genrtl_for_stmt): Likewise.
4781 (genrtl_break_stmt): Likewise.
4782 (genrtl_continue_stmt): Likewise.
4783 (genrtl_scope_stmt): Likewise.
4784 (genrtl_switch_stmt): Likewise.
4785 (genrtl_case_label): Likewise.
4786 (genrtl_begin_compound_stmt): Likewise.
4787 (genrtl_finish_compound_stmt): Likewise.
4788 (genrtl_compound_stmt): Likewise.
4789 (genrtl_asm_stmt): Likewise.
4790 (genrtl_named_return_value): Likewise.
4791 (genrtl_begin_stmt_expr): Likewise.
4792 (genrtl_finish_stmt_expr): Likewise.
4793 (finish_for_stmt): Removed first argument and generate rtl
4795 (finish_switch_stmt): Likewise.
4796 (do_poplevel): Removed generate rtl specific code.
4797 (do_pushlevel): Likewise.
4798 (add_tree): Likewise.
4799 (finish_goto_stmt): Likewise.
4800 (finish_expr_stmt): Likewise.
4801 (begin_if_stmt): Likewise.
4802 (finish_if_stmt_cond): Likewise.
4803 (finish_then_clause): Likewise.
4804 (begin_else_clause): Likewise.
4805 (finish_else_clause): Likewise.
4806 (finish_if_stmt): Likewise.
4807 (clear_out_block): Likewise.
4808 (begin_while_stmt): Likewise.
4809 (finish_while_stmt_cond): Likewise.
4810 (finish_while_stmt): Likewise.
4811 (begin_do_stmt): Likewise.
4812 (finish_do_body): Likewise.
4813 (finish_do_stmt): Likewise.
4814 (finish_return_stmt): Likewise.
4815 (begin_for_stmt): Likewise.
4816 (finish_for_init_stmt): Likewise.
4817 (finish_for_cond): Likewise.
4818 (finish_for_expr): Likewise.
4819 (finish_break_stmt): Likewise.
4820 (finish_continue_stmt): Likewise.
4821 (begin_switch_stmt): Likewise.
4822 (finish_switch_cond): Likewise.
4823 (finish_case_label): Likewise.
4824 (begin_try_block): Likewise.
4825 (begin_function_try_block): Likewise.
4826 (finish_try_block): Likewise.
4827 (finish_cleanup_try_block): Likewise.
4828 (finish_cleanup): Likewise.
4829 (finish_function_try_block): Likewise.
4830 (finish_handler_sequence): Likewise.
4831 (finish_function_handler_sequence): Likewise.
4832 (begin_handler): Likewise.
4833 (finish_handler_parms): Likewise.
4834 (begin_catch_block): Likewise.
4835 (finish_handler): Likewise.
4836 (begin_compound_stmt): Likewise.
4837 (finish_compound_stmt): Likewise.
4838 (finish_asm_stmt): Likewise.
4839 (finish_label_stmt): Likewise.
4840 (finish_label_decl): Likewise.
4841 (finish_subobject): Likewise.
4842 (finish_decl_cleanup): Likewise.
4843 (finish_named_return_value): Likewise.
4844 (begin_stmt_expr): Likewise.
4845 (finish_stmt_expr): Likewise.
4847 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
4848 to call genrtl_expr_stmt when appropriate.
4850 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
4851 begin_compound_expr to call genrtl_begin_stmt_expr and
4852 genrtl_begin_compound_expr when appropriate.
4853 (finish_init_stmts): Changed calls to finish_compound_expr and
4854 finish_stmt_expr to call genrtl_finish_compound_expr and
4855 genrtl_finish_stmt_expr when appropriate.
4856 (expand_default_init): Changed call to finish_expr_stmt to call
4857 genrtl_expr_stmt when appropriate.
4858 (build_vec_init): Likewise.
4860 * parse.y (simple_stmt): Removed first argument from call to
4861 finish_for_stmt. Removed first argument from call to
4864 * parse.c: Regenerated.
4866 * pt.c (tsubst_expr): Removed first argument from call to
4867 finish_for_stmt. Removed first argument from call to
4870 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
4872 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
4873 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
4875 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
4876 (cplus_tree_code_length[]): Likewise.
4877 (cplus_tree_code_name[]): Likewise.
4878 (init_parse): Added call to add_c_tree_codes. Changed
4879 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
4881 2000-06-16 Mark Mitchell <mark@codesourcery.com>
4883 * cp-tree.h (finish_mem_initializers): Declare.
4884 (count_trees): Likewise.
4885 * parse.y (base_init): Use finish_mem_initializers.
4886 * semantics.c (finish_mem_initializers): New function.
4888 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
4889 the number of trees.
4891 (count_trees): Don't use it.
4893 2000-06-15 Jason Merrill <jason@redhat.com>
4895 * tree.c (count_trees): New debugging function.
4897 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
4898 * init.c (build_member_call): Pull out the name of a DECL.
4900 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
4901 * semantics.c (expand_body): Push to TV_INTEGRATION here.
4902 * optimize.c (optimize_function): Not here.
4903 * pt.c (instantiate_decl): Push to TV_PARSE.
4905 2000-06-15 Mark Mitchell <mark@codesourcery.com>
4907 * cp-tree.h (struct language_function): Remove x_base_init_list
4908 and x_member_init_list.
4909 (current_base_init_list): Remove.
4910 (current_member_init_list): Likewise.
4911 (setup_vtbl_ptr): Change prototype.
4912 (emit_base_init): Likewise.
4913 (expand_member_init): Likewise.
4914 (reinit_parse_for_function): Remove.
4915 * decl.c (save_function_data): Don't clear x_base_init_list and
4917 (mark_language_function): Don't mark them.
4918 * init.c (perform_member_init): Tweak comment.
4919 (sort_member_init): Take the list of initializers as an argument.
4920 (sort_base_init): Likewise.
4921 (emit_base_init): Likewise.
4922 (expand_member_init): Return the initializer. Don't use global
4924 * lex.c (reinit_parse_for_function): Remove.
4925 * method.c (build_template_parm_names): Correct substitution.
4926 (do_build_copy_constructor): Don't use current_member_init_list
4927 and current_base_init_list.
4928 (synthesize_method): Likewise.
4929 * parse.y (base_init): Split mem-initializers into
4930 base-initializers and field-initializers.
4931 (member_init_list): Build up the list here.
4932 (member_init): Return the initializer.
4933 (fn.depfn): Don't use reinit_parse_for_function.
4934 * parse.c: Regenerated.
4935 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
4937 (tsubst_expr): Don't use current_member_init_list
4938 and current_base_init_list.
4939 (tsubst_expr_values): Rename to ...
4940 (tsubst_initializer_list): ... this. Use convert_from_reference.
4941 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
4942 and current_base_init_list.
4943 (begin_function_definition): Don't call reinit_parse_for_function.
4945 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
4947 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
4950 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
4952 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
4954 * cp-tree.h (IF_COND): Move to c-common.h.
4955 (THEN_CLAUSE): Likewise.
4956 (ELSE_CLAUSE): Likewise.
4957 (WHILE_COND): Likewise.
4958 (WHILE_BODY): Likewise.
4959 (DO_COND): Likewise.
4960 (DO_BODY): Likewise.
4961 (RETURN_EXPR): Likewise.
4962 (EXPR_STMT_EXPR): Likewise.
4963 (FOR_INIT_STMT): Likewise.
4964 (FOR_COND): Likewise.
4965 (FOR_EXPR): Likewise.
4966 (FOR_BODY): Likewise.
4967 (SWITCH_COND): Likewise.
4968 (SWITCH_BODY): Likewise.
4969 (CASE_LOW): Likewise.
4970 (CASE_HIGH): Likewise.
4971 (GOTO_DESTINATION): Likewise.
4972 (COMPOUND_BODY): Likewise.
4973 (ASM_CV_QUAL): Likewise.
4974 (ASM_STRING): Likewise.
4975 (ASM_OUTPUTS): Likewise.
4976 (ASM_INPUTS): Likewise.
4977 (ASM_CLOBBERS): Likewise.
4978 (DECL_STMT_DECL): Likewise.
4979 (STMT_EXPR_STMT): Likewise.
4980 (LABEL_STMT_LABEL): Likewise.
4981 (SCOPE_BEGIN_P): Likewise.
4982 (SCOPE_END_P): Likewise.
4983 (SCOPE_STMT_BLOCK): Likewise.
4984 (SCOPE_NULLIFIED_P): Likewise.
4985 (SCOPE_NO_CLEANUPS_P): Likewise.
4986 (SCOPE_PARTIAL_P): Likewise.
4987 (ASM_VOLATILE_P): Likewise.
4988 (STMT_LINENO): Likewise.
4989 (STMT_LINENO_FOR_FN_P): Likewise.
4991 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
4992 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
4993 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
4994 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
4995 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
4997 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
4999 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
5000 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
5002 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
5003 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
5004 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
5006 2000-06-14 Mark Mitchell <mark@codesourcery.com>
5008 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
5009 * class.c (dfs_find_final_overrider): Set it appropriately.
5010 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
5011 avoid unneeded secondary vptrs.
5013 2000-06-13 Jakub Jelinek <jakub@redhat.com>
5015 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
5016 (check_bitfield_decl, check_field_decl): Likewise.
5017 (build_vtbl_or_vbase_field, build_base_field): Likewise.
5018 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
5019 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
5020 (xfer_tag, finish_enum): Likewise.
5021 * decl2.c (finish_builtin_type): Likewise.
5022 * init.c (init_init_processing): Likewise.
5023 * pt.c (instantiate_class_template): Likewise.
5024 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
5025 * cp-tree.h (struct lang_type): Add user_align member.
5026 (CLASSTYPE_USER_ALIGN): Define.
5028 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5030 * Make-lang.in (c++.install-common): Install g++-cross in
5031 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
5032 $(target_alias)-g++ and $(target_alias)-c++.
5034 2000-06-12 Mark Mitchell <mark@codesourcery.com>
5036 * class.c (vcall_offset_data_s): Add last_init and fns.
5037 (overrides): Rename to same_signature_p.
5038 (dfs_find_final_overrider): Adjust accordingly.
5039 (mark_overriders): Likewise.
5040 (warn_hidden): Likewise.
5041 (build_vtbl_initializer): Reorganize machinery for building things
5042 at negative offsets.
5043 (build_vcall_and_vbase_vtbl_entries): Likewise.
5044 (build_vbase_offset_vtbl_entries): Likewise.
5045 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
5046 offset entries. Do not create two entries for functions with the
5048 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
5049 (build_rtti_vtbl_entries): Reorganize machinery for building things
5050 at negative offsets.
5052 * optimize.c (expand_call_inline): Don't recurse into the code
5053 used to initialize the parameters more than once.
5055 2000-06-11 Mark Mitchell <mark@codesourcery.com>
5057 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
5058 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
5059 (find_substitution): Only use the `Sa' substitution for
5060 std::allocator, not instantiations of it.
5061 (write_template_prefix): Move comment. Only use a TREE_LIST to
5062 represent substitutions for a member template.
5063 (write_array_type): Mangle array dimensions correctly.
5064 * optimize.c (maybe_clone_body): Copy more information from the
5066 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
5067 on the regenerated declaration.
5069 2000-06-11 Chip Salzenberg <chip@valinux.com>
5070 Mark Mitchell <mark@codesourcery.com>
5072 * class.c (build_vtable): Clarify comment.
5073 (build_ctor_vtbl_group): Pass the most derived type to
5076 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5078 * decl2.c (compare_options): Don't needlessly cast away const-ness.
5080 2000-06-10 Mark Mitchell <mark@codesourcery.com>
5082 * decl.c (add_binding): Handle duplicate declarations of external
5085 2000-06-09 Chip Salzenberg <chip@valinux.com>
5086 Mark Mitchell <mark@codesourcery.com>
5088 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
5090 (write_signed_number): New macro.
5091 (write_unsigned_number): Likewise.
5092 (write_source_name): Use them.
5093 (write_number): Handle signed and unsigned values.
5094 (write_integer_cst): Use tree_int_cst_sgn, and use
5095 write_unsigned_number or write_signed_number as appropriate.
5096 (write_discriminator): Use write_unsigned_number or
5097 write_signed_number as appropriate.
5098 (write_template_arg_literal): Likewise.
5099 (write_array_type): Use tree_low_cst.
5100 (write_template_parm): Use write_unsigned_number or
5101 write_signed_number as appropriate.
5102 (write_substitution): Adjust call to write_number.
5103 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
5104 (write_expression): Handle non-type template arguments of
5105 reference type correctly.
5106 (mangle_thunk): Use write_signed_number.
5108 2000-06-09 Chip Salzenberg <chip@valinux.com>
5110 * mangle.c (find_substition): Don't mangle objects with typename
5111 substitutions (e.g. "cin" as "Si").
5113 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
5115 * call.c (add_candidate): Use ggc_alloc_cleared.
5116 * decl.c (lookup_label): Likewise.
5117 * lex.c (retrofit_lang_decl): Likewise.
5119 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
5121 * semantics.c (expand_body): Push to TV_EXPAND.
5122 * optimize.c (optimize_function): Push to TV_INTEGRATION.
5123 * decl.c (start_function): Always call announce_function.
5125 * tinfo2.cc: Just declare abort.
5127 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
5129 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
5130 whenever @ is a symbolic name.
5132 2000-06-08 Jakub Jelinek <jakub@redhat.com>
5134 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
5136 2000-06-07 Mark Mitchell <mark@codesourcery.com>
5138 * decl.c (pushdecl): Look up functions by DECL_NAME, not
5139 DECL_ASSEMBLER_NAME.
5141 2000-06-06 Mark Mitchell <mark@codesourcery.com>
5143 * decl2.c (c_language): Define.
5145 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
5147 * lex.c (lang_init_options): Tweak.
5149 * decl2.c: Remove #inclusion of diagnostic.h
5150 (lang_decode_option): Move diagnostic formatting options to
5153 * lang-options.h: Remove documentation for diagnostic options.
5155 * Makefile.in (lex.o): Depends upon diagnostic.h
5157 2000-06-06 Mark Mitchell <mark@codesourcery.com>
5159 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
5160 the same DECL_RESULT, it's not a redefinition.
5161 * pt.c (tsubst_decl): Remove code to handle illegal
5164 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
5166 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
5168 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
5170 * search.c (maybe_suppress_debug_info): Don't check
5171 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
5173 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
5176 Remember instantiation context in deferred instantiations.
5177 * cp-tree.h (struct tinst_level): Remove.
5178 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
5179 * pt.c (current_tinst_level): Now a tree.
5180 (print_template_context, push_tinst_level, pop_tinst_level,
5181 tinst_for_decl): Adjust.
5182 (reopen_tinst_level): New fn.
5183 (init_pt): Register current_tinst_level as a root.
5184 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
5185 of the pending templates list.
5186 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
5187 * lex.c (extract_interface_info): Adjust.
5188 * decl2.c (warn_if_unknown_interface): Adjust.
5190 2000-06-05 Mark Mitchell <mark@codesourcery.com>
5192 * class.c (indirect_primary_base_p): New function.
5193 (determine_primary_base): Use it.
5195 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
5197 Update new-abi dynamic cast algorithm.
5198 * tinfo.cc (__class_type_info::__dyncast_result): Add
5199 whole_details. Adjust constructor.
5200 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
5201 Avoid unnecessary searching.
5202 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
5204 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5206 * decl.c (init_decl_processing): Don't call record_component_aliases.
5207 * tree.c (build_cplus_array_type_1): Likewise.
5209 2000-06-04 Mark Mitchell <mark@codesourcery.com>
5211 * ir.texi: Correct typo.
5212 * mangle.c (write_expression): Handle non-type template arguments
5213 with reference type.
5214 * method.c (build_overload_value): Likewise.
5215 * pt.c (convert_nontype_argument): Explicitly represent conversion
5216 to a reference with an ADDR_EXPR.
5217 (unify): Always unify arguments in left-to-right order.
5219 2000-06-03 Alex Samuel <samuel@codesourcery.com>
5220 Mark Mitchell <mark@codesourcery.com>
5222 * Make-lang.in (CXX_SRCS): Add mangle.c.
5223 * Makefile.in (CXX_OBJS): Add mangle.o.
5224 (mangle.o): New rule.
5226 * class.c (local_classes): New variable.
5227 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
5228 (get_vtt_name): Use mangle_vtt_name for new ABI.
5229 (init_class_processing): Initialize local_classes.
5230 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
5231 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
5232 (std_identifier): New macro.
5233 (DECL_VOLATILE_MEMFUNC_P): New macro.
5234 (DECL_NAMESPACE_STD_P): Likewise.
5235 (local_classes): Declare.
5236 (get_mostly_instantiated_function_type): Declare.
5237 (init_mangle): Declare.
5238 (mangle_decl): Likewise.
5239 (mangle_type_string): Likewise.
5240 (mangle_type): Likewise.
5241 (mangle_typeinfo_for_type): Likewise.
5242 (mangle_typeinfo_string_for_type): Likewise.
5243 (mangle_vtbl_for_type): Likewise.
5244 (mangle_vtt_for_type): Likewise.
5245 (mangle_ctor_vtbl_for_type): Likewise.
5246 (mangle_thunk): Likewise.
5247 (mangle_conv_op_name_for_type): Likewise.
5248 (mangle_guard_variable): Likewise.
5249 * decl.c (pushtag): Keep track of local classes.
5250 (initialize_predefined_identifiers): Initialize std_identifier.
5251 (init_decl_processing): Use std_identifier.
5252 (start_decl): Don't treat instantiations as specializations.
5253 (grokdeclarator): Likewise.
5254 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
5255 name for fully-instantiated templates.
5256 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
5257 destructors with the new ABI.
5258 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
5259 (grokfield): Use mangle_type for new ABI.
5260 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
5261 (get_sentry): Use mangle_guard_variable for new ABI.
5262 (start_static_initialization_or_destruction): Likewise.
5263 * expr.c (extract_aggr_init): Remove.
5264 (extract_scalar_init): Likewise.
5265 (extract_init): Remove #if 0'd code.
5266 * mangle.c: New function.
5267 * method.c (build_mangled_name): Assert not flag_new_abi.
5268 (build_static_name): Likewise.
5269 (build_decl_overload_real): Likewise.
5270 (build_typename_overload): Likewise.
5271 (build_overload_with_type): Likewise.
5272 (build_overload_name): Likewise.
5273 (get_ctor_vtbl_name): Likewise.
5274 (start_squangling): Likewise.
5275 (get_id_2): Likewise.
5276 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
5277 (init_method): Call init_mangle for new ABI.
5278 (make_thunk): Call mangle_thunk for new ABI.
5279 * operators.def: Correct new ABI manglings for the `%' operator.
5281 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
5282 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
5283 (lookup_template_class): Call mangle_decl for new ABI.
5284 (get_mostly_instantiated_function_type): New function.
5285 (set_mangled_name_for_template_decl): Use it.
5286 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
5287 the new ABI. Use mangle_conv_op_name_for_type for instantiated
5288 conversion op names.
5289 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
5290 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
5291 (tinfo_base_init): Likewise. Mangle typeinfo string name with
5292 mangle_typeinfo_string_for_type.
5294 2000-06-03 Mark Mitchell <mark@codesourcery.com>
5296 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
5297 (INNERMOST_TEMPLATE_ARGS): New macro.
5298 (innermost_args): Remove.
5299 (get_innermost_template_args): New function.
5300 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
5301 * error.c (dump_function_decl): Be caution when using
5302 most_general_template.
5303 * method.c (build_template_parm_names): Use
5304 INNERMOST_TEMPLATE_ARGS.
5305 * pt.c (add_to_template_args): Tidy comment
5306 (get_innermost_template_args): New function.
5307 (check_explicit_specialization): Clear DECL_INITIAL for a new
5309 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
5311 (push_template_decl): Always register specializations of the most
5313 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
5314 (coerce_template_parms): Likewise.
5315 (lookup_template_class): Likewise.
5316 (innermost_args): Remove.
5317 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
5318 (tsubst_decl): Handle tricky specializations. Use
5319 get_innermost_template_args.
5320 (instantiate_template): Simplify handling of partial
5322 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
5323 (most_general_template): Reimplement, in a more straightforward
5325 (regenerate_decl_from_template): Tweak formatting. Use
5326 TMPL_ARGS_DEPTH for clarity.
5327 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
5329 * dump.c (dequeue_and_dump): Dump information about thunks.
5331 2000-06-01 Richard Henderson <rth@cygnus.com>
5333 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
5335 2000-06-01 Richard Henderson <rth@cygnus.com>
5337 * decl2.c (unsupported_options): Fix typo, make const.
5338 (lang_decode_option): Fix bsearch argument order.
5340 2000-06-01 Mark Mitchell <mark@codesourcery.com>
5342 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
5345 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5347 * cp-tree.h (c_get_alias_set): Deleted.
5348 * Makefile.in (decl.o): Include ../expr.h.
5349 * decl.c (expr.h): Include.
5350 (init_decl_processing): Call record_component_aliases for arrays.
5351 (grokdeclarator): Likewise.
5352 Set TREE_ADDRESSABLE for fields that aren't bitfields.
5353 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
5355 2000-05-31 Mark Mitchell <mark@codesourcery.com>
5357 Remove guiding declaration support.
5358 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
5359 (flag_guiding_decls): Remove.
5360 * call.c (build_user_type_conversion_1): Remove support for
5362 (build_new_function_call): Likewise.
5363 (build_new_op): Likewise.
5364 (build_new_method_call): Likewise.
5365 * decl.c (start_function): Likewise.
5366 * friend.c (is_friend): Likewise.
5367 (do_friend): Likewise.
5368 * decl2.c ((flag_dump_translation_unit): Make it const.
5369 (flag_guiding_decls): Remove.
5370 (unsupported_options): New variable
5371 (compare_options): New function.
5372 (lang_decode_option): Use them.
5374 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
5376 * method.c (mangle_expression): Adjust test for legal expression
5379 * pt.c (instantiate_decl): Save and restore the local
5380 specializations list.
5382 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
5384 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
5386 2000-05-30 Mark Mitchell <mark@codesourcery.com>
5388 * call.c (add_template_candidate_real): Handle member template
5389 constructors for classes with virtual bases.
5390 (build_user_type_conversion_1): Use in_charge_arg_for_name.
5391 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
5393 * ir.texi: Update thunk documentation.
5395 * call.c (joust): Fix handling of overloaded builtin operators.
5397 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
5399 * cp-tree.h (DECL_ANTICIPATED): New macro.
5400 Document new use of DECL_LANG_FLAG_7.
5401 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
5402 in the user namespace.
5403 * lex.c (do_identifier): If the identifier's declaration has
5404 DECL_ANTICIPATED on, it has not yet been declared. But do not
5405 replace it with an ordinary implicit declaration.
5407 * tinfo2.cc: Include stdlib.h.
5409 2000-05-29 Mark Mitchell <mark@codesourcery.com>
5411 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
5412 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
5415 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
5417 * decl2.c (lang_decode_option): Use skip_leading_substring instead
5420 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
5422 * operators.def (<?): Duplicated, should have been...
5425 2000-05-27 Alex Samuel <samuel@codesourcery.com>
5426 Mark Mitchell <mark@codesourcery.com>
5428 * cp-tree.h (ansi_opname): Make it a macro.
5429 (ansi_assopname): Likewise.
5430 (struct lang_decl_flags): Add assignment_operator_p.
5431 (struct lang_decl): Add operator_code.
5432 (DECL_VTT_PARM): Adjust.
5433 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
5434 overloaded operator.
5435 (SET_OVERLOADED_OPERATOR_CODE): New macro.
5436 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
5437 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
5438 (opname_tab): Remove.
5439 (assignop_tab): Likewise.
5440 (operator_name_info_t): New type.
5441 (operator_name_info): New variable.
5442 (assignment_operator_name_info): Likewise.
5443 (build_cp_library_fn): Remove declaration.
5444 (push_cp_library_fn): Likewise.
5445 (operator_name_string): Likewise.
5446 (build_decl_overload): Likewise.
5447 * call.c (print_z_candidates): Simplify.
5448 (build_object_call): Adjust usage of ansi_opname. Use
5449 DECL_OVERLOADED_OPERATOR_P.
5450 (op_error): Adjust operator name lookup.
5451 (build_conditional_expr): Adjust usage of ansi_opname.
5452 (build_new_op): Likewise.
5453 (build_op_delete_call): Likewise.
5454 (build_over_call): Likewise.
5455 (joust): Use DECL_OVERLOADED_OPERATOR_P.
5456 * decl.c (duplicate_decls): Copy operator_code.
5457 (init_decl_processing): Adjust parameters to push_cp_library_fn.
5458 (builtin_function): Adjust parameters to build_library_fn_1.
5459 (build_library_fn_1): Accept an overloaded operator code.
5460 (build_library_fn): Pass ERROR_MARK.
5461 (build_cp_library_fn): Accept an overloaded operator code.
5462 (push_cp_library_fn): Likewise.
5463 (grokfndecl): Tweak.
5464 (grokdeclarator): Simplify code to compute names of overloaded
5465 operators. Adjust use of ansi_opname.
5466 (ambi_op_p): Work on tree_codes, not identifiers.
5467 (unary_op_p): Likewise.
5468 (grok_op_properties): Likewise.
5469 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
5470 (lang_mark_tree): Don't try to mark the operator_code.
5471 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
5472 * error.c (dump_decl): Remove special handling for operator
5474 (dump_function_name): Likewise.
5475 (dump_expr): Adjust name lookup of operators.
5476 (op_to_string): Simplify.
5477 (assop_to_string): Likewise.
5478 * init.c (build_new_1): Adjust use of ansi_opname.
5479 * lex.c (opname_tab): Remove.
5480 (assignop_tab): Likewise.
5481 (ansi_opname): Likewise.
5482 (ansi_assopname): Likewise.
5483 (operator_name_string): Likewise.
5484 (reinit_lang_specific): Likewise.
5485 (operator_name_info): New variable.
5486 (assignment_operator_name_info): Likewise.
5487 (init_operators): New function.
5488 (init_parse): Use it.
5489 (do_identifier): Adjust use of ansi_opname.
5490 * method.c (mangle_expression): Don't use ansi_opname for
5492 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
5493 (build_decl_overload): Remove.
5494 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
5495 (do_build_assign_ref): Adjust use of ansi_opname.
5496 (synthesize_method): Likewise.
5497 (implicitly_declare_fn): Likewise.
5498 * operators.def: New file.
5499 * parse.y (operator): Adjust use of ansi_opname.
5500 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
5501 (set_mangled_name_for_template_decl): Don't play games with
5503 (special_function_p): Adjust use of ansi_opname.
5504 * typeck.c (check_return_expr): Likewise.
5505 * Make-lang.in (cc1plus): Depend on operators.def.
5506 * Makefile.in (lex.o): Likewise.
5509 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
5511 * Make-lang.in (cplib2.ready): Eradicate.
5513 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5515 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
5516 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
5517 (built_min, cp_tree_equal): Likewise.
5519 2000-05-26 Mark Mitchell <mark@codesourcery.com>
5521 * class.c (layout_nonempty_base_or_field): Replace
5522 `record_layout_info' with `record_layout_info_s'.
5524 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
5527 * cp-tree.h (struct language_function): x_named_labels is now
5528 a struct named_label_list*.
5529 * decl.c (struct named_label_use_list): Renamed from...
5530 (struct named_label_list): ...this. New struct.
5531 (push_binding_level): Don't set eh_region.
5532 (note_level_for_eh): New fn.
5533 (pop_label): Take label and old value directly.
5534 (pop_labels): Adjust for new named_labels format.
5535 (lookup_label): Likewise.
5536 (poplevel): Note characteristics of a binding level containing a
5537 named label. Mess with named label lists earlier.
5538 (mark_named_label_lists): New fn.
5539 (mark_lang_function): Call it.
5540 (use_label): New fn, split out from...
5541 (make_label_decl): ...here. Don't call it.
5542 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
5543 check_previous_gotos): New fns, split out from...
5544 (define_label): ...here.
5545 (check_switch_goto): New fn.
5546 (define_case_label): Call it.
5547 (check_goto): New fn.
5548 * semantics.c (finish_goto_stmt): Call it and use_label.
5549 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
5550 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
5552 2000-05-26 Mark Mitchell <mark@codesourcery.com>
5554 * class.c (build_vtable_entry_ref): Correct usage of
5555 get_vtbl_decl_for_binfo.
5557 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
5558 * method.c (implicitly_declare_fn): Not here.
5560 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
5562 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
5563 (CPTI_PTMD_DESC_TYPE): ... here.
5564 (ptmd_desc_type_node): Rename to ...
5565 (ptm_desc_type_node): ... here.
5567 * rtti.c (ptmd_initializer): Rename to ...
5568 (ptm_initializer): ... here.
5569 (sythesize_tinfo_var): Adjust. Deal with pointer to member
5571 (create_tinfo_types): Adjust.
5573 2000-05-25 Mark Mitchell <mark@codesourcery.com>
5575 Finish implementation of VTTs.
5576 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
5577 CPTI_VTT_PARM_IDENTIFIER.
5578 (vtt_parm_identifier): New macro.
5579 (vtt_parm_type): Likewise.
5580 (BINFO_SUBVTT_INDEX): Likewise.
5581 (BINFO_VPTR_INDEX): Likewise.
5582 (struct lang_decl): Add vtt_parm.
5583 (DECL_VTT_PARM): New macro.
5584 (DECL_USE_VTT_PARM): Likewise.
5585 (DECL_NEEDS_VTT_PARM_P): Likewise.
5586 (get_vtt_name): Declare.
5587 (build_artifical_parm): Likewise.
5588 (fixup_all_virtual_upcast_offsets): Likewise.
5589 (expand_indirect_vtbls_init): Remove.
5590 * call.c (build_new_method_call): Pass the vtt to subobject
5591 constructors and destructors.
5592 * class.c (get_vtt_name): Give it external linkage.
5593 (build_clone): Handle the magic VTT parameters for clones.
5594 (clone_function_decl): Fix typo in comment.
5595 (build_vtt): Keep track of the indices in the VTTs where various
5596 entities are stored.
5597 (build_vtt_inits): Likewise.
5598 (dfs_build_vtt_inits): Likewise.
5599 (build_ctor_vtbl_group): Tweak type of construction vtables.
5600 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
5601 primary bases, when building construction vtables.
5602 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
5603 (initialize_predefined_identifiers): Add vtt_parm_identifier.
5604 (init_decl_processing): Initialize vtt_parm_type.
5605 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
5606 (lang_mark_tree): Make vtt_parm.
5607 * decl2.c (build_artificial_parm): New function.
5608 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
5609 (grokclassfn): Use build_artificial_parm.
5610 * init.c (initialize_vtbl_ptrs): Call
5611 fixup_all_virtual_upcast_offsets directly.
5612 (perform_member_init): Use the complete subobject destructor for
5614 (build_vtbl_address): New function.
5615 (expand_virtual_init): Handle VTTs.
5616 * optimize (maybe_clone_body): Likewise.
5617 * search.c (fixup_all_virtual_upcast_offsets): Give it external
5619 (expand_indirect_vtbls_init): Remove.
5620 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
5621 * tree.c (make_binfo): Make them bigger.
5623 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
5625 * inc/cxxabi.h (__pbase_type_info): Define, based on
5626 __pointer_type_info.
5627 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
5628 (__pointer_to_member_type_info): Likewise.
5629 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
5630 (__pointer_to_member_type_info::__is_pointer_p): Remove.
5631 (__pointer_type_info::__do_catch): Rename to ...
5632 (__pbase_type_info::__do_catch): ... here. Adjust.
5633 (__pbase_type_info::__pointer_catch): Implement.
5634 (__pointer_type_info::__pointer_catch): Adjust.
5635 (__pointer_to_member_type_info::__pointer_catch): Adjust.
5637 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
5639 * tinfo.h (__user_type_info::contained_virtual_p): New
5641 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
5643 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
5644 diamond shaped heirarchy. Add early out for mixed diamond and
5645 duplicate shaped heirarchy.
5647 2000-05-24 Mark Mitchell <mark@codesourcery.com>
5649 * cp-tree.h (build_delete): Change prototype.
5650 (build_vec_delete): Likewise.
5651 * call.c (build_scoped_method_call): Use special_function_kind
5652 values to indicate the kind of destruction to be done.
5653 (build_method_call): Likewise.
5654 * decl.c (finish_destructor_body): Likewise.
5655 (maybe_build_cleanup_1): Likewise. Rename to ...
5656 (maybe_build_cleanup): ... this.
5657 * decl2.c (delete_sanity): Use special_function_kind
5658 values to indicate the kind of destruction to be done.
5659 (build_cleanup): Likewise.
5660 * init.c (perform_member_init): Likewise.
5661 (build_vec_delete_1): Likewise.
5662 (build_dtor_call): Simplify.
5663 (build_delete): Use special_function_kind
5664 values to indicate the kind of destruction to be done.
5665 (build_vbase_delete): Likewise.
5666 (build_vec_delete): Likewise.
5668 * init.c (sort_member_init): Fix typo in error message generation
5671 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
5673 * semantics.c (begin_class_definition): make the packed
5674 attribute be sensitive to the "-fpack-struct" command line flag
5676 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
5678 Update new-abi upcast algorithm.
5679 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
5680 prototype and meaning of return value.
5681 (__si_class_type_info::__do_upcast): Likewise.
5682 (__vmi_class_type_info::__do_upcast): Likewise.
5683 * tinfo.cc (__class_type_info::__upcast_result): Replace
5684 whole2dst with part2dst. Adjust ctor.
5685 (__class_type_info::__do_upcast): Adjust call of worker function.
5686 (__class_type_info::__do_upcast): Adjust.
5687 (__si_class_type_info::__do_upcast): Adjust. Use parent's
5689 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
5690 virtual base in diamond heirarchy bug.
5692 2000-05-23 Mark Mitchell <mark@codesourcery.com>
5694 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
5695 and bitfield to tinfo_fn_p.
5696 (DECL_TINFO_FN_P): Adjust.
5697 (SET_DECL_TINFO_FN_P): Likewise.
5698 (DECL_MUTABLE_P): Likewise.
5699 (DECL_C_BIT_FIELD): Likewise.
5700 (SET_DECL_C_BIT_FIELD): Likewise.
5701 (CLEAR_DECL_C_BIT_FIELD): Likewise.
5702 (DECL_UNINLINABLE): Likewise.
5703 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
5704 (handle_using_decl): Remove assertion.
5705 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
5706 to build FIELD_DECLs.
5707 (build_base_field): Likewise.
5708 (layout_class_type): Likewise.
5709 * decl.c (init_decl_processing): Likewise.
5710 (build_ptrmemfunc_type): Likewise.
5711 (grokdeclarator): Likewise.
5712 * decl2.c (grok_x_components): Likewise.
5713 * except.c (call_eh_info): Likewise.
5714 * init.c (init_init_processing): Likewise.
5715 * rtti.c (expand_class_desc): Likewise.
5716 (create_pseudo_type_info): Likewise.
5717 (get_vmi_pseudo_type_info): Likewise.
5718 (create_tinfo_types): Likewise.
5719 * ptree.c (print_lang_decl): Adjust.
5720 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
5721 before checking DECL_MUTABLE_P.
5723 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
5724 parameters for template functions.
5725 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
5726 destructors as well as constructors.
5728 2000-05-22 Mark Mitchell <mark@codesourcery.com>
5730 * class.c (build_ctor_vtbl_group): Set inits.
5731 * optimize.c (maybe_clone_body): Set DECL_INLINE and
5732 DECL_THIS_INLINE appropriately for clones.
5734 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
5735 (DECL_CONV_FN_P): Simplify.
5736 (DECL_OPERATOR): Remove.
5737 (language_to_string): Declare.
5738 * decl.c (duplicate_decls): Fix typo in comment.
5739 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
5740 (grok_op_properties): Use DECL_CONV_FN_P instead of
5741 IDENTIFIER_TYPENAME_P.
5742 * dump.c (dequeue_and_dump): Dump the language linkage of
5744 * error.c (language_to_string): Give it external linkage.
5745 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
5746 (implicitly_declare_fn): Set DECL_LANGUAGE.
5747 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
5748 IDENTIFIER_TYPENAME_P.
5749 (tsubst_decl): Likewise.
5750 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
5751 * semantics.c (finish_member_declaration): Don't mark members of
5752 classes declared in an extern "C" region as extern "C".
5754 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5756 * decl2.c (qualified_lookup_using_namespace): Look through
5759 * decl.c (push_using_decl): Return the old decl on namespace level.
5761 2000-05-21 Mark Mitchell <mark@codesourcery.com>
5763 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
5764 (VTT_NAME_PREFIX): New macro.
5765 (CTOR_VTBL_NAME_PREFIX): Likewise.
5766 (get_ctor_vtbl_name): New function.
5767 * class.c (get_vtable_name): Simplify.
5768 (get_vtt_name): New function.
5769 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
5770 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
5771 when a virtual base becomes primary.
5772 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
5774 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
5775 additional parameters.
5776 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
5777 (initialize_array): New function.
5778 (build_vtt): Likewise.
5779 (build_vtt_inits): Likewise.
5780 (dfs_build_vtt_inits): Likewise.
5781 (dfs_fixup_binfo_vtbls): Likewise.
5782 (build_ctor_vtbl_group): Likewise.
5783 (initialize_vtable): Use initialize_array.
5784 (accumulate_vtbl_inits): Reimplement to handle construction
5786 (dfs_accumulate_vtbl_inits): Likewise.
5787 (bulid_vtbl_initializer): Adjust parameter name.
5788 * method.c (build_typename_overload): Remove #if 0'd code.
5789 (get_ctor_vtbl_name): New function.
5790 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
5791 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
5793 * cp-tree.h (struct lang_type): Remove search_slot.
5794 (CLASSTYPE_SEARCH_SLOT): Remove.
5795 (emit_base_init): Change prototype.
5796 (initialize_vtbl_ptrs): Likewise.
5797 (expand_indirect_vtbls_init): Likewise.
5798 (clear_search_slots): Remove.
5799 * decl.c (lang_mark_tree): Don't mark search_slot.
5800 * init.c (initialize_vtbl_ptrs): Simplify.
5801 (emit_base_init): Likewise.
5802 * search.c (struct vbase_info): Document decl_ptr.
5803 (convert_pointer_to_single_level): Remove.
5804 (dfs_find_vbases): Remove.
5805 (dfs_init_base_pointers): Simplify.
5806 (dfs_clear_vbase_slots): Remove.
5807 (dfs_vtable_path_unmark): New function.
5808 (init_vbase_pointers): Simplify.
5809 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
5810 (expand_indirect_vtbls_init): Simplify. Don't call
5811 mark_all_temps_used.
5812 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
5813 initialize_vtbl_ptrs.
5815 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
5817 * except.c: Add static prototypes.
5819 2000-05-20 H.J. Lu <hjl@gnu.org>
5821 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
5823 2000-05-19 Mark Mitchell <mark@codesourcery.com>
5825 Don't create a separate copy of virtual bases for the
5826 CLASSTYPE_VBASECLASSES list.
5827 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
5828 (BINFO_FOR_VBASE): Remove.
5829 (CANONICAL_BINFO): Adjust.
5830 (binfo_for_vbase): New function.
5831 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
5832 instead of BINFO_FOR_VBASE.
5833 (build_vbase_pointer): Likewise.
5834 (build_secondary_vtable): Likewise.
5835 (dfs_mark_primary_bases): Likewise.
5836 (mark_primary_bases): Likewise.
5837 (layout_nonempty_base_or_field): Likewise.
5838 (dfs_set_offset_for_shared_vbases): Likewise.
5839 (dfs_set_offset_for_unshared_vbases): Likewise.
5840 (layout_virtual_bases): Likewise. Adjust for changes to the
5841 CLASSTYPE_VBASECLASSES list.
5842 (dump_class_hierarchy_r): Use binfo_for_vbase
5843 instead of BINFO_FOR_VBASE.
5844 (dump_class_hierarchy): Likewise.
5845 (finish_vtbls): Likewise.
5846 (build_vtbl_initializer): Adjust for changes to the
5847 CLASSTYPE_VBASECLASSES list.
5848 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
5849 * decl.c (finish_destructor_body): Adjust for changes to the
5850 CLASSTYPE_VBASECLASSES list.
5851 * init.c (sort_base_init): Use binfo_for_vbase.
5852 (construct_virtual_bases): Adjust for changes to the
5853 CLASSTYPE_VBASECLASSES list.
5854 (expand_member_init): Use binfo_for_vbase.
5855 (build_vbase_delete): Adjust for changes to the
5856 CLASSTYPE_VBASECLASSES list.
5857 * method.c (do_build_copy_constructor): Likewise.
5858 * rtti.c (get_base_offset): Use binfo_for_vbase.
5859 (expand_class_desc): Remove #if 0'd code.
5860 * search.c (struct vbase_info): Remove vbase_types.
5861 (get_base_distance): Use binfo_for_vbase.
5862 (lookup_field_queue_p): Use CANONICAL_BINFO.
5863 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
5864 (get_pure_virtuals): Adjust for changes to the
5865 CLASSTYPE_VBASECLASSES list.
5866 (dfs_find_vbases): Use binfo_for_vbase.
5867 (dfs_init_vbase_pointers): Likewise.
5868 (init_vbase_pointers): Don't initialize vi.vbase_types.
5869 (virtual_context): Use binfo_for_vbase.
5870 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
5871 CLASSTYPE_VBASECLASSES list.
5872 (expand_indirect_vtbls_init): Simplify.
5873 (dfs_get_vbase_types): Don't replicate virtual bases.
5874 (find_vbase_instance): Use binfo_for_vbase.
5875 (binfo_for_vbase): New function.
5876 * typeck.c (get_delta_difference): Use binfo_for_vbase.
5878 2000-05-17 Mark Mitchell <mark@codesourcery.com>
5880 * decl2.c (finish_anon_union): Generalize error messages to handle
5881 anonymous structures.
5882 * init.c (perform_member_init): Remove `name' parameter.
5883 (build_field_list): New function.
5884 (sort_member_init): Handle anonymous union initialization order
5885 correctly. Check for multiple initializations of the same union.
5886 (emit_base_init): Don't look up fields by name here.
5887 (expand_member_init): Record the result of name lookup for future
5889 * typeck.c (build_component_ref): Fix formatting.
5891 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
5893 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
5894 * typeck.c (build_x_compound_expr): Replace warn_unused with
5897 * decl2.c (lang_decode_option): Update -Wall unused flags by
5898 calling set_Wunused.
5900 2000-05-16 Mark Mitchell <mark@codesourcery.com>
5902 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
5903 * init.c (dfs_vtable_path_unmark): Remove.
5904 * search.c (marked_new_vtable_p): Likewise.
5905 (unmarked_new_vtable_p): Likewise.
5906 (dfs_search_slot_nonempty_p): Likewise.
5907 (dfs_mark): Likewise.
5908 (dfs_vtable_path_unmark): Likewise.
5909 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
5910 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
5911 (dfs_init_vbase_pointers): Remove special-case new ABI code.
5912 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
5913 (init_vbase_pointers): Simplify.
5914 (expand_indirect_vtbls_init): Likewise.
5916 * class.c (copy_virtuals): New function.
5917 (build_primary_table): Use it.
5918 (build_secondary_vtable): Likewise.
5919 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
5920 indicate that no vcall offset is required.
5921 (add_virtual_function): Likewise.
5922 (modify_all_vtables): Likewise.
5923 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5924 (dfs_accumulate_vtbl_inits): Likewise.
5925 (build_vtbl_initializer): Make changes to handle construction
5927 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5928 (build_rtti_vtbl_entries): Likewise.
5929 (build_vtable_entries): Handle a NULL vcall_index.
5931 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
5933 * decl2.c (lang_decode_option): Fix thinko.
5935 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
5937 * except.c (check_handlers): New fn.
5938 * cp-tree.h: Declare it.
5939 * semantics.c (finish_handler_sequence): Call it.
5940 (finish_function_handler_sequence): Likewise.
5941 (finish_handler_parms): Set TREE_TYPE on the handler.
5942 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
5943 * search.c (get_base_distance_recursive): If protect>1, ignore
5945 (get_base_distance): Don't reduce watch_access.
5947 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
5949 * lex.c: #include diagnostic.h.
5950 (lang_init_options): Set default prefixing rules.
5952 * lang-options.h: Add -fdiagnostics-show-location=.
5954 * decl2.c: #include diagnostic.h.
5955 (lang_decode_option): Handle -fdiagnostics-show-location=.
5957 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
5959 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
5960 * vec.cc: Revert my 2000-05-07 change.
5962 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
5964 * class.c (check_field_decls): Complain about non-static data
5965 members with same name as class in class with constructor.
5967 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
5969 * decl.c (grokdeclarator): Allow non-static data members with
5972 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
5974 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
5975 and pending_inline.filename. Update prototypes.
5976 * decl.c (define_label): Constify filename parameter.
5977 * decl2.c (warn_if_unknown_interface): Constify local char *.
5978 * input.c Constify input_source.filename. Don't declare
5979 input_filename or lineno. Constify filename parameter to feed_input.
5980 * lex.c (init_parse): Constify parameter and return value.
5981 (cp_pragma_interface, cp_pragma_implementation): Constify
5983 (reinit_parse_for_method, reinit_parse_for_block,
5984 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
5985 Constify local char *.
5986 * pt.c: Don't declare lineno or input_filename.
5987 (print_template_context, tsubst_friend_function, tsubst_decl,
5988 tsubst, instantiate_decl): Constify local char *.
5989 * semantics.c (expand_body): Constify local char *.
5990 * tree.c (build_srcloc): Constify filename parameter.
5991 * typeck.c (c_expand_asm_operands): Constify filename
5994 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
5996 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
5999 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
6001 * inc/cxxabi.h: Fix typos in comment.
6002 (__base_class_info::__offset): Use a static_cast.
6004 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
6006 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
6007 of std::size_t and std::ptrdiff_t respectively.
6008 * tinfo.cc: Likewise.
6011 2000-05-06 Richard Henderson <rth@cygnus.com>
6013 * typeck.c (build_c_cast): Don't warn integer->pointer size
6014 mismatch for constants.
6016 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
6018 * rtti.c (ptmd_initializer): Set non-public, if class is
6021 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
6022 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6023 __cxa_vec_delete): Likewise.
6024 * tinfo.cc (__dynamic_cast): Likewise.
6025 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6026 __cxa_vec_delete): Likewise.
6028 2000-05-04 Mark Mitchell <mark@codesourcery.com>
6030 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
6031 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
6032 (lang_decl_flags): Add vcall_offset.
6033 (THUNK_VCALL_OFFSET): Use it.
6034 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
6035 * method.c (make_thunk): Create the lang_decl here, not in
6037 (emit_thunk): Make generic thunks into ordinary functions once
6038 they have been fed to expand_body.
6039 * semantics.c (expand_body): Set current_function_is_thunk here.
6041 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6043 * class.c (update_vtable_entry_for_fn): Prototype.
6045 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
6048 * search.c (dfs_build_inheritance_graph_order): Prototype.
6050 2000-05-04 Mark Mitchell <mark@codesourcery.com>
6052 * cp-tree.h (special_function_kind): Add various kinds of
6054 (special_function_p): New function.
6055 * class.c (overrides): Don't let one kind of destructor override
6057 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
6058 whether or not to instantiate a template.
6059 * tree.c (special_function_p): Define.
6061 2000-05-03 Mark Mitchell <mark@codesourcery.com>
6063 * cp-tree.def (THUNK_DECL): Remove.
6064 * cp-tree.h (DECL_THUNK_P): New macro.
6065 (DECL_NON_THUNK_FUNCTION_P): Likewise.
6066 (DECL_EXTERN_C_FUNCTION_P): Likewise.
6067 (SET_DECL_THUNK_P): Likewise.
6068 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
6069 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
6070 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
6071 * decl.c (decls_match): Use DECL_EXTERN_C_P.
6072 (duplicate_decls): Likewise.
6073 (pushdecl): Likewise. Adjust thunk handling.
6074 (grokfndecl): Use DECL_EXTERN_C_P.
6075 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
6076 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
6077 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
6078 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
6079 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
6080 DECL_NO_STATIC_CHAIN.
6081 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
6082 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
6083 * search.c (covariant_return_p): Remove THUNK_DECL handling.
6086 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
6088 * tree.c (walk_tree): Set lineno.
6090 2000-05-01 Mark Mitchell <mark@codesourcery.com>
6092 * exception.cc: Update license notice.
6094 * new1.cc: Likewise.
6095 * new2.cc: Likewise.
6096 * tinfo.cc: Likewise.
6097 * tinfo2.cc: Likewise.
6099 * inc/cxxabi.h: Likewise.
6100 * inc/exception: Likewise.
6101 * inc/new: Likewise.
6102 * inc/new.h: Likewise.
6103 * inc/typeinfo: Likewise.
6105 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
6107 * tree.c (build_target_expr_with_type): If we already have a
6108 TARGET_EXPR, just return it.
6110 * optimize.c (initialize_inlined_parameters): Don't generate an
6111 EXPR_STMT if we can just use DECL_INITIAL.
6112 * decl.c (emit_local_var): Only make the initialization a
6113 full-expression if stmts_are_full_exprs_p.
6115 2000-05-01 Mark Mitchell <mark@codesourcery.com>
6117 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
6119 * call.c (standard_conversion): Use it.
6120 (direct_reference_binding): Likewise.
6121 (build_over_call): Likewise.
6122 (is_properly_derived_from): Likewise.
6123 (compare_ics): Likewise.
6124 * class.c (resolves_to_fixed_type_p): Likewise.
6125 * optimize.c (declare_return_variable): Likewise.
6126 * pt.c (is_specialization_of): Likewise.
6128 * typeck.c (comp_target_parms): Likeiwse.
6129 (build_static_cast): Likewise.
6130 (build_reinterpret_cast): Likewise.
6131 (build_const_cast): Likewise.
6132 (comp_ptr_ttypes_real): Likewise.
6133 (comp_ptr_ttypes_const): Likewise.
6134 * typeck2.c (process_init_constructor): Likewise.
6136 2000-04-30 Scott Snyder <snyder@fnal.gov>
6138 * decl.c (finish_destructor_body): Use the base destructor when
6139 destroying virtual bases.
6141 2000-04-30 Mark Mitchell <mark@codesourcery.com>
6143 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
6145 * optimize.c (struct inline_data): Add target_exprs field.
6146 (declare_return_variable): When a function returns an aggregate,
6147 use the variable declared in the TARGET_EXPR as the remapped
6149 (expand_call_inline): Update the pending target_exprs stack.
6150 (optimize_function): Initialize the stack.
6152 * decl2.c (finish_file): Fix typo in comment.
6154 * method.c (emit_thunk): Don't try to return a `void' value.
6156 * optimize.c (initialize_inlined_parameters): If the parameter is
6157 addressable, we need to make a new VAR_DECL, even if the
6158 initializer is constant.
6160 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
6162 * decl.c (grok_op_properties): Add an extra check of argtypes.
6164 2000-04-27 Mark Mitchell <mark@codesourcery.com>
6166 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
6168 (initialize_inlined_parameters): Try to avoid creating new
6171 2000-04-27 Alex Samuel <samuel@codesourcery.com>
6173 * lex.c (my_get_run_time): Remove.
6174 (init_filename_times): Use get_run_time instead of my_get_run_time.
6175 (check_newline): Likewise.
6176 (dump_time_statistics): Likewise.
6177 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
6178 of computing elapsed time explicitly.
6180 2000-04-26 Mark Mitchell <mark@codesourcery.com>
6182 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
6183 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
6184 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
6185 before calling decl_constant_value.
6186 * class.c (check_bitfield_decl): Likewise.
6187 * cvt.c (ocp_convert): Likewise.
6188 (convert): Likewise.
6189 * decl.c (compute_array_index_type): Likewise.
6190 (build_enumerator): Likewise.
6191 * decl2.c (check_cp_case_value): Likewise.
6192 * pt.c (convert_nontype_argument): Likewise.
6194 * typeck.c (decay_conversion): Likewise.
6195 (build_compound_expr): Likewise.
6196 (build_reinterpret_cast): Likewise.
6197 (build_c_cast): Likewise.
6198 (convert_for_assignment): Likewise.
6200 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
6202 * decl.c (finish_function): Don't play games with DECL_INLINE.
6204 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
6206 * ir.texi: Correct typo.
6208 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6210 * decl.c (grokdeclarator): Reject VLAs as members.
6212 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
6214 * call.c (standard_conversion): Accept conversion between
6217 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
6219 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
6221 * decl2.c (finish_file): Remove double setup for accounting
6224 2000-04-24 Robert Lipe <robertlipe@usa.net>
6226 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
6228 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
6230 * new.cc (set_new_handler): Needs to be in std::.
6232 2000-04-23 Mark Mitchell <mark@codesourcery.com>
6234 * cp-tree.h (lang_decl): Remove pretty_function_p.
6235 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
6236 language-specific node.
6237 * decl.c (cp_make_fname_decl): Use build_decl, not
6238 build_lang_decl, to build the variables.
6239 (grokvardecl): Don't call build_lang_decl for local variables in
6241 (grokdeclarator): Don't call build_lang_decl for local type
6242 declarations in templates.
6243 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
6244 zero'd memory, rather than calling memset.
6245 * pt.c: Include hashtab.h.
6246 (local_specializations): New variable.
6247 (retrieve_local_specialization): Use it.
6248 (register_local_specialization): Likewise.
6249 (tsubst_decl): Don't assume local variables have
6251 (instantiate_decl): Set up local_specializations.
6252 * Makefile.in (HTAB_H): New variable.
6254 2000-04-23 Richard Henderson <rth@cygnus.com>
6256 * typeck.c (c_expand_asm_operands): Restore the original
6257 contents of the output list.
6259 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
6261 * ir.texi: Document complex number representation.
6263 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
6265 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
6266 (target_incomplete_p): New function.
6267 (tinfo_base_init): Create comdat NTBS name variable.
6268 (ptr_initializer): Add non_public parameter. Calculate it.
6269 (ptmd_initializer): Likewise.
6270 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
6271 (create_real_tinfo_var): Add non_public parameter. Use it.
6272 Push proxy into global namespace.
6273 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
6275 * inc/typeinfo (type_info::before, type_info::operator==):
6276 Compare __name addresses.
6278 * tinfo2.cc: Remove new-abi builtins comment.
6280 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
6282 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
6284 * call.c (joust): Exit early if we get the same function, too.
6286 * decl2.c (key_method): Return NULL_TREE for template classes.
6287 (import_export_class): Don't need to check for template classes.
6289 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
6291 * lex.c: Remove references to cccp.c.
6293 2000-04-18 Mark Mitchell <mark@codesourcery.com>
6295 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
6296 volatile_memfunc. Add destructor_attr. Adjust dummy.
6297 (DECL_DESTRUCTOR_P): Use destructor_attr.
6298 (DECL_CONST_MEMFUNC_P): Reimplement.
6299 (DECL_VOLATILE_MEMFUNC_P): Remove.
6300 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
6301 (overrides): Use DECL_DESTRUCTOR_P.
6302 (check_for_override): Likewise.
6303 * decl.c (start_function): Likewise.
6304 * decl2.c (grokfclassfn): Likewise.
6305 (check_classfn): Likewise.
6306 (grok_function_init): Likewise.
6308 2000-04-17 Mark Mitchell <mark@codesourcery.com>
6310 * decl2.c (grokfield): Issue error on illegal data member
6313 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
6315 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
6317 2000-04-16 Mark Mitchell <mark@codesourcery.com>
6319 * class.c (build_vtable_entry): Don't build thunks for type-info
6322 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
6324 * decl.c (decls_match): Allow a redeclaration of a builtin to
6325 specify args while the builtin did not.
6327 2000-04-15 Mark Mitchell <mark@codesourcery.com>
6329 * cp-tree.def (THUNK_DECL): Add to documentation.
6330 * cp-tree.h (flag_huge_objects): Declare.
6331 * class.c (modify_vtable_entry): Tidy.
6332 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
6333 Calculate delta appropriately for the new ABI.
6334 (dfs_modify_vtables): Use it.
6335 (modify_all_vtables): Fix thinko in code to add overriding copies
6336 of functions to primary vtables.
6337 (build_clone): Fix typo in comment.
6338 (clone_function_decl): Correct order of destructors in vtable.
6339 (build_vbase_offset_vtbl_entries): Adjust comment.
6340 (dfs_vcall_offset_queue_p): Remove.
6341 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
6342 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
6343 (build_vtable_entry): Correct check for pure virtual functions.
6344 Don't declare flag_huge_objects.
6345 * decl.c (flag_huge_objects): Remove declaration.
6346 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
6347 Use int_size_in_bytes.
6348 (emit_thunk): Handle vcall offset thunks.
6350 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6352 * decl2.c (parse_time, varconst_time): Delete declarations.
6353 (finish_file): Delete LINENO declaration.
6354 START_TIME and THIS_TIME now long.
6356 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
6358 * class.c (build_base_field): Reformat comment.
6360 * inc/cxxabi.h (stddef.h): Comment inclusion.
6361 (__base_class_info::__offset): Comment shift.
6363 2000-04-12 Mark Mitchell <mark@codesourcery.com>
6365 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
6366 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
6367 (cp_push_exception_identifier): New macro.
6368 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
6369 (DECL_BASE_DESTRUCTOR_P): Likewise.
6370 (DECL_DELETING_DESTRUCTOR_P): Likewise.
6371 (get_vtbl_decl_for_binfo): Fix formatting.
6372 (in_charge_arg_for_name): New macro.
6373 (maybe_build_cleanup_and_delete): Remove declaration.
6374 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
6375 (in_charge_arg_for_name): New function.
6376 (build_new_method_call): Use it. Handle cloned destructors.
6377 (build_clone): Don't make the base constructor virtual.
6378 Automatically defer generated functions.
6379 (clone_function_decl): Handle destructors, too.
6380 (clone_constructors_and_destructors): Likewise.
6381 (create_vtable_ptr): Don't create a vtable entry for a cloned
6383 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
6384 (initialize_predefined_identifiers): Update appropriately.
6385 (finish_destructor_body): Simplify.
6386 (maybe_build_cleanup_and_delete): Remove.
6387 * except.c (expand_throw): Handle new-ABI destructors.
6388 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
6389 (build_dtor_call): New function.
6390 (build_delete): Use it. Simplify.
6391 * optimize.c (maybe_clone_body): Handle destructors.
6392 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
6394 * exception.cc (cleanup_fn): New typedef.
6395 (CALL_CLEANUP): New macro.
6396 (cp_eh_info): Use them.
6397 (__cp_push_exception): Likewise.
6398 (__cp_pop_exception): Likewise.
6400 2000-04-11 Mark Mitchell <mark@codesourcery.com>
6402 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
6403 (complete_dtor_identifier): New macro.
6404 (CLASSTYPE_FIRST_CONVERSION): Remove.
6405 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
6406 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
6407 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
6408 (CLASSTYPE_CONSTRUCTORS): Likewise.
6409 (CLASSTYPE_DESTRUCTORS): Likewise.
6410 (lang_decl): Add cloned_function.
6411 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
6412 (DECL_BASE_CONSTRUCTOR_P): Likewise.
6413 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
6414 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
6415 (DECL_CLONED_FUNCTION_P): Likewise.
6416 (DECL_CLONED_FUNCTION): Likewise.
6417 (clone_function_decl): Declare.
6418 (maybe_clone_body): Likewise.
6419 * call.c (build_user_type_conversion_1): Call complete object
6420 constructors in the new ABI.
6421 (build_new_method_call): Don't add in-charge parameters under the
6423 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
6424 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
6425 CLASSTYPE_DESTRUCTOR_SLOT.
6426 (build_clone): New function.
6427 (clone_function_decl): Likewise.
6428 (clone_constructors_and_destructors): Likewise.
6429 (check_bases_and_members): Use it.
6430 * decl.c (iniitialize_predefined_identifiers): Initialize
6431 complete_dtor_identifier.
6432 (finish_function): Don't add extra code to a clone.
6433 (lang_mark_tree): Mark cloned_function.
6434 * decl2.c (mark_used): Don't bother trying to instantiate things
6436 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
6437 * method.c (set_mangled_name_for_decl): Don't treat clones as
6439 (synthesize_method): Sythesize cloned functions, not the clones.
6440 * optimize.c (inline_data): Update comment on ret_label.
6441 (remap_block): Don't assume DECL_INITIAL exists.
6442 (copy_body_r): Allow ret_label to be NULL.
6443 (maybe_clone_body): Define.
6444 * pt.c (tsubst_decl): Handle clones.
6445 (instantiate_clone): New function.
6446 (instantiate_template): Use it.
6447 (set_mangled_name_for_template_decl): Don't treat clones as
6449 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
6450 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
6451 * semantics.c (expand_body): Clone function bodies as necessary.
6453 * optimize.c (remap_decl): Avoid sharing structure for arrays
6454 whose size is only known at run-time.
6455 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
6457 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
6458 to has_in_charge_parm_p.
6459 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
6460 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
6461 (DECL_COPY_CONSTRUCTOR_P): New macro.
6462 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
6463 (build_user_type_conversion_1): Likewise.
6464 (convert_like_real): Likewise.
6465 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
6466 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
6467 (copy_args_p): Likewise.
6468 (grok_ctor_properties): Likewise.
6469 (start_function): Likewise.
6470 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
6471 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
6472 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
6473 * method.c (do_build_copy_constructor): Use
6474 DECL_HAS_IN_CHARGE_PARM_P.
6475 (synthesize_method): Likewise.
6476 * pt.c (instantiate_template): Remove goto.
6477 * tree.c (build_cplus_method_type): Remove mention of obstacks in
6480 * cp-tre.h (finish_function): Change prototype.
6481 * decl.c (end_cleanup_fn): Adjust caller.
6482 (finish_function): Take only one parameter.
6483 * decl2.c (finish_objects): Adjust caller.
6484 (finish_static_storage_duration_function): Likewise.
6485 * method.c (emit_thunk): Likewise.
6486 * parse.y: Likewise.
6487 * parse.c: Regenerated.
6488 * pt.c (instantiate_decl): Likewise.
6489 * rtti.c (synthesize_tinfo_fn): Likewise.
6490 * semantics.c (expand_body): Likewise.
6492 * cp-tree.h (copy_decl): New function.
6493 * class.c (finish_struct_1): Use it.
6494 * lex.c (copy_decl): Define it.
6495 * pt.c (tsubst_decl): Likewise.
6496 * tree.c (copy_template_template_parm): Likewise.
6498 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
6499 has_nonpublic_assign_ref.
6500 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
6501 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
6502 * class.c (finish_struct_methods): Don't set
6503 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
6504 (interface_only): Don't declare.
6505 (interface_unknown): Likewise.
6507 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6509 * tree.h (HAVE_TEMPLATES): Remove definition.
6510 * lang-options.h (-fthis-is-variable): Remove documentation.
6512 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
6514 * class.c (instantiate_type): Handle object-relative template-id.
6516 * semantics.c (finish_expr_stmt): Call convert_to_void here.
6517 * decl.c (cplus_expand_expr_stmt): Not here.
6519 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
6520 Initialize exprtype earlier.
6522 * parse.y (fn.def1): Check for defining types in return types.
6524 * decl.c (check_tag_decl): Notice extra fundamental types.
6525 Diagnose empty decls in classes, too.
6527 * decl.c (grokdeclarator): Don't override an anonymous name if no
6528 declarator was given.
6530 * cvt.c (convert_to_void): Call resolve_offset_ref.
6532 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
6534 * decl2.c (decl_namespace): Handle getting a type.
6536 * typeck.c (build_c_cast): Re-enable warning for cast between
6537 pointer and integer of different size.
6539 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
6541 * inc/cxxabi.h (__pointer_type_info): Add restrict and
6543 (__pointer_type_info::__pointer_catch): New virtual function.
6544 (__pointer_to_member_type_info): Derive from
6545 __pointer_type_info. Adjust.
6546 (__pointer_to_member_type_info::__do_catch): Remove.
6547 (__pointer_to_member_type_info::__is_pointer_p): Declare.
6548 (__pointer_to_member_type_info::__pointer_catch): Declare.
6549 * rtti.c (qualifier_flags): Add restrict flag.
6550 (ptmd_initializer): Reorder members.
6551 (create_tinfo_types): Expand comments. Reorder
6552 ptmd_desc_type_node members.
6553 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
6555 (__pointer_type_info::__do_catch): Move specific code into
6556 __pointer_catch. Call it.
6557 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
6558 specific catch checking. Fix void conversion check.
6559 (__pointer_to_member_type_info::__do_catch): Remove.
6560 (__pointer_to_member_type_info::__pointer_catch): Implement.
6562 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6564 * lex.c (init_parse): Remove traces of classof and headof.
6565 * decl2.c (flag_operator_names): Default to 1.
6566 (lang_decode_option): Do not set it for -ansi.
6568 2000-04-09 Mark Mitchell <mark@codesourcery.com>
6570 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
6571 (DECL_MAIN_VARIANT): Remove.
6572 * decl.c (duplicate_decls): Don't set it.
6573 (start_function): Likewise.
6574 (lang_mark_tree): Don't mark it.
6575 * decl2.c (defer_fn): Don't use it.
6576 * lex.c (retrofit_lang_decl): Don't set it.
6577 * pt.c (tsubst_decl): Likewise.
6578 * ptree.c (print_lang_decl): Don't print it.
6579 * typeck.c (mark_addressable): Don't use it.
6581 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
6583 * vec.cc: Include <new> and <exception>.
6584 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
6585 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
6587 (__cxa_vec_delete): Catch dtor exceptions.
6589 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
6591 Prepend __ to implementation defined names.
6592 * inc/typeinfo (type_info): Rename _name to __name.
6593 (type_info::type_info): Rename parameter.
6594 (type_info::operator==, type_info::operator!=,
6595 type_info::before): Likewise.
6596 (type_info::is_pointer_p, type_info::is_function_p,
6597 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
6600 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
6601 (__pointer_type_info::__pointer_type_info): Likewise.
6602 (__pointer_type_info::is_pointer_p,
6603 __pointer_type_info::do_catch): Prepend __. Rename parameters.
6604 (__array_type_info::__array_type_info): Rename parameters.
6605 (__function_type_info::__function_type_info): Likewise.
6606 (__function_type_info::is_function_p): Prepend __.
6607 (__enum_type_info::__enum_type_info): Rename parameters.
6608 (__pointer_to_member_type_info::__pointer_to_member_type_info):
6610 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
6612 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
6613 (__class_type_info::__class_type_info): Rename parameters.
6614 (__class_type_info::sub_kind): Prepend __. Adjust member names.
6615 (__class_type_info::upcast_result,
6616 __class_type_info::dyncast_result): Prepend __. Move definition
6618 (__class_type_info::do_upcast, __class_type_info::do_catch,
6619 __class_type_info::find_public_src,
6620 __class_type_info::do_dyncast,
6621 __class_type_info::do_find_public_src): Prepend __. Rename
6623 (__si_class_type_info::__si_class_type_info): Rename parameters.
6624 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
6625 __si_class_type_info::do_find_public_src): Prepent __. Rename
6627 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
6628 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
6629 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
6631 (__dynamic_cast): Rename parameters.
6632 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
6633 type_info::do_catch, type_info::do_upcast): Prepend __.
6634 (contained_p, public_p, virtual_p, contained_public_p,
6635 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
6636 (__class_type_info::do_catch,
6637 __class_type_info::do_upcast): Prepend __. Adjust.
6638 (__class_type_info::__upcast_result,
6639 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
6641 (__class_type_info::find_public_src): Prepend __. Adjust.
6642 (__class_type_info::do_find_public_src,
6643 __si_class_type_info::do_find_public_src,
6644 __vmi_class_type_info::do_find_public_src): Likewise.
6645 (__class_type_info::do_dyncast,
6646 __si_class_type_info::do_dyncast,
6647 __vmi_class_type_info::do_dyncast): Likewise.
6648 (__class_type_info::do_upcast,
6649 __si_class_type_info::do_upcast,
6650 __vmi_class_type_info::do_upcast): Likewise.
6651 (__dynamic_cast): Adjust.
6652 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
6653 (__function_type_info::is_function_p): Likewise.
6654 (__pointer_type_info::do_catch): Likewise. Adjust.
6655 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
6656 (__throw_type_match_rtti_2): Adjust.
6657 (__is_pointer): Adjust.
6659 2000-04-08 Mark Mitchell <mark@codesourcery.com>
6661 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
6662 (complete_ctor_identifier): New macro.
6663 (special_function_kind): Add sfk_copy_constructor and
6664 sfk_assignment_operator.
6665 (LOOKUP_HAS_IN_CHARGE): Remove.
6666 (cons_up_default_function): Rename to ...
6667 (implicitly_declare_fn): ... this.
6668 * call.c (build_new_method_call): Add in-charge parameters for
6670 * class.c (add_implicitly_declared_members): Change parameter name
6671 from cant_have_assignment to cant_have_const_assignment.
6672 Replace calls to cons_up_default_function to implicitly_declare_fn.
6673 * cvt.c (ocp_convert): Use complete_ctor_identifier.
6674 * decl.c (initialize_predefined_identifiers): Initialize it.
6675 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
6677 * init.c (expand_default_init): Don't calculate the in-charge
6679 (build_new_1): Likewise.
6680 * lex.c (cons_up_default_function): Move to method.c.
6681 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
6682 (implicitly_declare_fn): New function.
6683 * typeck.c (build_static_cast): Use complete_ctor_identifier.
6684 (build_modify_expr): Likewise.
6685 * typeck2.c (build_functional_cast): Likewise.
6687 Under the new ABI, constructors don't return `this'.
6688 * cp-tree.h (warn_reorder): Declare.
6689 (special_function_kind): New enum.
6690 (global_base_init_list): Remove declaration.
6691 (emit_base_init): Don't return a value.
6692 (check_base_init): Don't declare.
6693 (is_aggr_typedef): Likewise.
6694 * decl.c (check_special_function_return_type): New function.
6695 (return_types): Remove.
6696 (grokdeclarator): Use check_special_function_return_type.
6697 (start_function): Don't initialize ctor_label under the new ABI.
6698 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
6699 * init.c (begin_init_stmts): Move to top of file.
6700 (finish_init_stmts): Likewise.
6701 (warn_reorder): Don't declare.
6702 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
6704 (check_base_init): Remove.
6705 (is_aggr_typedef): Likewise.
6706 (build_new_1): Don't use the return value of a constructor.
6707 * semantics.c (setup_vtbl_ptr): Don't use the return value
6709 * typeck.c (check_return_expr): Don't magically convert return
6710 statements into `return this' in constructors under the new ABI.
6712 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
6713 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
6714 (base_ctor_identifier): New macro.
6715 (base_dtor_identifier): Likewise.
6716 (deleting_dtor_identifier): Likewise.
6717 * decl.c: Don't include obstack.h.
6718 (obstack_chunk_alloc): Don't define.
6719 (obstack_chunk_free): Likewise.
6720 (struct predefined_identifier): New type.
6721 (initialize_predefined_identifiers): New function.
6722 (init_decl_processing): Use it.
6723 (debug_temp_inits): Remove.
6724 (start_method): Don't call preserve_data.
6725 (hack_incomplete_structures): Update comment.
6726 * init.c (init_init_processing): Don't initialize
6728 (build_offset_rf): Remove dead code.
6729 (build_delete): Use CLASSTYPE_N_BASECLASSES.
6730 * search.c (init_search_processing): Don't initialize
6733 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6735 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
6736 some sign_compare warnings.
6738 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
6740 Rename abi::__vmi_class_type_info members.
6741 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
6742 base_list, detail_masks members to vmi_flags, vmi_base_count,
6743 vmi_bases and vmi_flags_masks respectively.
6744 (__vmi_class_type_info::vmi_flags_masks): Rename
6745 details_unknown_mask to flags_unknown_mask.
6746 * tinfo.cc (__class_type_info::do_upcast): Adjust.
6747 (__vmi_class_type_info::do_find_public_src): Adjust.
6748 (__vmi_class_type_info::do_dyncast): Adjust.
6749 (__vmi_class_type_info::do_upcast): Adjust.
6751 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
6753 * tinfo.cc (convert_to_base): New function.
6754 (get_vbase_offset): Remove. Move into convert_to_base.
6755 (__vmi_class_type_info::do_find_public_src): Adjust.
6756 (__vmi_class_type_info::do_dyncast): Adjust.
6757 (__vmi_class_type_info::do_upcast): Adjust.
6759 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
6761 * tinfo.cc (operator=): Use __builtin_strcmp.
6762 * tinfo2.cc (before): Likewise.
6764 2000-04-06 Mark Mitchell <mark@codesourcery.com>
6766 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
6767 (DECL_SAVED_INLINE): Rename to ...
6768 (DECL_DEFERRED_FN): ... this.
6769 (in_function_p): Remove declaration.
6770 (mark_inline_for_output): Rename to ...
6771 (defer_fn): ... this.
6772 * decl.c (finish_function): Adjust call to mark_inline_for_output.
6773 (in_function_p): Remove definition.
6774 * decl2.c (saved_inlines): Rename to ...
6775 (deferred_fns): ... this.
6776 (saved_inlines_used): Rename to ...
6777 (deferred_fns_used): ... this.
6778 (mark_inline_for_output): Rename to ...
6779 (defer_fn): ... this.
6780 (finish_file): Adjust accordingly.
6781 (init_decl2): Likewise.
6782 * lex.c (cons_up_default_function): Likewise.
6783 * pt.c (mark_decl_instantiated): Likewise.
6784 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
6786 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
6787 * semantics.c (expand_body): Defer more functions.
6789 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
6792 * Make-lang.in (CXX_LIB2FUNCS): Add it.
6794 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6795 __cxa_vec_delete): Declare.
6797 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
6799 * rtti.c (dfs_class_hint_mark): New static function.
6800 (dfs_class_hint_unmark): New static function.
6801 (class_hint_flags): Use them.
6803 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
6805 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
6807 2000-04-05 Mark Mitchell <mark@codesourcery.com>
6809 * cp-tree.h (instantiate_decl): Change prototype.
6810 * decl2.c (mark_used): Adjust call.
6811 * optimize.c (inlinable_function_p): Adjust handling of templates.
6812 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
6813 (do_type_instantiation): Likewise.
6814 (instantiate_decl): Defer more templates.
6815 (instantiate_pending_templates): Adjust logic to handle inline
6818 * Makefile.in (GGC_H): New variable. Use it throughout in place
6821 * call.c: Don't include obstack.h. Include ggc.h.
6822 (obstack_chunk_alloc): Don't define.
6823 (obstack_chunk_free): Likewise.
6824 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
6825 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
6826 (pop_switch): Free it.
6828 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
6830 * dump.c (dequeue_and_dump): Don't try to print the bit_position
6831 if we don't have a DECL_FIELD_OFFSET.
6833 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
6835 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
6838 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6840 * cfns.gperf (hash, libc_name_p): Prototype.
6842 * rtti.c (build_dynamic_cast_1): Constification.
6844 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
6846 * semantics.c (deferred_type_access_control): Prototype.
6848 2000-04-04 Mark Mitchell <mark@codesourcery.com>
6850 Correct many new ABI issues regarding vbase and vcall offset
6852 * cp-tree.h (BINFO_VTABLE): Document.
6853 (struct lang_type): Tweak formatting.
6854 (BINFO_PRIMARY_BINFO): Add to documentation.
6855 (CLASSTYPE_VSIZE): Fix typo in comment.
6856 (CLASSTYPE_VBASECLASSES): Update documentation.
6857 (BINFO_VBASE_MARKED): Remove.
6858 (SET_BINFO_VBASE_MARKED): Likewise.
6859 (CLEAR_BINFO_VBASE_MARKED): Likewise.
6860 (BINFO_FIELDS_MARKED): Remove.
6861 (SET_BINFO_FIELDS_MARKED): Likewise.
6862 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
6863 (enum access_kind): New enumeration.
6864 (num_extra_vtbl_entries): Remove declaration.
6865 (size_extra_vtbl_entries): Likewise.
6866 (get_vtbl_decl_for_binfo): New function.
6867 (dfs_vbase_unmark): Remove declaration.
6868 (mark_primary_bases): Likewise.
6869 * class.c (SAME_FN): Remove.
6870 (struct vcall_offset_data_s): Move definition.
6871 (build_vbase_pointer): Use `build', not `build_binary_op', to
6872 access the vbase pointer under the new ABI.
6873 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
6874 (build_primary_vtable): Likewise.
6875 (dfs_mark_primary_bases): Move here from search.c.
6876 (mark_primary_bases): Likewise.
6877 (determine_primary_bases): Under the new ABI, don't make a base
6878 class a primary base just because we don't yet have any virtual
6880 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
6881 (num_vfun_entries): Remove.
6882 (dfs_count_virtuals): Likewise.
6883 (num_extra_vtbl_entries): Likewise.
6884 (size_extra_vtbl_entries): Likewise.
6885 (layout_virtual_bases): Iterate in inheritance graph order under
6887 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
6888 indicate that a vfield is present.
6889 (init_class_processing): Initialize access_public_node, etc., from
6891 (get_vtbl_decl_for_binfo): New function.
6892 (dump_class_hierarchy_r): Likewise.
6893 (dump_class_hierarchy): Use it.
6894 (finish_vtbls): Build the vtbls in inheritance graph order.
6895 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6896 (initialize_vtable): Use get_vtbl_decl_for_binfo.
6897 (accumulate_vtbl_inits): Add comments explaining why a pre-order
6899 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
6900 where the vptr points, even for primary vtables.
6901 (build_vtbl_initializer): Adjust handling of vbase and vcall
6903 (build_vcall_and_vbase_vtable_entries): New function.
6904 (dfs_build_vbase_offset_vtbl_entries): Remove.
6905 (build_vbase_offset_vtbl_entries): Reimplement.
6906 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
6907 were already handled in a primary base class vtable.
6908 (build_vcall_offset_vtbl_entries): Adjust.
6909 (build_rtti_vtbl_entries): Adjust.
6910 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
6911 * init.c (expand_virtual_init): Simplify.
6912 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
6913 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
6914 * search.c (BINFO_ACCESS): New macro.
6915 (SET_BINFO_ACCESS): Likewise.
6916 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
6917 (access_in_type): Likewise.
6918 (dfs_accessible_p): Likewise.
6919 (protected_accessible_p): Likewise.
6920 (lookup_fnfields_1): Adjust documentation.
6921 (dfs_mark_primary_bases): Move to class.c
6922 (mark_primary_bases): Likewise.
6923 (dfs_vbase_unmark): Remove.
6924 (virtual_context): Use BINFO_FOR_VBASE.
6925 (dfs_get_vbase_types): Simplify.
6926 (dfs_build_inheritance_graph_order): New function.
6927 (get_vbase_types): Use it.
6928 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
6930 * tinfo.cc (get_vbase_offset): New function.
6931 (__vmi_class_type_info::do_find_public_src): Use it.
6932 (__vmi_class_type_info::do_dyncast): Likewise.
6933 (__vmi_class_type_info::do_upcast): Likewise.
6935 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
6937 * lang-specs.h: Pass -fno-show-column to the preprocessor.
6939 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
6941 * rtti.c (class_hint_flags): Rename flags.
6942 (class_initializer): Remove flags.
6943 (synthesize_tinfo_var): Combine offset and flags. Add flags
6944 for __vmi_class_type_info.
6945 (create_tinfo_types): Remove flags from __class_type_info and
6946 __si_class_type_info. Merge flags and offset from
6947 base_class_type_info.
6948 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
6949 (__base_class_info::is_virtual_p): Adjust.
6950 (__base_class_info::is_public_p): Adjust.
6951 (__base_class_info::offset): New accessor.
6952 (__class_type_info::details): Remove member.
6953 (__class_type_info::__class_type_info): Lose details.
6954 (__class_type_info::detail_masks): Remove.
6955 (__si_class_type_info::__si_class_type_info): Lose details.
6956 (__vmi_class_type_info::details): New member.
6957 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
6958 (__vmi_class_type_info::detail_masks): New member.
6959 * tinfo.cc (__class_type_info::do_upcast): Initialize result
6960 with unknown_details_mask.
6961 (__vmi_class_type_info::do_find_public_src): Adjust
6962 (__vmi_class_type_info::do_dyncast): Adjust.
6963 (__vmi_class_type_info::do_upcast): Set result details, if
6965 (__dynamic_cast): Temporarily #if out optimization.
6967 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
6969 * rtti.c (get_tinfo_decl): Mark used.
6970 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
6971 mark as dealt with, if we output it.
6973 2000-03-28 Mark Mitchell <mark@codesourcery.com>
6975 * class.c: Reorganize to put virtual function table initialization
6976 machinery at the end of the file.
6978 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
6980 * class.c (finish_struct): Use bitsize_zero_node.
6981 * pt.c (instantiate_class_template): Likewise.
6983 2000-03-28 Mark Mitchell <mark@codesourcery.com>
6985 Put RTTI entries at negative offsets in new ABI.
6986 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
6987 vbase offset at index -3, not -1.
6988 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
6989 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
6990 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
6991 (build_rtti_vtbl_entries): New function.
6992 (set_rtti_entry): Remove.
6993 (build_primary_vtable): Don't use it.
6994 (build_secondary_vtable): Likewise.
6995 (start_vtable): Remove.
6996 (first_vfun_index): New function.
6997 (set_vindex): Likewise.
6998 (add_virtual_function): Don't call start_vtable. Do call
7000 (set_primary_base): Rename parameter.
7001 (determine_primary_base): Likewise.
7002 (num_vfun_entries): Don't use skip_rtti_stuff.
7003 (num_extra_vtbl_entries): Include RTTI information.
7004 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
7005 (skip_rtti_stuff): Remove.
7006 (dfs_modify_vtables): Don't use it.
7007 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
7008 (layout_nonempty_base_or_field): Update size handling.
7009 (create_vtable_ptr): Tweak.
7010 (layout_class_type): Adjust parameter names.
7011 (finish_struct_1): Simplify.
7012 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
7013 (skip_rtti_stuff): Remove.
7014 (first_vfun_index): New function.
7015 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7016 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
7017 (marked_vtable_pathp): Declare.
7018 (unmarked_vtable_pathp): Likewise.
7019 * error.c (dump_expr): Use first_vfun_index to calculate vtable
7021 * rtti.c (build_headof): Look for RTTI at negative offsets.
7022 (get_tinfo_decl_dynamic): Likewise.
7023 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
7025 (create_pseudo_type_info): Do it here instead. Adjust so that
7026 vptr points at first virtual function.
7027 * search.c (marked_vtable_pathp): Make it global.
7028 (unmarked_vtable_pathp): Likewise.
7029 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7030 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7031 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
7032 (get_pure_virtuals): Likewise.
7033 (expand_upcast_fixups): Likewise.
7034 * tree.c (debug_binfo): Likewise.
7035 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
7038 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7040 * class.c (check_field_decl): Fix typo.
7041 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
7042 (check_methods): Likewise.
7043 (check_field_decls): Likewise.
7044 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
7045 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
7046 Use DECL_RESULT_FLD, not DECL_RESULT.
7047 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
7048 * lex.c (identifier_type): Likewise.
7049 * pt.c (determine_specialization, lookup_template_class): Likewise.
7050 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
7051 (resolve_overloaded_unification, more_specialized): Likewise.
7052 * semantics.c (finish_member_declaration): Likewise.
7053 * typeck.c (build_x_function_call): Likewise.
7055 2000-03-26 Mark Mitchell <mark@codesourcery.com>
7057 * class.c (layout_empty_base): Handle empty bases with non-byte
7059 (build_base_field): Likewise.
7060 (layout_virtual_bases): Likewise.
7062 * class.c (finish_struct_1): Fix typo in this change:
7064 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7066 2000-03-25 Mark Mitchell <mark@codesourcery.com>
7068 * decl.c (grokdeclarator): Count partial specializations when
7069 keeping track of how many template classes have been seen.
7071 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
7073 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7075 * class.c (build_vbase_pointer_fields): layout_field now place_field.
7076 (get_vfield_offset): Use byte_position.
7077 (set_rtti_entry): Set OFFSET to ssizetype zero.
7078 (get_binfo_offset_as_int): Deleted.
7079 (dfs_record_base_offsets): Use tree_low_cst.
7080 (dfs_search_base_offsets): Likewise.
7081 (layout_nonempty_base_or_field): Reflect changes in RLI format
7082 and call byte_position.
7083 (layout_empty_base): Convert offset to ssizetype.
7084 (build_base_field): use rli_size_unit_so_far.
7085 (dfs_propagate_binfo_offsets): Do computation in proper type.
7086 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
7087 (layout_class_type): Reflect changes in RLI names and fields.
7088 (finish_struct_1): Set DECL_FIELD_OFFSET.
7089 * dump.c (dequeue_and_dump): Call bit_position.
7090 * expr.c (cplus_expand_constant): Use byte_position.
7091 * rtti.c (expand_class_desc): Use bitsize_one_node.
7092 * typeck.c (build_component_addr): Use byte_position and don't
7093 special case for zero offset.
7095 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
7097 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
7099 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
7101 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
7104 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7106 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
7108 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
7109 make_typename_type, check_initializer, cp_finish_decl,
7110 xref_tag): Likewise.
7111 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
7112 decl_namespace, arg_assoc_template_arg, arg_assoc,
7113 validate_nonmember_using_decl, do_class_using_decl): Likewise.
7114 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
7115 args_to_string): Likewise.
7116 * friend.c (is_friend): Likewise.
7117 * lex.c (note_got_semicolon, note_list_got_semicolon,
7118 is_global): Likewise.
7119 * method.c (build_overload_nested_name, build_overload_value,
7120 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
7121 * parse.y (typename_sub, typename_sub1): Likewise.
7122 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
7123 process_partial_specialization, convert_template_argument,
7124 template_args_equal, add_pending_template, lookup_template_class,
7125 for_each_template_parm_r, maybe_fold_nontype_arg,
7126 tsubst, instantiate_template, type_unification_real, unify,
7127 instantiate_pending_templates, set_mangled_name_for_template_decl):
7129 * repo.c (repo_get_id, repo_template_used): Likewise.
7130 * search.c (lookup_field_1): Likewise.
7131 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
7132 * xref.c (classname): Likewise.
7134 2000-03-22 Mark Mitchell <mark@codesourcery.com>
7136 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
7137 (CANONICAL_BINFO): New macro.
7138 (BINFO_NEW_VTABLE_MARKED): Use it.
7139 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
7140 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
7141 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
7143 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7144 (build_secondary_vtable): Likewise.
7145 (dfs_finish_vtbls): Likewise.
7146 (dfs_accumulate_vtbl_inits): Likewise.
7147 (accumulate_vtbl_inits): New function.
7148 (finish_vtbls): Make sure that virtual bases come after
7149 non-virtual bases in the vtable group.
7150 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
7151 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7152 * search.c (struct vbase_info): Move definition.
7153 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7154 (unmarked_new_vtable_p): Likewise.
7155 (dfs_mark_vtable_path): Remove.
7156 (dfs_mark_new_vtable): Remove.
7157 (dfs_unmark_new_vtable): Likewise.
7158 (dfs_clear_search_slot): Likewise.
7159 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7160 (dfs_clear_vbase_slots): Likewise.
7161 (init_vbase_pointers): LIkewise.
7163 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
7165 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
7166 SIZETYPE to a non-SIZETYPE.
7168 2000-03-21 Mark Mitchell <mark@codesourcery.com>
7170 * class.c (layout_virtual_bases): Adjust names in conditionally
7173 * class.c (record_base_offsets): New function.
7174 (layout_conflict_p): Likewise.
7175 (layout_nonempty_base_or_field): Use it.
7176 (layout_empty_base): New function.
7177 (build_base_field): Use it.
7178 (build_base_fields): Update comment.
7179 (layout_virtual_bases): Fold in a little code form
7180 layout_basetypes. Use layout_empty_base.
7181 (layout_basetypes): Remove.
7182 (end_of_class): New function.
7183 (layout_class_type): Use it. Adjust.
7185 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
7187 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
7189 (dfs_skip_nonprimary_vbases_markedp): Likewise.
7190 * typeck.c (fntype_p): Remove.
7192 * cp-tree.h (TI_SPEC_INFO): Remove.
7193 (CLASSTYPE_TI_SPEC_INFO): Likewise.
7194 * pt.c (process_partial_specialization): Likewise.
7196 * class.c (build_base_field): Fix thinko in computation of binfo
7199 * tree.c (mark_local_for_remap_p): Mark variables declared in
7200 TARGET_EXPRs as well.
7202 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
7204 * typeck.c (require_complete_type, complete_type,
7205 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
7206 build_array_ref, convert_arguments, pointer_diff,
7207 build_x_unary_op, build_unary_op, build_c_cast,
7208 build_modify_expr): Use COMPLETE_TYPE_P etc.
7209 * call.c (is_complete, convert_like_real,
7210 build_new_method_call): Likewise.
7211 * class.c (build_vbase_pointer_fields, check_bases,
7212 build_base_field, finish_struct_1, pushclass): Likewise.
7213 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
7214 * decl.c (maybe_process_template_type_declaration, pushtag,
7215 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
7216 layout_var_decl, check_initializer, cp_finish_decl,
7217 grokdeclarator, require_complete_types_for_parms,
7218 grok_op_properties, xref_tag, xref_basetypes,
7219 check_function_type): Likewise.
7220 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
7221 * friend.c (do_friend): Likewise.
7222 * init.c (build_offset_ref): Likewise.
7223 * parse.y (structsp): Likewise.
7224 * pt.c (maybe_process_partial_specialization,
7225 tsubst_friend_function, instantiate_class_template, tsubst,
7226 do_type_instantiation, instantiate_pending_templates): Likewise.
7227 * repo.c (repo_get_id): Likewise.
7228 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
7229 synthesize_tinfo_var, emit_support_tinfos): Likewise.
7230 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
7231 * semantics.c (begin_class_definition): Likewise.
7232 * tree.c (build_cplus_method_type): Likewise.
7233 * typeck2.c (digest_init, build_functional_cast,
7234 add_exception_specifier): Likewise.
7235 * parse.h, parse.c: Regenerated.
7237 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
7239 * inc/cxxabi.h: New header file. Define new-abi entry points.
7240 (__pointer_type_info::target): Rename member to ...
7241 (__pointer_type_info::type): ... here.
7242 (__base_class_info::type): Rename member to ...
7243 (__base_class_info::base): ... here.
7244 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
7245 * cp-tree.h (CPTI_ABI): New global tree enumeration.
7246 (abi_node): New global tree node.
7247 * decl.c (abi_node): Document.
7248 (init_decl_processing): Initialize abi_node.
7249 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
7250 (get_vmi_pseudo_type_info): Likewise.
7251 (create_tinfo_types): Likewise.
7252 (emit_support_tinfos): Likewise.
7253 * tinfo.h (cxxabi.h): Include for new-abi.
7254 Move rtti class definitions to new header file.
7255 * tinfo.cc (abi): Use the namespace.
7256 (std): Move new abi rtti classes from here ...
7257 (__cxxabiv1): ... to here.
7258 * tinfo2.cc (cxxabi.h): Include for new-abi.
7259 Move rtti class definitions to new header file.
7260 (std): Move new abi rtti classes from here ...
7261 (__cxxabiv1): ... to here.
7262 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
7265 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
7266 Jason Merrill <jason@casey.cygnus.com>
7268 * method.c (build_overload_int): Use host_integerp.
7270 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7272 * init.c (build_offset_ref): Handle the case of a templated member
7275 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7277 * except.c (expand_exception_blocks): Clear catch_clauses_last.
7279 2000-03-18 Mark Mitchell <mark@codesourcery.com>
7281 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
7282 * class.c (check_bitfield_decl): Turn illegal bitfields into
7284 (dfs_propagate_binfo_offsets): Adjust for new size_binop
7286 (dfs_offset_for_unshared_vbases): Likewise.
7287 * cvt.c (cp_convert_to_pointer): Convert NULL to a
7288 pointer-to-member correctly under the new ABI.
7289 * expr.c (cplus_expand_constant): Don't use cp_convert when
7290 turning an offset into a pointer-to-member.
7291 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
7292 when dereferencing them under the new ABI.
7293 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
7294 of pointers-to-members under the new ABI.
7296 * class.c (check_bitfield_decl): Remove restriction on really long
7298 (layout_class_type): Implement new ABI handling of bitfields
7299 longer than their types.
7301 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7303 * parse.y (extdefs): Call ggc_collect.
7304 * parse.c: Regenerated.
7306 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
7308 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
7309 (note_name_declared_in_class): Use OVL_CURRENT to get at a
7312 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7314 * class.c (build_vbase_path): Use integer_zerop.
7315 (build_vtable_entry): Use tree_low_cst.
7316 (get_vfield_offset): Use bit_position.
7317 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
7319 (check_bitfield_decl): Set DECL_SIZE using convert.
7320 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
7321 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
7323 (finish_struct_1): Use bit_position.
7324 (dump_class_hierarchy): Use tree_low_cst.
7325 * cp-tree.h (min_precision): Add declaration.
7326 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
7327 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
7328 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
7329 * expr.c (cplus_expand_constant): Use bit_position.
7330 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
7331 * rtti.c (get_base_offset): Use bit_position.
7332 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
7333 host_integerp, and tree_low_cst.
7334 (pointer_int_sum): Use integer_zerop.
7335 (build_component_addr): Use bit_position.
7337 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
7339 * typeck.c (require_complete_type): Don't assume size_zero_node.
7340 (complete_type_or_else): Likewise.
7342 2000-03-16 Steven Grady <grady@digitaldeck.com>
7343 Jason Merrill <jason@casey.cygnus.com>
7345 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
7347 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
7349 * decl2.c (grokfield): Bail out if type is error_mark_node.
7351 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7353 * tinfo2.cc (__ptr_to_member_data): Rename to ...
7354 (__pointer_to_member_data): ... here. Adjust.
7355 * rtti.c (create_tinfo_types): Adjust.
7357 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7359 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
7360 * decl.c (ref_desc_type_node): Undocument.
7361 * rtti.c (ptr_ref_initializer): Rename to ...
7362 (ptr_initializer): ... here. Adjust comments.
7363 (ptmd_initializer): Fix comment thinko.
7364 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
7365 (create_tinfo_types): Remove ref_desc_type_node init.
7366 * tinfo2.cc (__reference_type_info): Remove.
7368 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7370 * decl.c (cp_finish_decl): Remove obsolete comment.
7372 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
7374 2000-03-14 Mark Mitchell <mark@codesourcery.com>
7376 * cp-tree.h: Tweak documentation.
7377 * class.c (build_vbase_pointer_fields): Layout the fields, too.
7378 (avoid_overlap): Remove.
7379 (get_binfo_offset_as_int): New function.
7380 (dfs_serach_base_offsets): Likewise.
7381 (layout_nonempty_base_or_field): Likewise.
7382 (build_base_field): Layout fields here. Avoid placing two objects
7383 of the same type at the same address, under the new ABI.
7384 (build_base_fields): Adjust accordingly.
7385 (create_vtable_ptr): Return the new field, but don't attach it to
7387 (remove_base_field): Remove.
7388 (remove_base_fields): Remove.
7389 (layout_basetypes): Adjust accordingly.
7390 (layout_class_type): Call layout_field for each field, rather than
7391 just making a wholesale call to layout_type.
7393 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
7395 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
7397 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
7399 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
7401 * except.c (dtor_nothrow): New fn.
7402 (do_pop_exception): Use it. Take type parm.
7403 (push_eh_cleanup): Take type parm.
7404 (expand_start_catch_block): Pass it.
7405 (build_eh_type_type_ref): Accept null type.
7407 2000-03-12 Mark Mitchell <mark@codesourcery.com>
7409 * cp-tree.h (revert_static_member_fn): Change prototype.
7410 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
7411 (grok_op_properties): Likewise.
7412 (start_function): Likewise.
7413 (revert_static_member_fn): Simplify.
7414 * pt.c (check_explicit_specialization): Adjust call to
7415 revert_static_member_fn.
7417 2000-03-11 Mark Mitchell <mark@codesourcery.com>
7419 * cp-tree.h (scope_kind): New type.
7420 (tmpl_spec_kind): Likewise.
7421 (declare_pseudo_global_level): Remove.
7422 (pseudo_global_level_p): Rename to template_parm_scope_p.
7423 (pushlevel): Remove declaration.
7424 (begin_scope): New function.
7425 (finish_scope): Likewise.
7426 (current_tmpl_spec_kind): Likewise.
7427 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
7428 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
7429 Add template_spec_p.
7430 (toplevel_bindings_p): Adjust.
7431 (declare_pseudo_global_level): Remove.
7432 (pseudo_global_level_p): Rename to template_parm_scope_p.
7433 (current_tmpl_spec_kind): New function.
7434 (begin_scope): Likewise.
7435 (finish_scope): Likewise.
7436 (maybe_push_to_top_level): Adjust.
7437 (maybe_process_template_type_declaration): Likewise.
7438 (pushtag): Likewise.
7439 (pushdecl_nonclass_level): Likewise.
7440 (lookup_tag): Likewise.
7441 (grokfndecl): Handle member template specializations. Share
7442 constructor and non-constructor code.
7443 * decl2.c (check_classfn): Handle member template specializations.
7444 * pt.c (begin_template_parm_list): Use begin_scope.
7445 (begin_specialization): Likewise.
7446 (end_specialization): Likewise.
7447 (check_explicit_specialization): Use current_tmpl_spec_kind.
7448 Handle member template specializations.
7449 (end_template_decl): Use finish_scope. Remove call to
7451 (push_template_decl_real): Remove bogus error message.
7452 (tsubst_decl): Fix typo in code contained in comment.
7453 (instantiate_template): Handle member template specializations.
7454 (most_general_template): Likewise.
7456 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
7458 * lex.c (whitespace_cr): Compress consecutive calls to warning().
7459 (do_identifier): Ditto for error().
7461 * pt.c (convert_nontype_argument): Ditto for cp_error().
7462 (convert_template_argument): Ditto for cp_pedwarn().
7464 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
7466 * exception.cc (__check_null_eh_spec): New fn.
7467 * except.c (expand_end_eh_spec): Call it if the spec is throw().
7469 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
7471 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
7472 * except.c (expand_end_eh_spec): Add the return type.
7473 * rtti.c (throw_bad_cast): Add the parmtypes.
7474 (throw_bad_typeid): Likewise.
7476 * semantics.c (expand_stmt): Only leave out rtl for unused
7477 artificials, and set DECL_IGNORED_P on them as well.
7478 * decl.c (wrapup_globals_for_namespace): Likewise.
7480 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
7482 * decl.c (maybe_commonize_var): Skip all artificial decls.
7483 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
7485 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
7487 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
7488 * cp-tree.h: Declare flag_enforce_eh_specs.
7489 * decl.c (store_parm_decls, finish_function): Check it.
7491 C library functions don't throw.
7492 * Makefile.in (cfns.h): New target.
7493 (except.o): Depend on it.
7494 * Make-lang.in (cc1plus): Depend on cfns.gperf.
7495 * cfns.gperf: New file.
7496 * cfns.h: Generated.
7497 * except.c: Include it.
7498 (nothrow_libfn_p): New fn.
7499 * decl.c (grokfndecl): Use it.
7500 * cp-tree.h: Declare it.
7502 * decl.c (push_overloaded_decl_1, auto_function,
7503 define_function): Lose.
7504 (build_library_fn_1): New static fn.
7505 (builtin_function): Use it.
7506 (get_atexit_node): Use build_library_fn_ptr.
7507 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
7508 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
7509 push_void_library_fn, push_throw_library_fn): New fns.
7510 * cp-tree.h: Declare them.
7511 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
7512 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
7513 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
7514 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
7515 * rtti.c (build_runtime_decl): Lose.
7516 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
7517 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
7518 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
7520 * call.c (build_call): Remove result_type parm.
7521 Call mark_used on unused artificial fns.
7522 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
7524 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
7526 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
7528 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
7529 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
7530 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
7531 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
7532 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
7533 expand_generic_desc): Likewise.
7535 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7537 * exception.cc (__cp_pop_exception): Cleanup the original object.
7539 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7541 * decl.c (grok_op_properties): Merge conversion to void warning
7542 with other silly op warnings.
7544 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
7546 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
7547 array CONSTRUCTOR elements. Don't use expr_tree_cons.
7549 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7551 * decl.c (cp_make_fname_decl): New function.
7552 (wrapup_globals_for_namespace): Don't emit unused static vars.
7553 (init_decl_processing): Remove comment about use of
7554 array_domain_type. Set make_fname_decl.
7555 (cp_finish_decl): Remove __FUNCTION__ nadgering.
7556 * semantics.c (begin_compound_stmt): Remove
7557 current_function_name_declared flagging.
7558 (expand_stmt): Don't emit unused local statics.
7559 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
7562 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7564 * typeck.c (convert_for_assignment): Don't look at array
7566 * call.c (convert_like_real): Likewise.
7568 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
7570 Add initial support for '\uNNNN' specifier.
7571 * lex.c (read_ucs): New fn.
7572 (readescape, skip_white_space): Call it.
7573 (is_extended_char, is_extended_char_1): New fns.
7574 (utf8_extend_token): New fn, #if 0'd out.
7575 (real_yylex): Treat extended chars like letters.
7577 * search.c (note_debug_info_needed): Walk the bases even if we
7578 weren't deferring the type itself.
7580 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7582 * decl2.c (finish_objects): Constify a char*.
7584 * method.c (emit_thunk): Likewise.
7586 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
7588 * typeck.c (dubious_conversion_warnings): Look through
7591 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7593 * class.c (dfs_modify_vtables): I is now unsigned.
7594 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
7595 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
7596 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
7597 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
7598 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
7599 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
7600 Call integer_all_onesp.
7601 * typeck2.c (process_init_constructor): Use compare_tree_int.
7603 * lang-specs.h (as): Don't call if -syntax-only.
7605 2000-03-06 Mark Mitchell <mark@codesourcery.com>
7607 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
7608 RTL_EXPR_HAS_NO_SCOPE after all.
7610 2000-03-05 Mark Mitchell <mark@codesourcery.com>
7612 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
7613 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
7614 RTL_EXPR_HAS_NO_SCOPE.
7616 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
7619 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
7621 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
7623 * call.c (convert_like): Macrofy.
7624 (convert_like_with_context): New macro.
7625 (convert_like_real): Renamed from convert_like. Add calling
7626 context parameters, for diagnostics. Add recursive flag. Call
7627 dubious_conversion_warnings for outer conversion.
7628 (build_user_type_conversion): Use convert_like_with_context.
7629 (build_over_call): Likewise. Don't warn about dubious
7630 conversions here. Adjust convert_default_arg calls.
7631 (convert_default_arg): Add context parameters for diagnostics.
7632 Pass throught to convert_like_with_context.
7633 * cp-tree.h (convert_default_arg): Add context parameters.
7634 (dubious_conversion_warnings): Prototype new function.
7635 * typeck.c (convert_arguments): Adjust convert_default_arg call.
7636 (dubious_conversion_warnings): New function, broken
7637 out of convert_for_assignment.
7638 (convert_for_assignment): Adjust.
7640 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
7642 * decl2.c (key_method): Break out from...
7643 (import_export_vtable, import_export_class): ...here.
7645 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
7646 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
7648 * search.c (note_debug_info_needed, dfs_debug_mark,
7649 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
7650 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
7652 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
7654 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
7657 2000-03-02 Mark Mitchell <mark@codesourcery.com>
7659 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
7660 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
7661 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
7662 (lang_type): Split gets_new into has_new and has_array_new.
7663 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7664 (TYPE_GETS_NEW): Split into ...
7665 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
7666 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
7667 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
7668 (build_op_new_call): Don't declare.
7669 (build_new_1): Likewise.
7670 * call.c (build_op_new_call): Remove.
7671 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
7672 instead of TYPE_NEEDS_DESTRUCTOR.
7673 (finish_struct_bits): Likewise.
7674 (add_implicitly_declared_members): Likewise.
7675 (check_field_decl): Likewise.
7676 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
7677 correctly under the new ABI.
7678 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
7679 instead of TYPE_NEEDS_DESTRUCTOR.
7680 (initialize_local_var): Likewise.
7681 (destroy_local_var): Likewise.
7682 (cp_finish_decl): Likewise.
7683 (register_dtor_fn): Likewise.
7684 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
7685 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
7686 TYPE_VEC_DELETE_TAKES_SIZE here.
7687 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
7688 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
7689 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7690 (finish_destructor_body): Likewise.
7691 (maybe_build_cleanup_1): Likewise.
7692 * decl2.c (do_static_destruction): Likewise.
7693 * init.c (build_new_1): Make it static.
7694 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7695 (expand_cleanup_for_base): Likewise.
7696 (get_cookie_size): New function.
7697 (build_new_1): Handle array-new cookies correctly under the new
7699 (build_vec_delete_1): Likewise.
7700 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7701 (build_delete): Likewise.
7702 (build_vec_delete): Handle array-new cookies correctly under the new
7704 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7705 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
7706 TYPE_HAS_ARRAY_NEW_OPERATOR.
7707 * ptree.c (print_lang_type): Check them.
7708 * search.c (context_for_name_lookup): Fix typo in comment.
7709 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7710 * tree.c (break_out_cleanups): Likewise.
7711 (build_cplus_array_test_1): Likewise.
7712 (cp_build_qualified_type_real): Likewise.
7713 * typeck.c (complete_type): Likewise.
7715 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
7716 the command-line, not the end.
7718 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
7720 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
7722 2000-03-02 Tom Tromey <tromey@cygnus.com>
7724 * cp-tree.h (build_java_class_ref): Declare.
7725 * init.c (build_java_class_ref): No longer static.
7726 * except.c (expand_throw): Generate a Java-style `throw' if the
7727 thrown object is a "Java" object.
7728 (initialize_handler_parm): Generate a Java-style lookup of
7729 exception info if the caught object is a "Java" object.
7730 (catch_language, catch_language_init): New globals.
7731 (decl_is_java_type): New function.
7732 (expand_start_catch_block): Don't call push_eh_info() or
7733 push_eh_cleanup() when handling a Java-style "catch". Pass Java
7734 class reference to build_catch_block.
7736 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7738 * typeck.c (comptypes): Treat sizetype like its language equivalent.
7740 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
7742 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
7743 to merge reference/pointer code and fix incorrect warnings.
7745 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
7747 * search.c (protected_accessible_p): Use context_for_name_lookup.
7749 * init.c (construct_virtual_bases): Fix thinko.
7750 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
7752 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
7754 * decl.c (current_function_decl): Move to toplev.c.
7756 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
7758 * pt.c (fn_type_unification): Unify return type, whenever
7760 (get_bindings_real): Only pass return type when necessary.
7761 Remove explicit return type check.
7762 * class.c (resolve_address_of_overloaded_function): Pass desired
7763 return type to fn_type_unification.
7765 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7767 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
7769 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
7771 * rtti.c (expand_class_desc): Likewise.
7772 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
7773 (THUNK_VCALL_OFFSET): Likewise.
7774 (THUNK_DELTA): Reflect changes in ../tree.h.
7776 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
7778 * search.c (protected_accessible_p): Also allow the access if
7779 the member is public in DERIVED. Lose TYPE parm.
7780 (friend_accessible_p): Lose TYPE parm.
7781 (accessible_p): Adjust.
7783 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7785 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
7786 on things that are not sizes; ssize_binop deleted.
7787 Call size_diffop when appropriate.
7788 (dfs_build_vcall_offset_vtbl_entries): Likewise.
7789 (build_primary_vtable, build_secondary_vtable): Likewise.
7790 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
7791 Variable I is HOST_WIDE_INT.
7792 (get_vfield_offset): Pass proper types to size_binop.
7793 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
7794 (finish_struct_1): Likewise.
7795 (skip_rtti_stuff): Arg N is now pointer to signed.
7796 (layout_class_type): Use size_zero_node.
7797 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
7798 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
7799 * decl.c (complete_arry_type): Pass proper types to size_binop.
7800 (xref_basetypes): BINFO_OFFSET is sizetype.
7801 * error.c (dump_expr): Don't use size_binop non-sizes.
7802 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
7803 * init.c (construct_virtual_bases): Fix type error.
7804 (build_vec_delete_1): Pass proper type to size_binop and don't
7806 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
7807 * rtti.c (get_base_offset): Pass proper type to size_binop.
7808 * search.c (dfs_find_vbases): Fix type error.
7809 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
7810 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
7811 * tree.c (debug_binfo): Variable N is signed.
7812 Use HOST_WIDE_INT_PRINT_DEC.
7813 * typeck.c (comptypes): sizetype is same as equivalent integer type.
7814 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
7815 size_one_node and size_zero_node.
7816 (c_alignof): Use size_one_node.
7817 (build_component_addr): Pass proper types to size_binop.
7818 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
7820 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
7822 Implement class scope using-declarations for functions.
7823 * class.c (handle_using_decl): Call add_method for used functions.
7824 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
7825 (add_method): Used functions are hidden by local functions.
7826 (check_bases_and_members): Handle using-decls before finalizing
7827 CLASSTYPE_METHOD_VEC.
7828 * call.c (add_function_candidate): Add ctype parm; if non-zero,
7829 override the type of 'this' accordingly.
7830 (add_template_candidate, add_template_candidate_real): Add ctype parm.
7831 (convert_class_to_reference, build_user_type_conversion_1,
7832 build_new_function_call, build_object_call, build_new_op,
7833 build_new_method_call): Pass ctype parm.
7835 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
7837 * call.c (convert_class_to_reference, build_user_type_conversion_1,
7838 build_new_function_call, build_object_call, build_new_op,
7839 build_new_method_call, build_op_delete_call): Don't get basetype_path
7841 * typeck.c (build_component_ref): Likewise.
7842 * init.c (build_offset_ref): Likewise.
7843 (resolve_offset_ref): Don't call enforce_access.
7844 Call build_scoped_ref.
7845 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
7846 would cause an error or if -pedantic.
7847 * class.c (alter_access): Lose binfo parm.
7849 2000-02-26 Mark Mitchell <mark@codesourcery.com>
7851 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
7854 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
7856 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
7857 pseudo_type_info creation into the std namespace
7859 2000-02-26 Mark Mitchell <mark@codesourcery.com>
7861 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
7862 (import_export_class): Remove declaration.
7863 * decl2.c (import_export_class): Make it static.
7864 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
7865 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
7866 EXPR_WITH_FILE_LOCATION.
7867 * lex.c (check_newline): Tweak filename/lineno setting.
7868 * semantics.c (begin_while_stmt): Fix typo in comment.
7870 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7872 * lang-options.h (-fmessage-length=): Add missing option.
7874 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
7876 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
7878 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
7880 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
7882 * optimize.c (expand_call_inline): Emit the return label before
7883 evaluating the return value.
7885 2000-02-24 Mark Mitchell <mark@codesourcery.com>
7887 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
7888 than duplicating functionality here.
7889 * optimize.c: Include input.h.
7890 (expand_call_inline): Use push_srcloc and pop_srcloc.
7891 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
7892 * parse.c: Regenerated.
7893 * Makefile.in (lex.o): Depend on input.h.
7894 (optimize.o): Likewise.
7896 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
7898 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
7899 function type, rather than ICE.
7901 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
7903 * decl.c (grokdeclarator): Call decl_type_access_control.
7904 * parse.y (parse_end_decl): Don't call decl_type_access_control if
7907 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
7909 * decl.c (decls_match): Remove obsolete static member nadgering.
7911 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7913 * decl.c (grokdeclarator): Change ANSI to ISO.
7914 * lex.c (consume_string, readescape, do_identifier): Likewise.
7915 (parse_float, real_yylex): Likewise.
7916 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
7917 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
7918 new_type_id, maybe_label_decls, simple_stmt,
7919 for.init.statement): Likewise.
7920 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
7921 * semantics.c (finish_named_return_value): Likewise.
7922 * parse.c: Regenerate.
7924 2000-02-21 Mark Mitchell <mark@codesourcery.com>
7926 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
7927 (CPTI_CLASS_STAR_TYPE): Remove.
7928 (vtable_index_type): Likewise.
7929 (class_star_type_node): Remove.
7930 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
7931 (build_binary_op_nodefault): Remove.
7932 * call.c (build_new_op): Use build_binary_op instead of
7933 build_binary_op_nodefault.
7934 * decl.c (init_decl_processing): Remove class_star_type_node
7935 initialization. Make delta_type_node ptrdiff_type_node under the
7936 new ABI. Initialize vtable_index_type.
7937 (build_ptrmemfunc_type): Build different structures for the new
7939 (build_enumerator): Use build_binary_op instead of
7940 build_binary_op_nodefault.
7941 * method.c (build_overload_value): Mangle pointers-to-members
7942 appropriately under the new ABI.
7943 * typeck.c (build_array_ref): Use build_binary_op instead of
7944 build_binary_op_nodefault.
7945 (get_member_function_from_ptrfunc): Adjust for the new ABI.
7946 (build_binary_op_nodefault): Rename to ...
7947 (build_binary_op): ... this. Remove old version. Adjust for
7948 pointer-to-member comparisons under the new ABI.
7949 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
7950 (build_ptrmemfunc): Adjust for the new ABI.
7951 (expand_ptrmemfunc_cst): Likewise.
7952 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
7953 (pfn_from_ptrmemfunc): Adjust for the new ABI.
7955 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
7957 * call.c (build_object_call): Compress consecutive calls to
7959 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
7960 (build_op_delete_call): Adjust message formatting.
7962 * class.c (check_bases): Compress consecutive calls to
7964 (finish_struct_anon): Say 'ISO C++'.
7966 * decl.c (start_decl): Same here.
7967 (grok_reference_init): Likewise.
7968 (grokfndecl): Correct message formatting.
7969 (grokfndecl): Improve diagnostic.
7970 (check_static_variable_definition): Likewise. Say 'ISO C++'
7971 (compute_array_index_type): Say 'ISO C++'
7972 (create_array_type_for_decl): Compress consecutive calls to
7974 (grokdeclarator): Say 'ISO C++'
7975 (grok_op_properties): Likewise.
7977 * decl2.c (delete_sanity): Clairify diagnostic.
7978 (check_member_template): Same here.
7979 (grok_function_init): Use consistent terminology.
7981 * expr.c (do_case): Say 'ISO C++'
7983 * friend.c (do_friend): Compress consecutive calls to warning.
7985 2000-02-20 Mark Mitchell <mark@codesourcery.com>
7987 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
7988 * class.c (build_secondary_vtable): Reorganize. Don't create a
7989 new vtable under the new ABI.
7990 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
7992 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
7993 the initializing elements.
7994 (initialize_vtable): New function.
7995 (dfs_finish_vtbls): Use it.
7996 (dfs_accumulate_vtbl_inits): New function.
7997 (finish_vtbls): Merge primary and secondary vtables under the new
7999 (finish_struct_1): Remove redundant call to layout_vtable_decl.
8000 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
8003 * class.c (build_vtable): New function, split out from ...
8004 (get_vtable_decl): ... here, and ...
8005 (build_secondary_vtable): ... here.
8007 * pt.c (tsubst_decl): Fix formatting.
8009 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8011 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
8012 (avoid_overlap, build_base_field): Likewise.
8013 (build_base_field, build_base_fields, is_empty_class):
8014 Test DECL_SIZE with integer_zero.
8015 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
8016 * cp-tree.h (struct lang_type): New field size_unit.
8017 (CLASSTYPE_SIZE_UNIT): New macro.
8018 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
8019 (cp_finish_decl): Delete -Wlarger-than processing.
8020 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
8021 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
8022 * tree.c (make_binfo): binfo vector is one entry longer.
8023 (walk_tree): Walk DECL_SIZE_UNIT.
8025 2000-02-19 Mark Mitchell <mark@codesourcery.com>
8027 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
8029 (build_vtable_entry): Don't assume all vtable entries are
8031 (build_vtbl_initializer): Adjust accordingly.
8032 (get_vtable_decl): Fix formatting.
8034 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
8036 * semantics.c (deferred_type_access_control): Walk the entire
8038 (save_type_access_control): Rename from
8039 initial_deferred_type_access_control. Just remember the value.
8040 (decl_type_access_control): New fn.
8041 (begin_function_definition): Use deferred_type_access_control, after
8042 we've started the function. Set type_lookups to error_mark_node.
8043 * parse.y (frob_specs, fn.def1): Adjust.
8044 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
8045 (parse_end_decl, parse_bitfield0, parse_method): New fns.
8046 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
8047 (after_type_component_declarator0): Likewise.
8048 (after_type_component_declarator): Likewise.
8049 (notype_component_declarator): Likewise.
8050 * cp-tree.h: Adjust.
8052 * decl.c (redeclaration_error_message): Allow redeclaration of
8053 namespace-scope decls.
8055 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
8057 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
8059 2000-02-17 Mark Mitchell <mark@codesourcery.com>
8061 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
8062 * decl2.c (grokclassfn): Likewise.
8064 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
8066 * decl2.c (lang_decode_option): Don't set default message length
8068 * lex.c (lang_init_options): Set it here.
8070 2000-02-16 Mark Mitchell <mark@codesourcery.com>
8072 Make DECL_CONTEXT mean the class in which a member function was
8073 declared, even for a virtual function.
8074 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
8075 (DECL_FRIEND_CONTEXT): New macro.
8076 (DECL_REAL_CONTEXT): Remove.
8077 (SET_DECL_FRIEND_CONTEXT): Likewise.
8078 (DECL_VIRTUAL_CONTEXT): Adjust.
8079 (DECL_CLASS_SCOPE_P): Use TYPE_P.
8080 (add_friends): Remove.
8081 (hack_decl_function_context): Likewise.
8082 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
8084 (build_over_call): Fix indentation. Use DECL_CONTEXT
8085 instead of DECL_CLASS_CONTEXT.
8086 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
8087 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8088 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8089 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
8090 (build_base_field): Likewise.
8091 (finish_struct_1): Likewise.
8092 (build_self_reference): Likewise.
8093 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
8095 (pushtag): Use decl_function_context, not
8096 hack_decl_function_context.
8097 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8098 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
8099 (pushdecl): Remove bogus code.
8100 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
8101 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8102 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8103 Use decl_function_context, nothack_decl_function_context.
8104 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
8105 (grokdeclarator): Likewise. Use decl_function_context, not
8106 hack_decl_function_context.
8107 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
8108 (start_function): Use DECL_FRIEND_CONTEXT, not
8109 DECL_CLASS_CONTEXT. Use decl_function_context, not
8110 hack_decl_function_context.
8111 (finish_function): Use decl_function_context, not
8112 hack_decl_function_context.
8113 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
8115 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
8116 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
8117 (grokfield): Likewise.
8118 (finish_builtin_type): Likewise.
8119 (finish_vtable_vardec): Use decl_function_context, not
8120 hack_decl_function_context.
8121 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8122 (start_static_initialization_or_destruction): Likewise.
8123 (finish_static_initialization_or_destruction): Likewise.
8124 (mark_used): Adjust logic for deciding when to synthesize methods.
8125 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
8127 * error.c (dump_function_decl): Use DECL_CONTEXT, not
8129 * friend.c (is_friend): Likewise.
8130 (add_friends): Remove.
8131 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
8132 * lex.c (begin_definition_of_inclass_inline): Use
8133 decl_function_context, not hack_decl_function_context.
8134 (process_next_inline): Likewise.
8135 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8136 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
8137 DECL_CLASSS_CONTEXT.
8138 (hack_identifier): Likewise.
8139 (synthesize_method): Use decl_function_context, not
8140 hack_decl_function_context.
8141 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
8143 (is_member_template): Use decl_function_context, not
8144 hack_decl_function_context. Use DECL_CONTEXT, not
8146 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
8148 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
8150 (push_template_decl_real): Likewise.
8151 (instantiate_class_template): Don't call add_friends.
8152 (tsubst_default_argument): Use DECL_CONTEXT, not
8154 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8155 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8156 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
8158 * repo.c (repo_inline_used): Likewise.
8159 * search.c (current_scope): Adjust for new _CONTEXT macros.
8160 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
8162 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8163 (lookup_fnfields_here):Likewise.
8164 (check_final_overrider): Likewise.
8165 (init_vbase_pointers): Likewise.
8166 (virtual_context): Likewise.
8167 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
8168 (expand_body): Use decl_function_context, not
8169 hack_decl_function_context.
8170 * tree.c (hack_decl_function_context): Remove.
8171 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
8173 * typeck2.c (error_not_base_type): Likewise.
8175 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
8177 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
8179 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8181 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
8183 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
8185 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
8187 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
8189 * decl2.c (lang_decode_option): Enable automatic line wrapping.
8191 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
8193 * parse.y (frob_specs): Split out...
8194 (parse_decl): From here.
8195 (fn.def2): Call initial_deferred_type_access_control.
8196 (after_type_component_declarator0): Call frob_specs.
8197 (notype_component_declarator0): Likewise.
8198 * search.c (friend_accessible_p): Nested classes are friends of their
8201 2000-02-10 Mark Mitchell <mark@codesourcery.com>
8203 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
8204 used to create an implicit temporary.
8206 * class.c (dfs_modify_vtables): Tweak calculation of functions to
8209 2000-02-08 Nathan Sidwell <nathan@acm.org>
8211 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
8212 strip array element qualifiers too.
8214 2000-02-07 Mark Mitchell <mark@codesourcery.com>
8216 * decl.c (store_parm_decls): Don't build cleanups for parameters
8217 while processing_template_decl.
8219 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
8221 * cp-tree.h (struct saved_scope): Add incomplete field.
8222 (namespace_scope_incomplete): New macro.
8223 * decl.c (pushdecl): Use it.
8224 (hack_incomplete_structures): Use it. See through artificial
8226 (mark_saved_scope): Mark it.
8228 Implement access control for nested types.
8229 * search.c (type_access_control): New fn.
8230 (accessible_p): Now we do perform access control for types.
8231 * semantics.c (deferred_type_access_control): New fn.
8232 (initial_deferred_type_access_control): New fn.
8233 (begin_function_definition): Call it. Add lookups parm.
8234 * decl.c (struct binding_level): Add this_class field.
8235 (pushlevel_class): Set it.
8236 (mark_binding_level): Mark it.
8237 (lookup_name_real): Use it. Call type_access_control.
8238 (mark_saved_scope): Mark lookups field.
8239 * cp-tree.h (flagged_type_tree): Add lookups field.
8240 (struct saved_scope): Add lookups field.
8241 (type_lookups): New macro.
8242 * parse.y (declmods): Now <ftype>.
8243 (parse_decl): Add lookups parm. Call
8244 initial_deferred_type_access_control.
8245 (lang_extdef): Clear type_lookups.
8246 (typed_declspecs, declmods, typespec): Set lookups field.
8247 (initdcl): Call deferred_type_access_control.
8248 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
8249 component_decl_1, named_parm): Adjust.
8250 * friend.c (is_friend): Nested classes are friends of their
8253 * class.c (currently_open_derived_class): New fn.
8254 * method.c (hack_identifier): Use it.
8256 * lex.c (do_identifier): Remove obsolete code.
8258 * parse.y (typed_typespecs): Propagate new_type_flag properly.
8260 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
8262 * tinfo.h: Remove apostrophes from C++ comment (xgettext
8263 thinks this file is plain C).
8265 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8267 * Makefile.in (call.o): Depend on $(EXPR_H).
8269 * call.c: Include "expr.h".
8271 * class.c (dump_class_hierarchy): Add prototype.
8273 * search.c (dfs_get_pure_virtuals): Likewise.
8275 2000-02-1 Ulrich Drepper <drepper@redhat.com>
8277 * parse.y (simple_stmt): Allow :: token in asm parameter list.
8280 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
8282 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
8283 Store it in DECL_FCONTEXT.
8284 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
8286 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
8288 * tinfo.h (old abi): #include "tconfig.h".
8289 * tinfo.cc (convert_to_base): Move into old abi section.
8291 2000-01-31 Mark Mitchell <mark@codesourcery.com>
8293 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
8294 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
8295 (BINFO_PRIMARY_BINFO): New macro.
8296 (BF_DELTA): Rename to ...
8297 (BV_DELTA): ... this.
8298 (BF_VCALL_INDEX): Rename to ...
8299 (BV_VCALL_INDEX): ... this.
8300 (BF_FN): Rename to ...
8302 * class.c (build_vbase_path): Adjust for changes to reverse_path.
8303 (set_rtti_entry): Rename BF_ macros to BV_ variants.
8304 (modify_vtable_entry): Simplify.
8305 (add_virtual_function): Rename BF_ macros to BV_ variants.
8306 (build_vtable_initializer): Likewise.
8307 (get_class_offset_1): Remove.
8308 (dfs_get_class_offset): Likewise.
8309 (get_class_offset): Likewise.
8310 (dfs_find_final_overrider): New function.
8311 (find_final_overrider): Likewise.
8312 (modify_one_vtable): Remove.
8313 (dfs_find_base): New function.
8314 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
8315 find_final_overrider.
8316 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
8318 (dfs_fixup_vtable_deltas): Remove.
8319 (override_one_vtable): Remove.
8320 (merge_overrides): Likewise.
8321 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
8322 unreal chilren of virtual bases.
8323 (finish_struct_1): Don't use merge_overrides. Don't use
8324 dfs_fixup_vtable_deltas.
8325 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
8328 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
8329 Jason Merrill <jason@yorick.cygnus.com>
8331 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
8333 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
8335 * exception.cc (__throw_bad_typeid): Add missing std::.
8337 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8339 * cp-tree.h (make_thunk): PROTO -> PARAMS.
8341 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
8343 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
8345 Runtime support for new-abi rtti.
8346 * inc/typeinfo (type_info::operator!=): Define in class.
8347 (type_info::before, type_info::name, type_info::operator==,
8348 type_info::operator!=): Define new ABI implementations.
8349 (type_info::is_pointer_p, type_info::is_function_p): Declare
8350 new virtual functions.
8351 (type_info::do_catch, type_info::do_upcast): Likewise.
8353 * tinfo.h (__base_class_info): Define new class.
8354 (__class_type_info): Likewise.
8355 (__si_class_type_info): Likewise.
8356 (__vmi_class_type_info): Likewise.
8357 (__dynamic_cast): Prototype.
8359 * tinfo.cc: Conditionalize old and new rtti mechanisms.
8360 (type_info::is_pointer_p): Define new function.
8361 (type_info::is_function_p): Likewise.
8362 (type_info::do_catch): Likewise.
8363 (type_info::do_upcast): Likewise.
8364 (vtable_prefix): New structure for vtable access.
8365 (adjust_pointer): Define new template function.
8366 (contained_p, public_p, virtual_p, contained_public_p,
8367 contained_nonpublic_p, contained_nonvirtual_p): Define new
8369 (nonvirtual_base_type): New local variable.
8370 (__class_type_info::~__class_type_info): Define.
8371 (__si_class_type_info::~__si_class_type_info): Likewise.
8372 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
8373 (__class_type_info::do_catch): Define new function.
8374 (__class_type_info::do_upcast): Likewise.
8375 (__class_type_info::find_public_src): Likewise.
8376 (__class_type_info::do_find_public_src): Likewise.
8377 (__si_class_type_info::do_find_public_src): Likewise.
8378 (__vmi_class_type_info::do_find_public_src): Likewise.
8379 (__class_type_info::do_dyncast): Likewise.
8380 (__si_class_type_info::do_dyncast): Likewise.
8381 (__vmi_class_type_info::do_dyncast): Likewise.
8382 (__class_type_info::do_upcast): Likewise.
8383 (__si_class_type_info::do_upcast): Likewise.
8384 (__vmi_class_type_info::do_upcast): Likewise.
8385 (__dynamic_cast): Likewise.
8387 * tinfo2.cc (__fundamental_type_info): Define new class.
8388 (__pointer_type_info): Likewise.
8389 (__reference_type_info): Likewise.
8390 (__array_type_info): Likewise.
8391 (__function_type_info): Likewise.
8392 (__enum_type_info): Likewise.
8393 (__ptr_to_member_type_info): Likewise.
8394 (__fundamental_type_info::~__fundamental_type_info): Define.
8395 (__pointer_type_info::~__pointer_type_info): Likewise.
8396 (__reference_type_info::~__reference_type_info): Likewise.
8397 (__array_type_info::~__array_type_info): Likewise.
8398 (__function_type_info::~__function_type_info): Likewise.
8399 (__enum_type_info::~__enum_type_info): Likewise.
8400 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
8401 (__pointer_type_info::do_catch): Define new function.
8402 (__ptr_to_member_type_info::do_catch): Define new function.
8404 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
8405 (__is_pointer): Likewise.
8407 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
8409 2000-01-30 Mark Mitchell <mark@codesourcery.com>
8411 * cp/class.c (build_vtable): Rename to build_primary_vtable.
8412 (prepare_fresh_vtable): Rename to build_secondary_vtable.
8413 (make_new_vtable): New function.
8414 (modify_vtable_entry): Handle generation of new vtables correctly.
8415 (modify_one_vtable): Remove unused parameter.
8416 (dfs_fixup_vtable_deltas): Likewise.
8417 (override_one_vtable): Use build_secondary_vtable.
8418 (finish_struct_1): Use build_primary_vtable and
8419 build_secondary_vtable.
8421 2000-01-28 Ulrich Drepper <drepper@redhat.com>
8423 * cp/decl.c: Adjust variable names, comments, help strings.
8425 2000-01-29 Nathan Sidwell <nathan@acm.org>
8427 * new2.cc (operator delete[]): Use operator delete, don't assume
8430 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
8432 * class.c (build_vtbl_initializer): Add argument to
8433 build_vtable_entry call.
8435 2000-01-27 Mark Mitchell <mark@codesourcery.com>
8437 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
8438 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
8439 (BF_DELTA): New macro.
8440 (BF_VCALL_INDEX): Likewise.
8442 (THUNK_VCALL_OFFSET): Likewise.
8443 (make_thunk): Change prototype.
8444 * class.c (build_vtable_entry): Integrate
8445 build_vtable_entry_for_fn. Handle vcall indices.
8446 (build_vtable_entry_for_fn): Remove.
8447 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
8448 BF_VCALL_INDEX, BF_FN.
8449 (modify_vtable_entry): Integrate common code from
8450 modify_one_vtable and dfs_fixup_vtable_deltas.
8451 (add_virtual_function): Set BF_VCALL_INDEX.
8452 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
8454 (modify_one_vtable): Simplify.
8455 (dfs_fixup_vtable_deltas): Likewise.
8456 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
8457 * method.c (make_thunk): Handle vcall indices.
8459 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
8461 Compiler side new abi rtti (not enabled).
8462 * cp-tree.h (new_abi_rtti_p): New macro.
8463 (emit_support_tinfos): Prototype new function.
8464 (tinfo_decl_p): Likewise.
8465 (emit_tinfo_decl): Likwise.
8466 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
8468 (doing_runtime): New local static.
8469 (init_rtti_processing): Add new-abi initializer.
8470 (get_tinfo_decl): Add new-abi logic.
8471 (tinfo_from_decl): Likewise.
8472 (build_dynamic_cast_1): Likewise.
8473 (qualifier_flags): New static function.
8474 (tinfo_base_init): Likewise.
8475 (generic_initializer): Likewise.
8476 (ptr_ref_initializer): Likewise.
8477 (ptmd_initializer): Likewise.
8478 (class_hint_flags): Likewise.
8479 (class_initializer): Likewise.
8480 (synthesize_tinfo_var): Likewise.
8481 (create_real_tinfo_var): Likewise.
8482 (create_pseudo_type_info): Likewise.
8483 (get_vmi_pseudo_type_info): Likewise.
8484 (create_tinfo_types): Likewise.
8485 (emit_support_tinfos): New global function.
8486 (tinfo_decl_p): New global predicate.
8487 (emit_tinfo_decl): New global function.
8488 * class.c (set_rtti_entry): Generalize for old and new rtti.
8489 (build_vtbl_initializer): Likewise.
8490 * decl2.c (finish_file): Likewise.
8492 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
8494 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
8495 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
8497 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
8499 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
8502 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
8504 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
8506 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8508 * optimize.c (calls_setjmp_r): Supply new argument
8509 to special_function_p.
8511 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8513 * call.c: PROTO -> PARAMS.
8514 * class.c: Likewise.
8515 * cp-tree.h: Likewise.
8519 * decl2.c: Likewise.
8521 * errfn.c: Likewise.
8522 * error.c: Likewise.
8523 * except.c: Likewise.
8526 * input.c: Likewise.
8529 * method.c: Likewise.
8530 * optimize.c: Likewise.
8531 * parse.y: Likewise.
8535 * search.c: Likewise.
8536 * semantics.c: Likewise.
8539 * typeck.c: Likewise.
8540 * typeck2.c: Likewise.
8543 2000-01-25 Richard Henderson <rth@cygnus.com>
8545 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
8547 2000-01-25 Mark Mitchell <mark@codesourcery.com>
8549 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
8550 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
8551 (struct vcall_offset_data_s): New type.
8552 (dfs_vcall_offset_queue_p): New function.
8553 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8554 (build_vcall_offset_vtbl_entries): Likewise.
8555 (layout_vtable_decl): Likewise.
8556 (num_vfun_entries): Likewise.
8557 (num_extra_vtbl_entries): Add the entries for vcall offsets.
8558 (build_vtbl_initializer): Likewise.
8559 (dfs_finish_vtabls): Use layout_vtable_decl.
8560 (modify_one_vtables): Always duplicate vtables under the new ABI.
8561 (finish_struct_1): Use layout_vtable_decl.
8563 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8565 * decl.c (member_function_or_else): Change third arg from a format
8566 specifier to an `enum overload_flags'. Callers changed.
8568 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
8570 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
8571 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
8572 build_const_cast, get_delta_difference, check_return_expr): Avoid
8573 ANSI string concatenation usage.
8575 2000-01-24 Mark Mitchell <mark@codesourcery.com>
8577 * class.c (layout_class_type): Put the fields required to make a
8578 class non-empty at the end, not the beginning, of the TYPE_FIELDs
8581 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
8583 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
8586 * decl2.c (mark_used): Do instantiate inlines that have been
8587 explicitly instantiated.
8589 2000-01-24 Richard Henderson <rth@cygnus.com>
8591 * call.c (build_over_call): Use expand_tree_builtin.
8592 * typeck.c (build_function_call_real): Likewise.
8593 (build_binary_op_nodefault): Handle unordered compares.
8595 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8597 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
8598 cp_tree_index values.
8599 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
8600 New global node #defines for them.
8601 * rtti.c (call_void_fn): Replace with ...
8602 (build_runtime_decl): ... new static function.
8603 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
8604 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
8605 (build_dynamic_cast_1): Always produce correctly typed result.
8606 Explicitly produce type_info addresses. Use dynamic_cast_node.
8607 * exception.cc (__throw_bad_cast): Return `void *'.
8608 (__throw_bad_typeid): Return `const type_info &'.
8610 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8612 * cp-tree.h (get_vtable_decl): Prototype new function.
8613 * class.c (get_vtable_decl): New function. Broken out from ...
8614 (build_vtable): ... here. Use it.
8615 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
8618 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8620 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
8621 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
8622 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
8623 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
8624 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
8625 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
8626 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
8627 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
8628 (CPTI_TINFO_VAR_ID): New enumeration.
8629 (__tp_desc_type_node, __access_mode_type_node,
8630 __bltn_desc_type_node, __user_desc_type_node,
8631 __class_desc_type_node, __ptr_desc_type_node,
8632 __attr_desc_type_node, __func_desc_type_node,
8633 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
8634 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
8635 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
8636 enum_desc_type_node, class_desc_type_node,
8637 si_class_desc_type_node, vmi_class_desc_type_node,
8638 ptmd_desc_type_node, base_desc_type_node): New #defines.
8639 (tinfo_fn_id, tinfo_fn_type): Rename to ...
8640 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
8641 (tinfo_var_id): New enumeration.
8642 (DECL_TINFO_FN_P): Augment comment.
8643 * decl.c (cp_global_trees): Adjust documentation.
8644 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
8645 tinfo_decl_type and tinfo_var_id.
8646 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
8647 (build_typeid): Remove unused variable.
8648 (get_tinfo_var): Use tinfo_var_id.
8649 (tinfo_name): New static function.
8650 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
8651 (tinfo_from_decl): Likewise.
8652 (get_base_offset): New static function, broken out of
8654 (expand_si_desc): Use tinfo_name.
8655 (expand_class_desc): Likewise. Lose local static variable.
8656 Use base_desc_type_node. Use get_base_offset.
8657 (expand_ptr_desc): Use tinfo_name.
8658 (expand_attr_desc): Likewise.
8659 (expand_generic_desc): Likewise.
8661 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
8662 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
8664 2000-01-23 Mark Mitchell <mark@codesourcery.com>
8666 * cp-tree.h (__eprintf): Remove declaration.
8667 * tree.c (__eprintf): Remove definition.
8669 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
8670 Mark Mitchell <mark@codesourcery.com>
8672 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
8673 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
8675 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
8677 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
8679 2000-01-23 Mark Mitchell <mark@codesourcery.com>
8681 * cp-tree.h (register_dtor_fn): New function.
8682 * decl.c (destroy_local_static): Rename to ...
8683 (register_dtor_fn): ... this. Give it external linkage.
8684 (expand_static_init): Use it.
8685 * decl2.c (do_static_initialization): Likewise, if using
8687 (do_static_destruction): Check that __cxa_atexit is not in use.
8688 (finish_file): Don't call do_static_destruction if using
8691 * typeck.c (convert_arguments): Restore two-message error
8694 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
8696 Remap dynamic cast hint values to be consistent across ABIs.
8697 * search.c (dynamic_cast_base_recurse): Remap generated value.
8698 (get_dynamic_cast_base_type): Adjust documentation.
8699 * tinfo.h (__user_type_info::dyncast): Likewise.
8700 (__user_type_info::find_public_subobj): Remap BOFF meaning.
8701 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
8702 (__class_type_info::do_dyncast): Likewise.
8703 (__class_type_info::do_find_public_subobj): Likewise.
8704 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
8706 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
8708 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
8710 * typeck2.c (incomplete_type_error): Restore previous
8711 cp_error and cp_error_at call sequence.
8713 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
8715 * class.c (dump_class_hierarchy): Make format agree with argument;
8716 cast pointer to unsigned long and print with %lx.
8718 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
8720 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
8722 * typeck.c (composite_pointer_type, common_type,
8723 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
8724 build_function_call_real, convert_arguments,
8725 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
8726 build_unary_op, mark_addressable, build_compound_expr,
8727 build_static_cast, build_reinterpret_cast, build_const_cast,
8728 build_c_cast, build_modify_expr, get_delta_difference,
8729 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
8730 'ISO C++'. Fusion consecutive calls to diagnotic message routines
8732 * typeck2.c (readonly_error, abstract_virtuals_error,
8733 process_init_constructor, check_for_new_type): Likewise.
8735 2000-01-19 Mark Mitchell <mark@codesourcery.com>
8737 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
8740 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
8742 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
8743 (build_x_typeid): Likewise.
8744 (get_tinfo_fn): Likewise.
8745 (get_tinfo_fn_unused): Rename to ...
8746 (get_tinfo_decl): ... here.
8747 * rtti.c (build_headof): Replace logic error with assertion.
8748 (get_tinfo_fn_dynamic): Rename to ...
8749 (get_tinfo_decl_dynamic): ... here. Make static. Use
8750 complete_type_or_else.
8751 (build_x_typeid): Move into ...
8752 (build_typeid): ... here. Adjust call to
8753 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
8754 throw_bad_typeid expression.
8755 (get_tinfo_fn_unused): Rename to ...
8756 (get_tinfo_decl): ... here. Adjust comment.
8757 (get_tinfo_fn): Delete.
8758 (tinfo_from_decl): New static function.
8759 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
8760 (get_typeid): Use complete_type_or_else.
8761 (build_dynamic_cast_1): Adjust calls to
8762 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
8763 * parse.y (primary): Adjust call to build_typeid.
8764 * except.c (build_eh_type_type_ref): Adjust call to
8765 get_tinfo_decl. Mark as used.
8766 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
8767 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
8768 * parse.c: Regenerated.
8770 2000-01-17 Mark Mitchell <mark@codesourcery.com>
8772 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
8774 (resolves_to_fixed_type_p): Document calling convention.
8775 * rtti.c (build_x_typeid): Initialize NONNULL.
8777 * cp-tree.h (build_shared_int_cst): New function.
8778 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
8779 * class.c (modify_vtable_entry): Likewise.
8780 (add_virtual_function): Split out code to generated shared
8781 INTEGER_CSTs to build_share_int_cst.
8782 (modify_all_vtables): Handle all the overridden functions here.
8783 Add overridden functions from non-primary virtual bases to the
8785 (finish_struct_1): Adjust call to modify_all_vtables. Add
8786 overridden functions from non-primary bases to the vtable.
8787 * tree.c (build_shared_int_cst): New function.
8789 * cp-tree.h (scratchalloc): Remove.
8790 (build_scratch_list): Likewise.
8791 * call.c (convert_class_to_reference): Replace build_scratch_list
8792 and build_expr_list with build_tree_list.
8793 (add_candidate): Replace scratchalloc with expralloc. Note memory
8795 (build_user_type_conversion_1): Replace build_scratch_list
8796 and build_expr_list with build_tree_list.
8797 (build_new_op): Likewise.
8798 (build_op_delete_call): Likewise.
8799 (convert_like): Likewise.
8800 * cvt.c (ocp_convert): Likewise.
8801 * decl.c (start_decl): Likewise.
8802 (start_function): Likewise.
8803 (finish_destructor_body): Likewise.
8804 (maybe_build_cleanup_1): Likewise.
8805 * decl2.c (reparse_decl_as_expr): Likewise.
8806 * init.c (perform_member_init): Likewise.
8807 (expand_cleanup_for_base): Likewise.
8808 (build_builtin_delete_call): Likewise.
8809 (build_new_1): Likewise.
8810 (build_delete): Likewise.
8811 * method.c (do_build_assign_ref): Likewise.
8812 * parse.y (already_scoped_stmt): Likewise.
8813 (nontrivial_exprlist): Likewise.
8814 (net_initializer): Likewise.
8815 (initlist): Likewise.
8816 * parse.c: Regenerated.
8817 * rtti.c (build_x_typeid): Likewise.
8818 (build_dynamic_cast_1): Likewise.
8819 * typeck.c (build_x_compound_expr): Likewise.
8820 (build_static_cast): Likewise.
8821 (build_modify_expr): Likewise.
8823 * cp-tree.h (DECL_VINDEX): Add documentation.
8824 * class.c (build_vtable_entry): Likewise.
8825 (start_vtable): Add comment.
8826 (add_virtual_function): Replace pending_hard_virtuals with
8827 overridden_virtuals and pending_virtuals with new_virtuals.
8828 Replace redundant assignments with assertions.
8829 (check_for_override): Add comment.
8830 (check_bases_and_members): Replace pending_hard_virtuals with
8831 overridden_virtuals and pending_virtuals with new_virtuals.
8832 (create_vtbl_ptr): Likewise.
8833 (layout_class_type): Likewise.
8834 (finish_struct_1): Likewise. Add comments.
8836 2000-01-16 Mark Mitchell <mark@codesourcery.com>
8838 * class.c (finish_struct_1): Replace redundant code with
8841 * cp-tree.h (flag_new_abi): Move.
8842 (flag_use_cxa_atexit): Likewise.
8843 (flag_honor_std): Likewise.
8844 (flag_rtti): Likewise.
8845 (vbase_offsets_in_vtable_p): Define.
8846 (vptrs_present_everywhere_p): Likewise.
8847 (TYPE_CONTAINS_VPTR_P): Likewise.
8848 (dfs_walk_real): Declare.
8849 * class.c (build_vbase_pointer_fields): Check
8850 vbase_offsets_in_vtable_p.
8851 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
8853 (build_vbase_offset_vtbl_entries): Simplify.
8854 (build_vbase_offset_vtbl_entries): Adjust.
8855 (build_vbase_pointer): Add ability to look up vbase offsets in
8857 (start_vtable): New function.
8858 (add_virtual_function): Use it.
8859 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
8860 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
8861 (build_vtbl_initializer): Take the type of the complete object as
8862 input. Use it to correctly calculate vbase offsets.
8863 (dfs_finish_vtbls): Pass the complete type to
8864 build_vtbl_initializer.
8865 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
8866 (create_vtable_ptr): Create a vtable even if there are no
8867 new virtual functions, under the new ABI.
8868 (finish_struct_1): Likewise.
8869 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
8870 * decl.c (exapnd_static_init): Remove call to
8871 preserve_initializer.
8872 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
8874 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
8875 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
8876 (construct_virtual_bases): Don't initialize virtual base pointers
8878 (build_aggr_init): Clean up comment.
8879 (expand_aggr_init_1): Likewise.
8880 * rtti.c (expand_class_desc): Store the virtual function table
8881 index where the vbase offset lives in the offset field.
8882 * search.c (dfs_walk_real): Make it global.
8883 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
8884 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
8886 * tinfo.h (USItype): Make it signed under the new ABI.
8887 * tinfo.cc (convert_to_base): New function. Encapsulate base
8888 conversion logic here.
8889 (__class_type_info::do_upcast): Use it.
8890 (__class_type_info::do_dyncast): Likewise.
8891 (__class_type_info::do_find_public_subobj): Likewise.
8893 * init.c (construct_virtual_bases): Don't look up the addresses of
8894 virtual bases at run-time.
8896 * class.c (build_vbase_pointer): Relocate.
8897 (build_vbase_pointer_fields): Likewise.
8898 (dfs_build_vbase_offset_vtbl_entries): Likewise.
8899 (build_vbase_offset_vtbl_entries): Likewise.
8901 * decl.c (init_decl_processing): Complain if -fnew-abi
8902 -fno-vtable-thunks is used.
8904 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
8907 2000-01-15 Mark Mitchell <mark@codesourcery.com>
8909 * cp-tree.h (num_extra_vtbl_entries): New function.
8910 (size_extra_vtbl_entries): Likewise.
8911 (dfs_vtable_path_unmark): Likewise.
8912 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
8913 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
8914 * class.c (num_extra_vtbl_entries): New function.
8915 (size_extra_vtbl_entries): Likewise.
8916 (dfs_build_vbase_offset_vtbl_entries): New function.
8917 (build_vbase_offset_vtbl_entries): Likewise.
8918 (build_vtbl_initializer): Use it.
8919 (finish_struct_1): Adjust vtable sizes (using
8920 num_extra_vtbl_entries).
8921 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
8922 THUNK_DECL is non-NULL before expanding it.
8923 * init.c (expand_virtual_init): Adjust the vtable pointer by
8924 size_extra_vtbl_entries before storing it.
8925 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
8926 Handle TREE_LIST parameters here, not in the dfs_* functions.
8927 (dfs_unmarked_real_bases_queue_p): Adjust.
8928 (dfs_marked_real_bases_queue_p): Likewise.
8929 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
8930 (dfs_vtable_path_marked_real_bases_queue_p): New function.
8931 (dfs_vtable_path_unmark): Likewise.
8933 2000-01-14 Mark Mitchell <mark@codesourcery.com>
8935 * optimize.c (copy_body_r): Clear the operand three of a
8936 TARGET_EXPR when copying it.
8938 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8940 * method.c (build_decl_overload_real): Check whether we are in ::
8941 before returning __builtin_new/delete.
8943 2000-01-13 Mark Mitchell <mark@codesourcery.com>
8945 * pt.c (tsubst_friend_function): Improve comment.
8946 (instantiate_decl): Avoid crashing when a "nested" function is
8947 instantiated from the top level.
8949 * dump.c (dqeueue_and_dump): Dump
8950 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
8952 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8954 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
8956 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
8958 * g++spec.c (lang_specific_driver): Add -fnew-abi if
8959 ENABLE_NEW_GXX_ABI defined.
8960 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
8961 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
8962 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
8964 2000-01-12 Mark Mitchell <mark@codesourcery.com>
8966 * decl.c (start_cleanup_fn): Call pushdecl.
8968 * call.c (convert_class_to_reference): Fix typos.
8969 (build_conditional_expr): Handle errors gracefully.
8970 * class.c (push_nested_class): Likewise.
8971 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
8972 (DECL_THIS_EXTERN): Use it.
8973 (DECL_THIS_STATIC): Likewise.
8974 * cvt.c (convert_to_void): Handle errors gracefully.
8975 (build_expr_type_conversion): Likewise.
8976 * decl.c (maybe_push_decl): Likewise.
8977 (start_decl_1): Likewise.
8978 (require_complete_types_for_parms): Likewise.
8979 * parse.y (structsp): Likewise.
8980 (base_class): Likewise.
8981 * parse.c: Regenerated.
8982 * pt.c (finish_member_template_decl): Likewise.
8983 * typeck.c (decay_conversion): Likewise.
8985 * cp-tree.h (dfs_skip_vbases): New function.
8986 (find_vbase_instance): Likewise.
8987 * class.c (determine_primary_base): Allow a nearly empty base to
8988 serve as a primary base class under the new ABI.
8989 (get_class_offset_1): Rename to ...
8990 (dfs_get_class_offset): ... this. Simplify. Don't issue error
8992 (get_class_offset): Use it. Issue error messages here.
8993 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
8994 find the right copies of virtual bases.
8995 (fixup_vtable_deltas1): Rename to ...
8996 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
8997 bases as primary bases.
8998 (fixup_vtable_deltas): Remove.
8999 (override_one_vtable): Handle virtual bases as primary bases.
9000 (merge_overrides): Likewise.
9001 (finish_struct_1): Likewise.
9002 (dump_class_hierarchy): Dump primary-ness of bases as well.
9003 * search.c (mark_primary_bases): Use a pre-order traversal to
9004 handle primary virtual bases.
9005 (dfs_skip_vbases): New fiunction.
9006 (expand_upcast_fixups): Adjust to handle primary virtual bases.
9007 (fixup_virtual_upcast_offsets): Likewise.
9008 (fixup_all_virtual_upcast_offsets): Likewise.
9009 (dfs_find_vbase_instances): New function.
9010 (find_vbase_instance): Likewise.
9012 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
9014 * lex.c (DIR_SEPARATOR): Delete macro.
9016 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
9018 * decl2.c (lang_decode_option): Handle automatic line wrapping
9021 2000-01-11 Mark Mitchell <mark@codesourcery.com>
9023 * friend.c (do_friend): Don't resolve scopes when processing
9024 template declarations, even if the qualifying scope doesn't
9025 involve template parameters.
9027 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
9029 * class.c (dfs_modify_vtables_queue_p): Remove.
9030 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
9031 and dfs_marked_real_bases_queue_p instead of
9032 dfs_modify_vtables_queue_p.
9034 * class.c (build_vbase_path): Simplify.
9035 (dfs_propagate_binfo_offsets): New function.
9036 (propagate_binfo_offsets): Use it.
9037 (remove_base_field): Simplify.
9038 (dfs_set_offset_for_vbases): Remove.
9039 (dfs_set_offset_for_shared_vbases): New function.
9040 (dfs_set_offset_for_unshared_vbases): Likewise.
9041 (layout_virtual_bases): Use them.
9042 (layout_basetypes): Don't call propagate_binfo_offsets.
9043 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
9046 * class.c (build_base_field): New function, split out from ...
9047 (build_base_fields): ... here. Use it. Allocate primary bases
9048 first, under the new ABI.
9049 (get_vtable_entry): Remove.
9050 (remove_base_field): New function, split out from ...
9051 (remove_base_fields): ... here. Adjust since primary bases come
9052 first under the new ABI.
9054 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
9055 (initialize_vtbl_ptrs): New function.
9056 (expand_indirect_vtbls_init): Change prototype.
9057 (convert_pointer_to_vbase): Declare.
9058 * init.c (expand_direct_vtbls_init): Remove.
9059 (dfs_initialize_vtbl_ptrs): New function.
9060 (initialize_vtbl_ptrs): Likewise.
9061 (emit_base_init): Use initialize_vtbl_ptrs.
9062 * search.c (convert_pointer_to_vbase): Make it global.
9063 (expand_indirect_vtbls_init): Remove vtable initialization code.
9064 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
9066 * class.c (dfs_finish_vtbls): New function.
9067 (finish_vtbls): Use it.
9068 (dump_class_hierarchy): New function.
9070 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
9071 (BINFO_VBASE_PRIMARY_P): New macro.
9072 (BINFO_VIRTUALS): Add to documentation.
9073 (SET_BINFO_PRIMARY_MARKED_P): Remove.
9074 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9075 (dfs_mark_primary_bases_queue_p): Likewise.
9076 (dfs_unmarked_real_bases_queue_p): New function.
9077 (dfs_marked_real_bases_queue_p): Likewise.
9078 * search.c (dfs_mark_primary_bases): Adjust.
9079 (mark_primary_bases): Likewise.
9080 (get_shared_vbase_if_not_primary): New function.
9081 (dfs_unmarked_real_bases_queue_p): Likewise.
9082 (dfs_marked_real_bases_queue_p): Likewise.
9083 (dfs_get_pure_virtuals): Simplify.
9084 (get_pure_virtuals): Likewise.
9086 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9088 * lex.c: Include tm_p.h.
9090 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
9092 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
9094 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
9096 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
9097 * pt.c (instantiate_decl): Defer comdat templates that might not be
9100 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
9101 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
9102 (finish_file): Likewise.
9104 * decl2.c (import_export_class): Undo 12/14 change.
9106 * error.c (dump_decl): operator new, not operatornew.
9108 * class.c (field_decl_cmp): A nontype is "greater" than a type.
9109 * search.c (lookup_field_1): Look for the last field with the
9112 2000-01-05 Nathan Sidwell <nathan@acm.org>
9114 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
9117 2000-01-05 Nathan Sidwell <nathan@acm.org>
9119 * typeck.c (build_static_cast): Don't strip target qualifiers
9120 when casting from a class.
9122 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9124 * class.c (warn_hidden): Initialize variable `fndecl'.
9126 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
9128 * decl.c (flag_isoc9x): New variable to be able to use code in
9129 c-common.c. For now always zero.
9131 2000-01-03 Mark Mitchell <mark@codesourcery.com>
9133 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
9134 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
9135 or unshare_base_binfos for virtual bases here.
9136 * search.c (dfs_get_vbase_types): Do it here.
9137 (get_vbase_types): Adjust.
9139 2000-01-02 Mark Mitchell <mark@codesourcery.com>
9141 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
9142 (BINFO_PRIMARY_MARKED_P): Use flag 5.
9143 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9144 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9145 (unmark_primary_bases): Remove declaration.
9146 (unmarkedp): Declare.
9147 (dfs_vbase_unmark): Likewise.
9148 * class.c (determine_primary_base): Return immediately if there
9149 are no base classes. Call mark_primary_bases here.
9150 (modify_all_direct_vtables): Remove.
9151 (modify_all_indirect_vtables): Remove.
9152 (dfs_modify_vtables_queue_p): New function.
9153 (dfs_modify_vtables): New function.
9154 (modify_all_vtables): Use them.
9155 (build_base_fields): Build FIELD_DECLs for primary virtual base
9157 (create_vtable_ptr): Don't call determine_primary_base here.
9158 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
9159 (dfs_set_offset_for_vbases): ... this.
9160 (layout_virtual_bases): Use it.
9161 (layout_class_type): Call determine_primary_base here.
9162 * search.c (unmarkedp): Make it global.
9163 (shared_marked_p): Simplify.
9164 (shared_unmarked_p): Likewise.
9165 (dfs_primary_bases_queue_p): Remove.
9166 (dfs_unmark_primary_bases): Likewise.
9167 (unmark_primary_bases): Likewise.
9168 (mark_primary_bases): Simplify.
9169 (get_pure_virtuals): Don't call mark_primary_bases here.
9170 (dfs_vbase_unmark): New function.
9171 (get_vbase_types): Simplify.
9173 * class.c (struct base_info): Remove.
9174 (determine_primary_base): Take has_virtual_p rather than a
9175 base_info as input. Don't calculate max_has_virtual.
9176 (finish_struct_bits): Remove max_has_virtual argument.
9177 (create_vtable_ptr): Remove max_has_virtual_p argument.
9178 (layout_virtual_bases): Remove max argument.
9179 (layout_basetypes): Likewise.
9180 (layout_class_type): Remove max_has_virtual_p argument.
9181 (finish_struct_1): Remove max_has_virtual.
9183 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
9184 (layout_basetypes): Remove.
9185 * class.c (propagate_binfo_offsets): Moved here from tree.c.
9186 Update to handle primary virtual bases.
9187 (remove_base_fields): New function, split out from
9189 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
9190 (layout_virtual_bases): New function, split out from
9191 layout_basetypes. Update to handle primary virtual bases.
9192 (layout_basetypes): Moved here from tree.c. Use
9193 remove_base_fields and layout_virtual_bases.
9194 * search.c (dfs_mark_primary_bases_queue_p): New function.
9195 (mark_primary_bases): Use it.
9196 * tree.c (CEIL): Remove.
9197 (propagate_binfo_offsets): Remove.
9198 (layout_basetypes): Remove.
9200 2000-01-01 Mark Mitchell <mark@codesourcery.com>
9202 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
9203 (BINFO_PRIMARY_MARKED_P): New macro.
9204 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9205 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9206 (mark_primary_bases): New function.
9207 (unmark_primary_bases): Likewise.
9208 * search.c (get_abstract_virtuals_1): Remove.
9209 (dfs_mark_primary_bases): New function.
9210 (mark_primary_bases): Likewise.
9211 (dfs_unmark_primary_bases): Likewise.
9212 (unmark_primary_bases): Likewise.
9213 (dfs_get_pure_virtuals): Likewise.
9215 2000-01-01 Mark Mitchell <mark@codesourcery.com>
9217 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
9218 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
9219 (modify_one_vtable): Adjust.
9220 (fixup_vtable_deltas1): Likewise.
9221 (override_one_vtable): Likewise.
9222 * search.c (get_abstract_virtuals_1): Likewise.
9223 (get_pure_virtuals): Likewise.
9224 (expand_upcast_fixups): Likewise.
9225 * tree.c (debug_binfo): Likewise.
9227 * class.c (build_vtable): Don't return a value. Don't rebuild
9228 vtables for bases that have already been handled.
9229 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
9230 already been handled.
9231 (modify_one_vtable): Adjust accordingly.
9232 (fixup_vtable_deltas1): Likewise.
9233 (finish_struct_1): Likewise.
9235 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9237 * call.c (build_new_method_call): Also check destructors.