1169689Skan2000-12-29 Jakub Jelinek <jakub@redhat.com> 2169689Skan 3169689Skan * decl.c (init_decl_processing): Fix sign of wchar_type_node. 4169689Skan 5169689Skan2000-12-29 Mark Mitchell <mark@codesourcery.com> 6169689Skan 7169689Skan * class.c (pushclass): Remove #if 0'd code. 8169689Skan * cp-tree.h (overload_template_name): Remove. 9169689Skan * decl.c (store_bindings): Simplify. 10169689Skan (pop_from_top_level): Likewise. 11169689Skan * pt.c (overload_template_name): Remove. 12169689Skan (instantiate_decl): Don't call push_to_top_level if it's not 13169689Skan needed. 14169689Skan 15169689Skan2000-12-28 Mark Mitchell <mark@codesourcery.com> 16169689Skan 17169689Skan * pt.c (register_local_specialization): Don't return a value. 18169689Skan (lookup_template_class): Use move-to-front heuristic when looking 19169689Skan up template instantiations. 20169689Skan (instantiate_decl): Only push_to_top_level when we're actually 21169689Skan going to instantiate the template. 22169689Skan 23169689Skan2000-12-29 Hans-Peter Nilsson <hp@bitrange.com> 24169689Skan 25169689Skan * search.c (binfo_for_vtable): Return least derived class, not 26169689Skan most. Handle secondary vtables. 27169689Skan 28169689Skan2000-12-22 Jason Merrill <jason@redhat.com> 29169689Skan 30169689Skan * pt.c (more_specialized): Don't optimize len==0. 31169689Skan (fn_type_unification): If we're adding the return type, increase len. 32169689Skan 33169689Skan * typeck.c (build_binary_op): Fix pmf comparison logic. 34169689Skan 35169689Skan * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not 36169689Skan DECL_STATIC_FUNCTION_P. 37169689Skan 38169689Skan * semantics.c (genrtl_finish_function): Don't try to jump to 39169689Skan return_label unless it exists. 40169689Skan 41169689Skan In partial ordering for a call, ignore parms for which we don't have 42169689Skan a real argument. 43169689Skan * call.c (joust): Pass len to more_specialized. 44169689Skan (add_template_candidate_real): Strip 'this', pass len. 45169689Skan * pt.c (more_specialized): Pass len down. Lose explicit_args parm. 46169689Skan (get_bindings_order): New fn. Pass len down. 47169689Skan (get_bindings_real): Strip 'this', pass len. 48169689Skan (fn_type_unification): Likewise. 49169689Skan (type_unification_real): Succeed after checking 'len' args. 50169689Skan (most_specialized_instantiation): Lose explicit_args parm. 51169689Skan * class.c (resolve_address_of_overloaded_function): Strip 'this', 52169689Skan pass len. 53169689Skan 54169689Skan2000-12-21 Jason Merrill <jason@redhat.com> 55169689Skan 56169689Skan * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not 57169689Skan DECL_TEMPLATE_RESULT. 58169689Skan 59169689Skan * search.c (lookup_field_r): Call lookup_fnfields_1, not 60169689Skan lookup_fnfields_here. 61169689Skan 62169689Skan * parse.y (typename_sub2): Return the TYPE_DECL, not the type. 63169689Skan 64169689Skan * call.c (build_object_call): Also allow conversions that return 65169689Skan reference to pointer to function. 66169689Skan (add_conv_candidate): Handle totype being ref to ptr to fn. 67169689Skan (build_field_call): Also allow members of type reference to function. 68169689Skan Lose support for calling pointer to METHOD_TYPE fields. 69169689Skan 70169689Skan * error.c (dump_expr): Handle *_CAST_EXPR. 71169689Skan 72169689Skan * typeck2.c (build_scoped_ref): Always convert to the naming class. 73169689Skan 74169689Skan * tree.c (break_out_cleanups): Lose. 75169689Skan * cp-tree.h: Remove prototype. 76169689Skan * typeck.c (build_component_ref): Don't break_out_cleanups. 77169689Skan (build_compound_expr): Likewise. 78169689Skan * semantics.c (finish_expr_stmt): Likewise. 79169689Skan 80169689Skan2000-12-20 Richard Henderson <rth@redhat.com> 81169689Skan 82169689Skan * cp-tree.h: Update declarations. 83169689Skan * decl.c (finish_case_label): Return the new stmt node. 84169689Skan * semantics.c (finish_goto_stmt): Likewise. 85169689Skan (finish_expr_stmt, finish_return_stmt): Likewise. 86169689Skan (finish_break_stmt, finish_continue_stmt): Likewise. 87169689Skan (finish_asm_stmt): Likewise. 88169689Skan * parse.y (already_scoped_stmt): Set STMT_LINENO. 89169689Skan (compstmt, implicitly_scoped_stmt, stmt): Likewise. 90169689Skan (simple_if, simple_stmt): Return the new stmt node. 91169689Skan (save_lineno): New. 92169689Skan 93169689Skan2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk> 94169689Skan 95169689Skan * cp-tree.h: Don't declare warn_long_long. 96169689Skan 97169689Skan2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 98169689Skan 99169689Skan * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of 100169689Skan IS_AGGR_TYPE. 101169689Skan 102169689Skan2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 103169689Skan 104169689Skan * pt.c (unify): Handle when both ARG and PARM are 105169689Skan BOUND_TEMPLATE_TEMPLATE_PARM. 106169689Skan 107169689Skan2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 108169689Skan 109169689Skan * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and 110169689Skan DECL_TEMPLATE_PARM_P. 111169689Skan 112169689Skan2000-12-15 Jason Merrill <jason@redhat.com> 113169689Skan 114169689Skan * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs! 115169689Skan 116169689Skan * init.c (build_new_1): Don't strip quals from type. 117169689Skan 118169689Skan * decl.c (pushdecl): Don't check for linkage on a non-decl. 119169689Skan 120169689Skan * call.c (build_op_delete_call): See through ARRAY_TYPEs. 121169689Skan 122169689Skan * call.c (build_new_function_call): Lose space before paren in 123169689Skan error message. 124169689Skan (build_new_method_call): Likewise. 125169689Skan 126169689Skan * typeck2.c (build_m_component_ref): Propagate quals from datum. 127169689Skan 128169689Skan2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 129169689Skan 130169689Skan * pt.c (check_explicit_specialization): Propagate default 131169689Skan function arguments to explicit specializations. 132169689Skan 133169689Skan2000-12-13 DJ Delorie <dj@redhat.com> 134169689Skan 135169689Skan * typeck.c (build_binary_op): Do signed/unsigned warnings for >? 136169689Skan and <? operators. 137169689Skan 138169689Skan2000-12-08 Jason Merrill <jason@redhat.com> 139169689Skan 140169689Skan * error.c (dump_function_name): Don't let the user see __comp_ctor. 141169689Skan 142169689Skan Clean up copy-initialization in overloading code. 143169689Skan * call.c (build_user_type_conversion_1): Die if we are asked to 144169689Skan convert to the same or a base type. 145169689Skan (implicit_conversion): Avoid doing so. Lose reference binding code. 146169689Skan (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit 147169689Skan direct-initialization. Also do direct-init part of copy-init. 148169689Skan (build_user_type_conversion): Don't provide context to convert_like. 149169689Skan * cvt.c (ocp_convert): build_user_type_conversion will now provide 150169689Skan the constructor call for copy-init. 151169689Skan 152169689Skan * pt.c (tsubst_decl): Call clone_function_decl here if this is an 153169689Skan instantiation of a member template. 154169689Skan (do_decl_instantiation): Not here. 155169689Skan 156169689Skan2000-12-07 Nathan Sidwell <nathan@codesourcery.com> 157169689Skan 158169689Skan * class.c (check_field_decls): Don't special case anonymous 159169689Skan fields in error messages. 160169689Skan (note_name_declared_in_class): Use %D on diagnostic. 161169689Skan 162169689Skan * tree.c (pod_type_p): Use strip_array_types. 163169689Skan (cp_valid_lang_attribute): Likewise. 164169689Skan * typeck.c (cp_type_quals): Strip arrays separately, to avoid 165169689Skan multiple evaluations. 166169689Skan (cp_has_mutable_p): Use strip_array_types. 167169689Skan 168169689Skan2000-12-07 Nathan Sidwell <nathan@codesourcery.com> 169169689Skan 170169689Skan * cp-tree.h (sufficient_parms_p): Declare new function. 171169689Skan * call.c (sufficient_parms_p): New function, broken out of ... 172169689Skan (add_function_candidate): ... here. Use it. 173169689Skan (add_conv_candidate): Use it. 174169689Skan * decl.c (grok_ctor_properties): Use it. 175169689Skan 176169689Skan2000-12-07 Jakub Jelinek <jakub@redhat.com> 177169689Skan 178169689Skan * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT. 179169689Skan 180169689Skan2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk> 181169689Skan 182169689Skan * decl2.c (lang_decode_option): Handle -Wformat-security. 183169689Skan 184169689Skan2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 185169689Skan 186169689Skan * pt.c (verify_class_unification): New function. 187169689Skan (get_class_bindings): Use it. 188169689Skan (try_class_unification): Tidy. 189169689Skan (unify): Handle when argument of a template-id is not 190169689Skan template parameter dependent. 191169689Skan (template_args_equal): Handle when TREE_CODE's do not match. 192169689Skan 193169689Skan2000-12-06 Alexandre Oliva <aoliva@redhat.com> 194169689Skan 195169689Skan * lang-specs.h (c++): When invoking the stand-alone preprocessor 196169689Skan for -save-temps, pass all relevant -Defines to it, and then don't 197169689Skan pass them to cc1plus. 198169689Skan 199169689Skan2000-12-05 Will Cohen <wcohen@redhat.com> 200169689Skan 201169689Skan * decl.c (finish_case_label): Cleared 202169689Skan more_cleanups_ok in surrounding function scopes. 203169689Skan (define_label): Likewise. 204169689Skan 205169689Skan2000-12-05 Nathan Sidwell <nathan@codesourcery.com> 206169689Skan 207169689Skan * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document. 208169689Skan (get_matching_virtual): Remove. 209169689Skan (look_for_overrides): Declare new function. 210169689Skan * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or 211169689Skan DECL_VINDEX here. 212169689Skan * class.c (check_for_override): Move base class iteration code 213169689Skan to look_for_overrides. 214169689Skan * search.c (next_baselink): Remove. 215169689Skan (get_virtuals_named_this): Remove. 216169689Skan (get_virtual_destructor): Remove. 217169689Skan (tree_has_any_destructors_p): Remove. 218169689Skan (struct gvnt_info): Remove. 219169689Skan (check_final_overrider): Remove `virtual' from error messages. 220169689Skan (get_matching_virtuals): Remove. Move functionality to ... 221169689Skan (look_for_overrides): ... here, and ... 222169689Skan (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found 223169689Skan to be overriding. 224169689Skan 225169689Skan2000-12-05 Nathan Sidwell <nathan@codesourcery.com> 226169689Skan 227169689Skan * typeck.c (get_delta_difference): If via a virtual base, 228169689Skan return zero. 229169689Skan * cvt.c (cp_convert_to_pointer): If via a virtual base, do no 230169689Skan adjustment. 231169689Skan 232169689Skan2000-12-04 Richard Henderson <rth@redhat.com> 233169689Skan 234169689Skan * error.c (dump_tree): Use output_add_string not OB_PUTS. 235169689Skan 236169689Skan2000-12-04 Jason Merrill <jason@redhat.com> 237169689Skan 238169689Skan * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector". 239169689Skan (write_builtin_type): Pass intSI_type_node and the like through 240169689Skan type_for_mode. 241169689Skan * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'. 242169689Skan Pass intSI_type_node and the like through type_for_mode. 243169689Skan * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE. 244169689Skan * pt.c (tsubst, unify): Likewise. 245169689Skan * tree.c (walk_tree): Likewise. 246169689Skan * error.c (dump_type): Likewise. 247169689Skan (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE. 248169689Skan 249169689Skan * Make-lang.in: Tweak top comment for emacs. 250169689Skan (cp/TAGS): Restore. 251169689Skan 252169689Skan * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw. 253169689Skan 254169689Skan * class.c (clone_function_decl): Robustify. 255169689Skan 256169689Skan2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de> 257169689Skan 258169689Skan * decl.c (store_bindings): Only search in the non modified 259169689Skan old_bindings for duplicates. 260169689Skan 261169689Skan2000-12-04 Nathan Sidwell <nathan@codesourcery.com> 262169689Skan 263169689Skan * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not 264169689Skan TYPE_POLYMORPHIC_P. 265169689Skan 266169689Skan * typeck.c (build_static_cast): Remove unused variable. 267169689Skan 268169689Skan2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 269169689Skan 270169689Skan * pt.c: Fix typo in comment. 271169689Skan 272169689Skan2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk> 273169689Skan 274169689Skan * decl2.c (warn_format): Remove definition. 275169689Skan (lang_decode_option): Handle -Wformat-nonliteral, 276169689Skan -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat. 277169689Skan 278169689Skan2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk> 279169689Skan 280169689Skan * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define. 281169689Skan (init_decl_processing): Don't create string_type_node, 282169689Skan const_string_type_node, wint_type_node, intmax_type_node, 283169689Skan uintmax_type_node, default_function_type, ptrdiff_type_node and 284169689Skan unsigned_ptrdiff_type_node. Adjust position of call to 285169689Skan c_common_nodes_and_builtins. 286169689Skan (identifier_global_value): New function. 287169689Skan 288169689Skan2000-12-01 Nathan Sidwell <nathan@codesourcery.com> 289169689Skan 290169689Skan * call.c (standard_conversion): Reject pointer to member 291169689Skan conversions from ambiguous, inaccessible or virtual bases. 292169689Skan * typeck.c (build_static_cast): Don't check pointers to members 293169689Skan specially. 294169689Skan 295169689Skan2000-11-30 Nathan Sidwell <nathan@codesourcery.com> 296169689Skan 297169689Skan * method.c (do_build_copy_constructor): Preserve cv 298169689Skan qualifications when accessing source object members. 299169689Skan (do_build_assign_ref): Likewise. Remove separate diagnostics for 300169689Skan unnamed fields. 301169689Skan 302169689Skan2000-11-30 Nathan Sidwell <nathan@codesourcery.com> 303169689Skan 304169689Skan * method.c (do_build_assign_ref): Construct appropriately 305169689Skan CV-qualified base reference. Don't allow const casts in base 306169689Skan conversion. 307169689Skan 308169689Skan2000-11-30 Nathan Sidwell <nathan@codesourcery.com> 309169689Skan 310169689Skan * call.c (build_over_call): Use VOID_TYPE_P. Don't die on 311169689Skan incomplete return type. 312169689Skan 313169689Skan2000-11-28 Nathan Sidwell <nathan@codesourcery.com> 314169689Skan 315169689Skan * parse.y (base_class.1): Produce a _TYPE not a _DECL. 316169689Skan * semantics.c (finish_base_specifier): Accept a _TYPE not a 317169689Skan _DECL. 318169689Skan 319169689Skan2000-11-28 Nathan Sidwell <nathan@codesourcery.com> 320169689Skan 321169689Skan * spew.c (yyerror): Cope if yylval.ttype is NULL. 322169689Skan 323169689Skan2000-11-28 Nathan Sidwell <nathan@codesourcery.com> 324169689Skan 325169689Skan * decl.c (grokdeclarator): Diagnose undefined template contexts. 326169689Skan 327169689Skan2000-11-28 Nathan Sidwell <nathan@codesourcery.com> 328169689Skan 329169689Skan * decl.c (grokdeclarator): Do type access control on friend 330169689Skan class. 331169689Skan 332169689Skan2000-11-27 Nathan Sidwell <nathan@codesourcery.com> 333169689Skan 334169689Skan * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by 335169689Skan bison parser ickiness. 336169689Skan * pt.c (tsubst_friend_function): Enter namespace scope when 337169689Skan tsubsting the function name. 338169689Skan * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality. 339169689Skan 340169689Skan2000-11-27 Nathan Sidwell <nathan@codesourcery.com> 341169689Skan 342169689Skan * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo. 343169689Skan * cvt.c (cp_convert_to_pointer): Add force parameter. 344169689Skan Allow conversions via virtual base if forced. 345169689Skan (convert_to_pointer_force): Adjust call to cp_convert_to_pointer. 346169689Skan (ocp_convert): Likewise. 347169689Skan * search.c (binfo_from_vbase): Return the virtual base's binfo. 348169689Skan * typeck.c (get_delta_difference): Adjust handling of virtual 349169689Skan bases. 350169689Skan 351169689Skan2000-11-26 Mark Mitchell <mark@codesourcery.com> 352169689Skan 353169689Skan * tree.c (struct list_hash): Remove. 354169689Skan (list_hash_table): Make it be an htab. 355169689Skan (struct list_proxy): New type. 356169689Skan (list_hash_eq): New function. 357169689Skan (list_hash_pieces): Renamed from ... 358169689Skan (list_hash): ... this. 359169689Skan (list_hash_lookup): Remove. 360169689Skan (list_hash_add): Remove. 361169689Skan (hash_tree_cons): Use the generic hashtable. 362169689Skan (mark_list_hash): Remove. 363169689Skan (init_tree): Create the hashtable. 364169689Skan 365169689Skan2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk> 366169689Skan 367169689Skan * method.c (build_mangled_C9x_name): Rename to 368169689Skan build_mangled_C99_name. Change C9X references in comments to 369169689Skan refer to C99. 370169689Skan 371169689Skan2000-11-24 Nathan Sidwell <nathan@codesourcery.com> 372169689Skan 373169689Skan * parse.y (unary_expr): Move VA_ARG from here ... 374169689Skan (primary): ... to here. 375169689Skan 376169689Skan2000-11-24 Nathan Sidwell <nathan@codesourcery.com> 377169689Skan 378169689Skan * semantics.c (finish_id_expr): If type is error_mark, return 379169689Skan error_mark. 380169689Skan 381169689Skan2000-11-23 Nathan Sidwell <nathan@codesourcery.com> 382169689Skan 383169689Skan * pt.c (lookup_template_class): Simplify loop exit constructs. 384169689Skan Cope when there is no partial instantiation of a template 385169689Skan template member. 386169689Skan 387169689Skan2000-11-23 J"orn Rennecke <amylaar@redhat.com> 388169689Skan 389169689Skan * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H). 390169689Skan 391169689Skan2000-11-22 Mark Mitchell <mark@codesourcery.com> 392169689Skan 393169689Skan * mangle.c (mangle_conv_op_name_for_type): Don't use `__op' 394169689Skan prefix. 395169689Skan 396169689Skan * pt.c (do_decl_instantiate): Explicitly clone constructors and 397169689Skan destructors that haven't already been cloned. 398169689Skan 399169689Skan2000-11-20 Richard Henderson <rth@redhat.com> 400169689Skan 401169689Skan * parse.y (yyparse_1): Rename the parser entry point. 402169689Skan 403169689Skan2000-11-20 Alex Samuel <samuel@codesourcery.com> 404169689Skan 405169689Skan * mangle.c (write_name): Use <unscoped-name> for names directly in 406169689Skan function scope. 407169689Skan (write_unscoped_name): Accept names directly in function scope. 408169689Skan 409169689Skan2000-11-20 Nathan Sidwell <nathan@codesourcery.com> 410169689Skan 411169689Skan * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword. 412169689Skan * parse.y (extdef): Add EXPORT reduction. 413169689Skan * spew.c (yylex): Don't skip export here. 414169689Skan 415169689Skan2000-11-19 Mark Mitchell <mark@codesourcery.com> 416169689Skan 417169689Skan * decl.c (init_decl_processing): Correct name of pure virtual 418169689Skan function under the new ABI. 419169689Skan * rtti.c (throw_bad_cast): Likewise, for bad cast function. 420169689Skan (throw_bad_typeid): Likewise for bad typeid function. 421169689Skan 422169689Skan2000-11-18 Mark Mitchell <mark@codesourcery.com> 423169689Skan 424169689Skan * decl.c (grokparms): Don't even function types of `void' type, 425169689Skan either. 426169689Skan * mangle.c (write_type): Don't crash when confronted with the 427169689Skan error_mark_node. 428169689Skan 429169689Skan * decl.c (grokparms): Don't create parameters of `void' type. 430169689Skan 431169689Skan2000-11-17 Zack Weinberg <zack@wolery.stanford.edu> 432169689Skan 433169689Skan * lex.c (mark_impl_file_chain): Delete. 434169689Skan (init_parse): Remove call to ggc_add_string_root. No need to 435169689Skan ggc_strdup a string constant. Do not add impl_file_chain to GC 436169689Skan roots. 437169689Skan (handle_pragma_implementation): No need to ggc_strdup main_filename. 438169689Skan 439169689Skan2000-11-17 Nathan Sidwell <nathan@codesourcery.com> 440169689Skan 441169689Skan * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type. 442169689Skan 443169689Skan2000-11-17 Nathan Sidwell <nathan@codesourcery.com> 444169689Skan 445169689Skan * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro. 446169689Skan * decl.c (grokdeclarator): Don't reject void parms here. 447169689Skan (require_complete_types_for_parms): Simplify, use 448169689Skan complete_type_or_else. 449169689Skan (grokparms): Remove bitrot. Remove funcdef parm. 450169689Skan Deal with ellipsis parm lists here. 451169689Skan * semantics.c (finish_parmlist): Don't append void_list_node 452169689Skan here. Set PARMLIST_ELLIPSIS_P. 453169689Skan 454169689Skan2000-11-17 Nathan Sidwell <nathan@codesourcery.com> 455169689Skan 456169689Skan * typeck2.c (incomplete_type_error): Reorganize to avoid 457169689Skan excessive diagnostics. 458169689Skan 459169689Skan2000-11-16 Zack Weinberg <zack@wolery.stanford.edu> 460169689Skan 461169689Skan * lex.c (struct impl_files, internal_filename): Constify a char *. 462169689Skan 463169689Skan2000-11-16 Mark Mitchell <mark@codesourcery.com> 464169689Skan 465169689Skan * mangle.c (write_special_name_constructor): Don't generate 466169689Skan assembler junk when confronted with an old-style constructor. 467169689Skan (write_special_name_destructor): Likewise. 468169689Skan (mangle_decl_string): Do it here instead. 469169689Skan 470169689Skan2000-11-16 Nathan Sidwell <nathan@codesourcery.com> 471169689Skan 472169689Skan * call.c (op_error): Make error messages clearer. 473169689Skan 474169689Skan2000-11-15 Mark Mitchell <mark@codesourcery.com> 475169689Skan 476169689Skan * decl.c (wrapup_globals_for_namespace): Don't mark things 477169689Skan TREE_ASM_WRITTEN when they're not. 478169689Skan 479169689Skan2000-11-15 Jason Merrill <jason@redhat.com> 480169689Skan 481169689Skan * typeck2.c (friendly_abort): Uncount the error before handing 482169689Skan off to fancy_abort. 483169689Skan 484169689Skan2000-11-15 Nathan Sidwell <nathan@codesourcery.com> 485169689Skan 486169689Skan * typeck.c (lookup_anon_field): Cope with qv qualifiers. 487169689Skan 488169689Skan2000-11-14 Mark Mitchell <mark@codesourcery.com> 489169689Skan 490169689Skan * class.c (build_vtbl_initializer): Fix typo in comment. 491169689Skan * typeck.c (expr_sizeof): Don't crash on errors. 492169689Skan 493169689Skan2000-11-14 Jim Wilson <wilson@redhat.com> 494169689Skan 495169689Skan * lang-specs.h: Add %2 after %(cc1_options). 496169689Skan 497169689Skan2000-11-14 Richard Henderson <rth@redhat.com> 498169689Skan 499169689Skan * typeck.c (c_sizeof): Be strict about casting result value 500169689Skan back to c_size_type_node. 501169689Skan (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise. 502169689Skan 503169689Skan2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk> 504169689Skan 505169689Skan * typeck.c (build_unary_op): Use boolean_increment from 506169689Skan c-common.c, moving the relevant code there. 507169689Skan 508169689Skan2000-11-11 Jason Merrill <jason@redhat.com> 509169689Skan 510169689Skan * typeck.c (mark_addressable): Don't call put_var_into_stack. 511169689Skan 512169689Skan * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics 513169689Skan in inlines. 514169689Skan 515169689Skan2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 516169689Skan 517169689Skan * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy. 518169689Skan * lex.c (copy_lang_decl): Likewise. 519169689Skan 520169689Skan2000-11-09 Mark Mitchell <mark@codesourcery.com> 521169689Skan 522169689Skan * dump.c (cp_dump_tree): Don't dump function bodies here. 523169689Skan 524169689Skan * Make-lang.in (CXX_C_OBJS): Add c-dump.o. 525169689Skan (dump.o): Update dependency list. 526169689Skan * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove. 527169689Skan (flag_dump_translation_unit): Likewise. 528169689Skan (CP_TYPE_QUALS): Adjust definition. 529169689Skan (DECL_C_BIT_FIELD): Remove. 530169689Skan (SET_DECL_C_BIT_FIELD): Likewise. 531169689Skan (CLEAR_DECL_C_BIT_FIELD): Likewise. 532169689Skan (add_maybe_template): Likewise. 533169689Skan (strip_array_types): Likewise. 534169689Skan (dump_node_to_file): Likewise. 535169689Skan (cp_dump_tree): New function. 536169689Skan * decl.c (init_decl_processing): Set lang_dump_tree. 537169689Skan * decl2.c (flag_dump_translation_unit): Remove. 538169689Skan * dump.c: Move most of it to ../c-dump.c. 539169689Skan (cp_dump_tree): New function. 540169689Skan * pt.c (add_maybe_template): Remove. 541169689Skan * typeck.c (strip_array_types): Likewise. 542169689Skan 543169689Skan2000-11-07 Eric Christopher <echristo@redhat.com> 544169689Skan 545169689Skan * decl.c (init_decl_processing): Change definition of 546169689Skan __wchar_t to wchar_t. Remove artificial declaration of 547169689Skan wchar_t. 548169689Skan * lex.c: Change instances of __wchar_t to wchar_t. 549169689Skan 550169689Skan2000-11-09 Nathan Sidwell <nathan@codesourcery.com> 551169689Skan 552169689Skan * lex.c (do_identifier): Don't lookup_name for operators. 553169689Skan * parse.y (operator): Save looking_for_typename. 554169689Skan (unoperator): Restore it. 555169689Skan * spew.c (frob_opname): Use nth_token for lookahead. 556169689Skan 557169689Skan2000-11-08 Nathan Sidwell <nathan@codesourcery.com> 558169689Skan 559169689Skan * decl.c (grok_op_properties): Always use coerce_new_type and 560169689Skan coerce_delete_type. 561169689Skan * decl2.c (coerce_new_type): Use c_size_type_node. Preserve 562169689Skan exception specification. Tidy up. 563169689Skan (coerce_delete_type): Preserve exception specification. Tidy up. 564169689Skan 565169689Skan2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk> 566169689Skan 567169689Skan * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c 568169689Skan (push_binding_level), error.c (cp_tree_printer), pt.c 569169689Skan (process_partial_specialization, tsubst_template_arg_vector), 570169689Skan search.c (lookup_member): Use memset () instead of bzero (). 571169689Skan 572169689Skan2000-11-07 Nathan Sidwell <nathan@codesourcery.com> 573169689Skan 574169689Skan * decl.c (build_ptrmemfunc_type): Allow error_mark_node. 575169689Skan 576169689Skan2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk> 577169689Skan 578169689Skan * Make-lang.in (c++.distdir): Remove. 579169689Skan 580169689Skan2000-11-04 Mark Mitchell <mark@codesourcery.com> 581169689Skan 582169689Skan * decl2.c (do_nonmember_using_decl): Allow `extern "C"' 583169689Skan declarations from different namespaces to be combined. 584169689Skan 585169689Skan2000-11-03 Zack Weinberg <zack@wolery.stanford.edu> 586169689Skan 587169689Skan * decl.c: Include tm_p.h. 588169689Skan 589169689Skan2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk> 590169689Skan 591169689Skan * tree.c (cp_tree_equal): Use memcmp () instead of bcmp (). 592169689Skan 593169689Skan2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk> 594169689Skan 595169689Skan * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c 596169689Skan (build_overload_value), repo.c (open_repo_file), xref.c 597169689Skan (open_xref_file): Use strchr () and strrchr () instead of index () 598169689Skan and rindex (). 599169689Skan 600169689Skan2000-11-01 Bernd Schmidt <bernds@redhat.co.uk> 601169689Skan 602169689Skan * call.c (build_over_call): Call fold on the CALL_EXPR. 603169689Skan 604169689Skan2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com> 605169689Skan 606169689Skan * error.c (dump_template_decl): Separate template hearders with 607169689Skan space not comma. 608169689Skan 609169689Skan2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com> 610169689Skan 611169689Skan * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace 612169689Skan TS_* flags with corresponding TFF_*. Adjust prototypes of 613169689Skan functions (which used to take a tree_string_flags) to take an int. 614169689Skan 615169689Skan * cp-tree.h (enum tree_string_flags): Remove 616169689Skan (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, 617169689Skan TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS, 618169689Skan TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, 619169689Skan TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, 620169689Skan TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, 621169689Skan TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros. 622169689Skan (type_as_string, decl_as_string, expr_as_string, 623169689Skan context_as_string): Adjust prototype. 624169689Skan 625169689Skan * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER 626169689Skan instead of TS_PLAIN. 627169689Skan 628169689Skan * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF 629169689Skan instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of 630169689Skan plain `0'. 631169689Skan 632169689Skan2000-10-30 Mark Mitchell <mark@codesourcery.com> 633169689Skan 634169689Skan * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro. 635169689Skan (linkage_kind): New enumeration. 636169689Skan (decl_linkage): New function. 637169689Skan * decl2.c (comdat_linkage): Extend comment. 638169689Skan * error.c (dump_function_decl): Print the arguments used to 639169689Skan instantiate a template, even when not printing the type of the 640169689Skan function. 641169689Skan * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P, 642169689Skan not TREE_PUBLIC, to test for external linkage. 643169689Skan * tree.c (decl_linkage): New function. 644169689Skan 645169689Skan2000-10-28 Mark Mitchell <mark@codesourcery.com> 646169689Skan 647169689Skan * pt.c (instantiate_decl): Always instantiate static data members 648169689Skan initialized in-class. 649169689Skan 650169689Skan2000-10-27 Zack Weinberg <zack@wolery.stanford.edu> 651169689Skan 652169689Skan * Make-lang.in: Move all build rules here from Makefile.in, 653169689Skan adapt to new context. Wrap all rules that change the current 654169689Skan directory in parentheses. Expunge all references to $(P). 655169689Skan When one command depends on another and they're run all at 656169689Skan once, use && to separate them, not ;. Add OUTPUT_OPTION to 657169689Skan all object-file generation rules. Delete obsolete variables. 658169689Skan 659169689Skan * Makefile.in: Delete. 660169689Skan * config-lang.in: Delete outputs= line. 661169689Skan 662169689Skan2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com> 663169689Skan 664169689Skan * error.c (dump_function_decl): Print no space between 665169689Skan `ptr-operator' the `type-specifier' of the return type. 666169689Skan (dump_type_prefix): Make sure we put space at the appropriate 667169689Skan place. 668169689Skan 669169689Skan2000-10-23 Jason Merrill <jason@redhat.com> 670169689Skan 671169689Skan * call.c (equal_functions): Also call decls_match for extern "C" fns. 672169689Skan 673169689Skan2000-10-22 Jason Merrill <jason@redhat.com> 674169689Skan 675169689Skan * call.c (build_conditional_expr): Use ocp_convert to force 676169689Skan rvalue conversion. 677169689Skan 678169689Skan2000-10-22 Mark Mitchell <mark@codesourcery.com> 679169689Skan 680169689Skan * call.c (standard_conversion): Use RVALUE_CONVs for all 681169689Skan expressions that satisfy lvalue_p, not just those that satisfy 682169689Skan real_lvalue_p. 683169689Skan 684169689Skan * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially. 685169689Skan 686169689Skan * typeck.c (c_sizeof): Return an expression of `size_t' type, 687169689Skan not one with TYPE_IS_SIZETYPE set. 688169689Skan (dubious_conversion_warnings): Remove special-case code. 689169689Skan 690169689Skan2000-10-21 Geoffrey Keating <geoffk@cygnus.com> 691169689Skan 692169689Skan * decl2.c (arg_assoc_type): Handle VECTOR_TYPE. 693169689Skan * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE. 694169689Skan (dump_type_prefix): Print vector-of-int as 'int vector'. 695169689Skan (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE. 696169689Skan * tree.c (walk_tree): Handle VECTOR_TYPE. 697169689Skan 698169689Skan * decl.c (init_decl_processing): Call MD_INIT_BUILTINS. 699169689Skan 700169689Skan2000-10-21 Jason Merrill <jason@redhat.com> 701169689Skan 702169689Skan * parse.y (operator): Set got_object from got_scope. 703169689Skan Set looking_for_typename. 704169689Skan * decl.c (lookup_name_real): Clear val after setting from_obj. 705169689Skan Reorganize diagnostic. 706169689Skan 707169689Skan2000-10-20 Jason Merrill <jason@redhat.com> 708169689Skan 709169689Skan * tree.c (walk_tree): Don't walk into default args. 710169689Skan 711169689Skan * error.c (dump_expr): Use host_integerp. 712169689Skan 713169689Skan2000-10-20 David Edelsohn <edelsohn@gnu.org> 714169689Skan 715169689Skan * typeck2.c (abstract_virtuals_error): Use "because" instead of 716169689Skan "since" in error message. 717169689Skan 718169689Skan2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 719169689Skan 720169689Skan * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE. 721169689Skan 722169689Skan2000-10-20 Jeffrey Oldham <oldham@codesourcery.com> 723169689Skan 724169689Skan * decl.c (revert_static_member_fn): Fixed typo. 725169689Skan 726169689Skan2000-10-19 Mark Mitchell <mark@codesourcery.com> 727169689Skan 728169689Skan * class.c (subobject_offset_fn): New type. 729169689Skan (dfs_record_base_offsets): Remove. 730169689Skan (record_base_offsets): Likewise. 731169689Skan (dfs_search_base_offsets): Likewise. 732169689Skan (record_subobject_offset): New function. 733169689Skan (check_subobject_offset): Likewise. 734169689Skan (walk_subobject_offsets): Likewise. 735169689Skan (record_subobject_offsets): Likewise. 736169689Skan (layout_conflict_p): Reimplement. 737169689Skan (layout_nonempty_base_or_field): Correct handling of type 738169689Skan conflicts during layout. 739169689Skan (layout_empty_base): Likewise. 740169689Skan (build_base_field): Adjust to handle new representation of empty 741169689Skan base offset table. 742169689Skan (build_base_fields): Likewise. 743169689Skan (layout_virtual_bases): Likewise. 744169689Skan (splay_tree_compare_integer_csts): New function. 745169689Skan (layout_class_type): Use a splay_tree, rather than a varray, to 746169689Skan represent the offsets of empty bases. 747169689Skan 748169689Skan * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL. 749169689Skan * decl.c (select_decl): Don't return declarations that are 750169689Skan DECL_ANTICIPATED. 751169689Skan 752169689Skan2000-10-18 Mark Mitchell <mark@codesourcery.com> 753169689Skan 754169689Skan * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD. 755169689Skan (fake_std_node): New macro. 756169689Skan * decl.c (in_std): Rename to ... 757169689Skan (in_fake_std): ... this. 758169689Skan (flag_no_builtin): Remove. 759169689Skan (flag_no_nonansi_builtin): Likewise. 760169689Skan (walk_namespaces_r): Use fake_std_node. 761169689Skan (push_namespace): Use std_identifier. 762169689Skan (pop_namespace): Use in_fake_std. 763169689Skan (lookup_name_real): Use fake_std_node. 764169689Skan (init_decl_processing): When -fhonor-std, create the `std' 765169689Skan namespace. Don't create a dummy fake_std_node in that case. 766169689Skan Adjust call to c_common_nodes_and_builtins. Use std_identifier. 767169689Skan (builtin_function): Put builtins whose names don't begin 768169689Skan with `_' in the std namespace. 769169689Skan * decl2.c (flag_no_builtin): Remove. 770169689Skan (flag_no_nonansi_builtin): Likewise. 771169689Skan (set_decl_namespace): Use fake_std_node. 772169689Skan (validate_nonmember_using_decl): Likewise. 773169689Skan (do_using_directive): Likewise. 774169689Skan (handle_class_head): Likewise. 775169689Skan * dump.c (dequeue_and_dump): Likewise. 776169689Skan * except.c (init_exception_processing): Use std_identifier. 777169689Skan * init.c (build_member_call): Use fake_std_node. 778169689Skan * rtti.c (init_rtti_processing): Use std_identifier. 779169689Skan 780169689Skan2000-10-17 Mark Mitchell <mark@codesourcery.com> 781169689Skan 782169689Skan * cp-tree.h (back_end_hook): Remove declaration. 783169689Skan * decl2.c (back_end_hook): Remove definition. 784169689Skan 785169689Skan * dump.c (dequeue_and_dump): Dump TREE_USED. 786169689Skan 787169689Skan2000-10-17 Brad Lucier <lucier@math.purdue.edu> 788169689Skan 789169689Skan * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int). 790169689Skan 791169689Skan2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk> 792169689Skan 793169689Skan * decl.c (WINT_TYPE): Define. 794169689Skan (init_decl_processing): Create types unsigned_ptrdiff_type_node, 795169689Skan c_size_type_node, signed_size_type_node and wint_type_node. 796169689Skan 797169689Skan2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk> 798169689Skan 799169689Skan * decl2.c (warn_missing_format_attribute): New variable. 800169689Skan (lang_decode_option): Decode -Wmissing-format-attribute. 801169689Skan 802169689Skan2000-10-16 Mark Mitchell <mark@codesourcery.com> 803169689Skan 804169689Skan * typeck.c (qualify_type): Remove. 805169689Skan (composite_pointer_type): Fix handling of conversions to `cv void*'. 806169689Skan 807169689Skan2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 808169689Skan 809169689Skan * Makefile.in (parse.c, parse.h): Fix think-o in last patch. 810169689Skan 811169689Skan2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 812169689Skan 813169689Skan * Makefile.in (parse.c, parse.h): Create atomically. 814169689Skan 815169689Skan2000-10-12 Mark Mitchell <mark@codesourcery.com> 816169689Skan 817169689Skan * class.c (current_obstack): Remove. 818169689Skan * decl.c (ggc_p): Remove. 819169689Skan (start_decl): Don't use decl_tree_cons. 820169689Skan (grokdeclarator): Don't use build_decl_list. 821169689Skan (start_function): Don't use decl_tree_cons. 822169689Skan (finish_function): Don't mess with obstacks. 823169689Skan * decl2.c (grok_x_components): Don't use build_decl_list. 824169689Skan * lex.c (make_call_declarator): Don't call decl_tree_cons. 825169689Skan (implicitly_declare_fn): Don't call build_decl_list. 826169689Skan * parse.y (frob_specs): Don't call build_decl_list or 827169689Skan decl_tree_cons. 828169689Skan (expr_or_declarator_intern): Don't call decl_tree_cons. 829169689Skan (primary): Don't call build_decl_list. 830169689Skan (fcast_or_absdcl): Likewise. 831169689Skan (typed_declspecs): Don't call decl_tree_cons. 832169689Skan (reserved_declspecs): Don't call build_decl_list. 833169689Skan (declmods): Likewise. 834169689Skan (reserved_typespecquals): Likewise. 835169689Skan (aggr): Likewise. 836169689Skan (new_type_id): Likewise. 837169689Skan (cv_qualifiers): Likewise. 838169689Skan (after_type_declarator_intern): Likewise. 839169689Skan (notype_declarator_intern): Likewise. 840169689Skan (absdcl_intern): Likewise. 841169689Skan (named_parm): Likewise. 842169689Skan * pt.c (most_specialized_class): Likewise. 843169689Skan * repo.c (temporary_obstack): Make it a structure, not a pointer. 844169689Skan (init_repo): Initialize it. 845169689Skan * search.c (current_obstack): Remove. 846169689Skan * typeck2.c (add_exception_specifier): Don't call build_decl_list. 847169689Skan 848169689Skan2000-10-09 Richard Henderson <rth@cygnus.com> 849169689Skan 850169689Skan * Make-lang.in (CXX_EXTRA_HEADERS): Remove. 851169689Skan (c++ language support bits for libgcc): Remove. 852169689Skan (c++.clean): Remove cplib2.txt cleanup. 853169689Skan * config-lang.in (headers, lib2funcs): Remove. 854169689Skan 855169689Skan * exception.cc, new.cc, new1.cc, new2.cc: Remove files. 856169689Skan * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files. 857169689Skan * inc/cxxabi.h, inc/exception, inc/new: Remove files. 858169689Skan * inc/new.h, inc/typeinfo: Remove files. 859169689Skan 860169689Skan2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk> 861169689Skan 862169689Skan * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already 863169689Skan defined. 864169689Skan (init_decl_processing): Initialize intmax_type_node and 865169689Skan uintmax_type_node. 866169689Skan 867169689Skan2000-10-06 Richard Henderson <rth@cygnus.com> 868169689Skan 869169689Skan * cp-tree.h (struct cp_language_function): Remove x_result_rtx. 870169689Skan (original_result_rtx): Remove. 871169689Skan * decl.c (save_function_data): Don't clear x_result_rtx. 872169689Skan (mark_lang_function): Don't mark it either. 873169689Skan * expr.c (fixup_result_decl): Remove. 874169689Skan * semantics.c (genrtl_named_return_value): Frob the return decl 875169689Skan before calling emit_local_var. 876169689Skan (genrtl_finish_function): Don't call fixup_result_decl. 877169689Skan Always emit the jump to return_label. 878169689Skan 879169689Skan2000-10-06 Nathan Sidwell <nathan@codesourcery.com> 880169689Skan 881169689Skan * pt.c (lookup_template_class): Set current access for enum. 882169689Skan (tsubst_enum): Set file & line for enum decl. 883169689Skan 884169689Skan * spew.c (yylex): Remove unused variable. 885169689Skan 886169689Skan2000-10-05 Richard Henderson <rth@cygnus.com> 887169689Skan 888169689Skan * semantics.c (genrtl_finish_function): Don't init or check 889169689Skan can_reach_end; remove noreturn and return value checks. 890169689Skan 891169689Skan2000-10-05 Tom Tromey <tromey@cygnus.com> 892169689Skan 893169689Skan * init.c (build_java_class_ref): Use `build_static_name' with a 894169689Skan suffix, not a prefix, to build the class object's name. 895169689Skan 896169689Skan2000-10-05 Nathan Sidwell <nathan@codesourcery.com> 897169689Skan 898169689Skan * cp-tree.h (access_kind): Fix comment typo. 899169689Skan * decl2.c (grokfield): Fix diagnostic typo. 900169689Skan * semantics.c (finish_template_type): Fix comment typo. 901169689Skan (finish_qualified_object_call_expr): Likewise. 902169689Skan 903169689Skan2000-10-05 Nathan Sidwell <nathan@codesourcery.com> 904169689Skan 905169689Skan * pt.c (tsubst_expr, DECL_STMT case): Don't process if 906169689Skan tsubsting fails. 907169689Skan 908169689Skan2000-10-05 Nathan Sidwell <nathan@codesourcery.com> 909169689Skan 910169689Skan * spew.c (frob_id): New static function. 911169689Skan (frob_opname): Use it. 912169689Skan (yylex): Use it. 913169689Skan 914169689Skan2000-10-01 Mark Mitchell <mark@codesourcery.com> 915169689Skan 916169689Skan * decl.c (lang_mark_false_label_stack): Remove. 917169689Skan * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. 918169689Skan 919169689Skan2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk> 920169689Skan 921169689Skan * gxxint.texi: Use @email for formatting email addresses. 922169689Skan 923169689Skan2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com> 924169689Skan 925169689Skan * error.c: Remove direct obstack manipulation. Replace with 926169689Skan output_buffer-based formatting. Adjust calls to removed macros. 927169689Skan (obstack_chunk_alloc, obstack_chunk_free): Remove. 928169689Skan (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP, 929169689Skan OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise. 930169689Skan 931169689Skan2000-09-24 Mark Mitchell <mark@codesourcery.com> 932169689Skan 933169689Skan * ir.texi: Move to ../c-tree.texi. 934169689Skan 935169689Skan2000-09-20 Jason Merrill <jason@redhat.com> 936169689Skan 937169689Skan * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P. 938169689Skan 939169689Skan2000-09-21 Andreas Jaeger <aj@suse.de> 940169689Skan 941169689Skan * errfn.c: Move declaration of cp_printer and cp_printers to ... 942169689Skan * cp-tree.h: ... here. 943169689Skan 944169689Skan * error.c: Remove declaration of cp_printer. 945169689Skan 946169689Skan2000-09-20 Mark Mitchell <mark@codesourcery.com> 947169689Skan 948169689Skan * tree.c (mark_local_for_remap_r): Handle CASE_LABELs. 949169689Skan 950169689Skan2000-09-20 Hans-Peter Nilsson <hp@axis.com> 951169689Skan 952169689Skan * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and 953169689Skan users. 954169689Skan 955169689Skan2000-09-18 Mark Mitchell <mark@codesourcery.com> 956169689Skan 957169689Skan * decl.c (start_function): Robustify. 958169689Skan 959169689Skan2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 960169689Skan 961169689Skan * cp-tree.h (check_function_format): Accept a `status' parameter. 962169689Skan 963169689Skan * call.c, typeck.c: Updates calls to `check_function_format'. 964169689Skan 965169689Skan2000-09-17 Geoffrey Keating <geoffk@cygnus.com> 966169689Skan 967169689Skan * decl2.c (handle_class_head): Always push some scope even 968169689Skan in the error case. 969169689Skan 970169689Skan2000-09-16 Mark Mitchell <mark@codesourcery.com> 971169689Skan 972169689Skan * cp-tree.h (struct cp_language_function): Remove 973169689Skan x_scope_stmt_stack and name_declared. 974169689Skan (current_scope_stmt_stack): Remove. 975169689Skan (function_name_declared_p): New macro. 976169689Skan (struct lang_decl_flags): Use c_lang_decl as a base class. 977169689Skan (context): Remove. 978169689Skan (struct lang_decl): Replace saved_tree with context. 979169689Skan (DECL_FRIEND_CONTEXT): Adjust accordingly. 980169689Skan (SET_DECL_FRIEND_CONTEXT): Likewise. 981169689Skan (DECL_VIRTUAL_CONTEXT): Likewise. 982169689Skan (DECL_SAVED_TREE): Remove. 983169689Skan (C_DECLARED_LABEL_FLAG): Likewise. 984169689Skan (cplus_expand_expr_stmt): Don't declare. 985169689Skan (add_decl_stmt): Likewise. 986169689Skan (add_scope_stmt): Likewise. 987169689Skan * decl.c (mark_stmt_tree): Remove. 988169689Skan (case_compare): Likewise. 989169689Skan (finish_case_label): Use c_add_case_label. 990169689Skan (init_decl_processing): Set more language-specific hooks. 991169689Skan (build_enumerator): Fix typo in comment. 992169689Skan (cplus_expand_expr_stmt): Remove. 993169689Skan (mark_lang_function): Use mark_c_language_function. 994169689Skan (lang_mark_tree): Use c_mark_lang_decl. 995169689Skan * decl2.c: Change order of inclusion. 996169689Skan * except.c: Likewise. 997169689Skan * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall 998169689Skan back on c_expand_expr. 999169689Skan * friend.c: Include expr.h. 1000169689Skan * init.c: Change order of inclusion. 1001169689Skan * Makefile.in: Update dependencies. 1002169689Skan * lex.h (free_lang_decl_chain): Remove. 1003169689Skan * optimize.c (maybe_clone_body): Use function_name_declared_p. 1004169689Skan * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if 1005169689Skan it doesn't exist. 1006169689Skan (instantiate_decl): Use function_name_declared_p. 1007169689Skan * semantics.c (lang_expand_expr_stmt): Remove. 1008169689Skan (set_current_function_name_declared): Likewise. 1009169689Skan (current_function_name_declared): Likewise. 1010169689Skan (begin_compound_stmt): Use function_name_declared_p. 1011169689Skan (add_decl_stmt): Remove. 1012169689Skan (setup_vtbl_ptr): Use function_name_declared_p. 1013169689Skan (add_scope_stmt): Remove. 1014169689Skan (current_scope_stmt_stack): New function. 1015169689Skan (cp_expand_stmt): Don't handle SCOPE_STMTs. 1016169689Skan (expand_body): Use function_name_declared_p. 1017169689Skan * tree.c (cp_statement_code_p): Don't include SCOPE_STMT. 1018169689Skan * typeck.c: Change order of includes. 1019169689Skan (convert_sequence): Remove. 1020169689Skan 1021169689Skan2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk> 1022169689Skan 1023169689Skan * lex.c (reswords): Add _Complex. 1024169689Skan 1025169689Skan2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 1026169689Skan 1027169689Skan * Make-lang.in (cplib2.txt): Depend on cp/Makefile. 1028169689Skan 1029169689Skan2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca> 1030169689Skan 1031169689Skan * init.c (begin_init_stmts): Don't use // comments. 1032169689Skan 1033169689Skan2000-09-12 Jason Merrill <jason@redhat.com> 1034169689Skan 1035169689Skan * decl.c (maybe_deduce_size_from_array_init): Set do_default for 1036169689Skan all non-extern arrays. 1037169689Skan 1038169689Skan * decl.c (grokdeclarator): Complain about 'friend T' for implicit 1039169689Skan typenames, too. Downgrade complaint to pedwarn. 1040169689Skan (xref_tag): Warn about surprising behavior of 'friend struct T'. 1041169689Skan * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for 1042169689Skan 'class This::Inherited'. 1043169689Skan 1044169689Skan2000-09-12 Mark Mitchell <mark@codesourcery.com> 1045169689Skan 1046169689Skan * decl.c (finish_case_label): Given the LABEL_DECL a 1047169689Skan DECL_CONTEXT. 1048169689Skan 1049169689Skan2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com> 1050169689Skan 1051169689Skan * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, 1052169689Skan TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF, 1053169689Skan TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, 1054169689Skan TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, 1055169689Skan TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE): 1056169689Skan New macros. 1057169689Skan (sorry_for_unsupported_tree, print_scope_operator, 1058169689Skan print_left_paren, print_right_paren, print_left_bracket, 1059169689Skan print_right_bracket, print_whitespace): Likewise. 1060169689Skan (aggr_variety): Rename to class_key_or_enum. 1061169689Skan (print_type): Rename to print_type_id. 1062169689Skan (print_type_specifier_seq, print_simple_type_specifier, 1063169689Skan print_elaborated_type_specifier, 1064169689Skan print_rest_of_abstract_declarator, 1065169689Skan print_parameter_declaration_clause, print_exception_specification, 1066169689Skan print_nested_name_specifier, print_template_id, 1067169689Skan typedef_original_name, print_template_argument_list_start, 1068169689Skan print_template_argument_list_end): New functions. 1069169689Skan 1070169689Skan2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com> 1071169689Skan 1072169689Skan * ir.texi: Add more documentation. 1073169689Skan 1074169689Skan2000-09-11 Mark Mitchell <mark@codesourcery.com> 1075169689Skan 1076169689Skan * cp-tree.h (struct saved_scope): Remove x_function_parms. 1077169689Skan (current_function_parms): Don't define. 1078169689Skan (struct cp_language_function): Remove parms_stored. 1079169689Skan (current_function_just_assigned_this): Don't define. 1080169689Skan (current_function_parms_stored): Likewise. 1081169689Skan (static_ctors): Declare. 1082169689Skan (static_dtors): Likewise. 1083169689Skan (SF_EXPAND): Don't define. 1084169689Skan (expand_start_early_try_stmts): Remove declaration. 1085169689Skan (store_parm_decls): Likewise. 1086169689Skan * decl.c (static_ctors): Don't declare. 1087169689Skan (static_dtors): Likewise. 1088169689Skan (struct binding_level): Remove this_block. 1089169689Skan (poplevel): Remove dead code. 1090169689Skan (set_block): Likewise. 1091169689Skan (mark_binding_level): Don't mark this_block. 1092169689Skan (mark_saved_scope): Don't mark x_function_parms. 1093169689Skan (init_decl_processing): Don't add current_function_parms as a GC 1094169689Skan root. 1095169689Skan (check_function_type): Change prototype. 1096169689Skan (start_function): Remove RTL-generation code. 1097169689Skan (expand_start_early_try_stmts): Remove. 1098169689Skan (store_parm_decls): Give it internal linkage. Remove 1099169689Skan RTL-generation code. 1100169689Skan (finish_function): Remove RTL-generation code. 1101169689Skan * decl2.c (static_ctors): Fix formatting. 1102169689Skan (static_dtors): Likewise. 1103169689Skan * method.c (use_thunk): Don't call store_parm_decls. 1104169689Skan (synthesize_method): Likewise. 1105169689Skan * optimize.c (maybe_clone_body): Likewise. 1106169689Skan * parse.y (fn.def2): Likewise. 1107169689Skan (.set_base_init): Likewise. 1108169689Skan (nodecls): Likewise. 1109169689Skan * pt.c (instantiate_decl): Likewise. 1110169689Skan * rtti.c (synthesize_tinfo_fn): Likewise. 1111169689Skan * semantics.c (genrtl_try_block): Simplify. 1112169689Skan (expand_body): Use genrtl_start_function and 1113169689Skan genrtl_finish_function. 1114169689Skan (genrtl_start_function): New function. 1115169689Skan (genrtl_finish_function): Likewise. 1116169689Skan 1117169689Skan2000-09-11 Nathan Sidwell <nathan@codesourcery.com> 1118169689Skan 1119169689Skan * error.c (cp_tree_printer, case 'P'): Append break. 1120169689Skan 1121169689Skan2000-09-11 Nathan Sidwell <nathan@codesourcery.com> 1122169689Skan 1123169689Skan * cp-tree.h (frob_opname): Declare. 1124169689Skan * parse.y (saved_scopes): New static variable. 1125169689Skan (cp_parse_init): Adjust. 1126169689Skan (do_id): If lastiddecl is NULL, do do_identifier. 1127169689Skan (operator): Save scope information. 1128169689Skan (unoperator): New reduction. Restore scope information. 1129169689Skan (operator_name): Append unoperator. Call frob_opname. 1130169689Skan * spew.c (frob_opname): Define. 1131169689Skan 1132169689Skan2000-09-10 Zack Weinberg <zack@wolery.cumb.org> 1133169689Skan 1134169689Skan * decl.c, rtti.c: Include defaults.h if not already included. 1135169689Skan Don't define the *_TYPE_SIZE macros. 1136169689Skan 1137169689Skan2000-09-09 Mark Mitchell <mark@codesourcery.com> 1138169689Skan 1139169689Skan * cp-tree.h (push_switch): Change prototype. 1140169689Skan (check_cp_case_value): Remove declaration. 1141169689Skan (decl_constant_value): Likewise. 1142169689Skan * decl.c (struct cp_switch): Add switch_stmt and cases. 1143169689Skan (case_compare): New function. 1144169689Skan (push_switch): Set switch_stmt. Initialize cases. 1145169689Skan (pop_switch): Clean up cases. 1146169689Skan (define_case_label): Rename to ... 1147169689Skan (finish_case_label): ... this. Do semantic analysis for case 1148169689Skan labels here. 1149169689Skan (start_function): Correct comment. 1150169689Skan * decl2.c (check_cp_case_value): Remove. 1151169689Skan * expr.c (do_case): Remove. 1152169689Skan * pt.c (tsubst_expr): Adjust call to finish_case_label. 1153169689Skan * semantics.c (genrtl_do_poplevel): Remove declaration. 1154169689Skan (RECHAIN_STMTS): Remove. 1155169689Skan (finish_break_stmt): Use build_break_stmt. 1156169689Skan (finish_continue_stmt): Use build_continue_stmt. 1157169689Skan (finish_switch_cond): Adjust condition here, rater than in 1158169689Skan c_expand_start_case. 1159169689Skan (finish_case_label): Remove. 1160169689Skan * typeck.c (c_expand_return): Remove. 1161169689Skan (c_expand_start_case): Likewise. 1162169689Skan 1163169689Skan2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com> 1164169689Skan 1165169689Skan * ir.texi: Document type nodes. 1166169689Skan 1167169689Skan2000-09-06 Mark Mitchell <mark@codesourcery.com> 1168169689Skan 1169169689Skan * cp-tree.h (init_cp_semantics): Declare. 1170169689Skan (genrtl_try_block): Don't declare. 1171169689Skan (genrtl_handler): Likewise. 1172169689Skan (genrtl_catch_block): Likewise. 1173169689Skan (genrtl_ctor_stmt): Likewise. 1174169689Skan (genrtl_subobject): Likewise. 1175169689Skan (genrtl_do_poplevel): Likewise. 1176169689Skan (genrtl_named_return_value): Likewise. 1177169689Skan * lex.c (init_parse): Call init_cp_semantics. 1178169689Skan * semantics.c (genrtl_try_block): Give it internal linkage. 1179169689Skan (genrtl_handler): Likewise. 1180169689Skan (genrtl_catch_block): Likewise. 1181169689Skan (genrtl_ctor_stmt): Likewise. 1182169689Skan (genrtl_subobject): Likewise. 1183169689Skan (genrtl_do_poplevel): Likewise. 1184169689Skan (genrtl_named_return_value): Likewise. 1185169689Skan (lang_expand_stmt): Rename to ... 1186169689Skan (cp_expand_stmt): ... this. Only handle C++-specific nodes. 1187169689Skan (init_cp_semantics): Define. 1188169689Skan 1189169689Skan * decl.c (initialize_local_var): Remove RTL-generating code. 1190169689Skan * semantics.c (genrtl_try_block): Fix formatting. 1191169689Skan 1192169689Skan Move statement-tree facilities from C++ to C front-end. 1193169689Skan * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO. 1194169689Skan (void_zero_node): Remove. 1195169689Skan (stmt_tree): Likewise. 1196169689Skan (scope_chain): Adjust. 1197169689Skan (language_function): Rename to cp_language_function. 1198169689Skan (cp_function_chain): Adjust. 1199169689Skan (current_stmt_tree): Remove. 1200169689Skan (last_tree): Likewise. 1201169689Skan (last_expr_type): Likewise. 1202169689Skan (struct lang_decl): Adjust. 1203169689Skan (STMT_IS_FULL_EXPR_P): Remove. 1204169689Skan (add_tree): Remove. 1205169689Skan (begin_stmt_tree): Likewise. 1206169689Skan (finish_stmt_tree): Likewise. 1207169689Skan (walk_tree_fn): Likewise. 1208169689Skan (walk_stmt_tree): Likewise. 1209169689Skan * class.c (finish_struct): Replace use of add_tree with add_stmt. 1210169689Skan * decl.c (mark_stmt_tree): Adjust type. 1211169689Skan (init_decl_processing): Don't build void_zero_node. 1212169689Skan (initialize_local_var): Adjust usage of current_stmt_tree. 1213169689Skan (finish_enum): Use add_stmt, not add_tree. 1214169689Skan (save_function_data): Adjust use of language_function. 1215169689Skan (finish_constructor_body): Use add_stmt, not add_tree. 1216169689Skan (finish_destructor_body): Likewise. 1217169689Skan (push_cp_function_context): Adjust use of language_function. 1218169689Skan (pop_cp_function_context): Likewise. 1219169689Skan (mark_lang_function): Likewise. 1220169689Skan (mark_cp_function_context): Likewise. 1221169689Skan * init.c (build_aggr_init): Adjust use of current_stmt_tree. 1222169689Skan (build_vec_init): Likewise. 1223169689Skan * semantics.c (SET_LAST_STMT): Remove. 1224169689Skan (RECHAIN_STMTS): Don't use it. 1225169689Skan (stmts_are_full_exprs_p): Adjust use of current_stmt_tree. 1226169689Skan (current_stmt_tree): Define. 1227169689Skan (add_tree): Remove. 1228169689Skan (finish_goto_stmt): Use add_stmt, not add_tree. 1229169689Skan (finish_expr_stmt): Likewise. 1230169689Skan (begin_if_stmt): Likewise. 1231169689Skan (finish_then_clause): Likewise. 1232169689Skan (begin_while_stmt): Likewise. 1233169689Skan (begin_do_stmt): Likewise. 1234169689Skan (finish_return_stmt): Likewise. 1235169689Skan (begin_for_stmt): Likewise. 1236169689Skan (finish_break_stmt): Likewise. 1237169689Skan (finish_continue_stmt): Likewise. 1238169689Skan (begin_switch_stmt): Likewise. 1239169689Skan (finish_case_label): Likewise. 1240169689Skan (begin_try_block): Likewise. 1241169689Skan (begin_function_try_block): Likewise. 1242169689Skan (begin_handler): Likewise. 1243169689Skan (begin_catch_block): Likewise. 1244169689Skan (begin_compound_stmt): Likewise. 1245169689Skan (begin_asm_stmt): Likewise. 1246169689Skan (finish_asm_stmt): Likewise. 1247169689Skan (finish_label_stmt): Likewise. 1248169689Skan (add_decl_stmt): Likewise. 1249169689Skan (finish_subobject): Likewise. 1250169689Skan (finish_decl_cleanup): Likewise. 1251169689Skan (finish_named_return_value): Likewise. 1252169689Skan (setup_vtbl_ptr): Likewise. 1253169689Skan (add_scope_stmt): Likewise. 1254169689Skan (finish_stmt_expr): Likewise. 1255169689Skan (prune_unused_decls): Remove. 1256169689Skan (begin_stmt_tree): Likewise. 1257169689Skan (finish_stmt_tree): Likewise. 1258169689Skan (prep_stmt): Adjust use of current_stmt_tree. 1259169689Skan (lang_expand_stmt): Likewise. 1260169689Skan * tree.c (statement_code_p): Remove. 1261169689Skan (cp_statement_code_p): New function. 1262169689Skan (walk_stmt_tree): Remove. 1263169689Skan (init_tree): Set lang_statement_code_p. 1264169689Skan 1265169689Skan2000-09-06 Zack Weinberg <zack@wolery.cumb.org> 1266169689Skan 1267169689Skan Integrated preprocessor. 1268169689Skan 1269169689Skan * Make-lang.in, Makefile.in: Remove all references to input.c, 1270169689Skan gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS. 1271169689Skan * gxx.gperf, hash.h, input.c: Delete. 1272169689Skan * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is 1273169689Skan initialized properly. 1274169689Skan 1275169689Skan * class.c (fixup_pending_inline): Take a tree, not a 1276169689Skan struct pending_inline *. All callers changed. 1277169689Skan (init_class_processing): Set RID_PUBLIC, RID_PRIVATE, 1278169689Skan RID_PROTECTED entries in ridpointers[] array here. 1279169689Skan * decl.c (duplicate_decls): Do not refer to struct 1280169689Skan pending_inline. 1281169689Skan (record_builtin_type, init_decl_processing): Use RID_MAX not 1282169689Skan CP_RID_MAX. 1283169689Skan (grokdeclarator): Use C_IS_RESERVED_WORD. 1284169689Skan * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of 1285169689Skan cpplib. 1286169689Skan (grok_x_components): Do not inspect pending_inlines chain. 1287169689Skan 1288169689Skan * cp-tree.h (struct lang_identifier): Add rid_code entry. 1289169689Skan (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New. 1290169689Skan (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare. 1291169689Skan (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME, 1292169689Skan TIME_IDENTIFIER_FILEINFO): Kill. 1293169689Skan Update prototypes. 1294169689Skan * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a 1295169689Skan single 32-bit word. 1296169689Skan * parse.y: Call do_pending_inlines unconditionally. 1297169689Skan reinit_parse_for_method is now snarf_method. fn.defpen is no 1298169689Skan longer necessary. Remove unnecessary <itype> annotation on 1299169689Skan SCOPE. Do not refer to end_of_file or struct pending_inline. 1300169689Skan * semantics.c (begin_inline_definitions): Call 1301169689Skan do_pending_inlines unconditionally. 1302169689Skan 1303169689Skan * lex.c: Remove all code now shared with C front end. 1304169689Skan Initialize cpplib properly if USE_CPPLIB. Put reserved words 1305169689Skan into the get_identifier table. Rewrite pragma handling to 1306169689Skan work with the registry. Move code to save tokens for later 1307169689Skan processing to spew.c. 1308169689Skan 1309169689Skan * spew.c: Rewrite everything in terms of token streams instead 1310169689Skan of text. Move routines here from lex.c / input.c as 1311169689Skan appropriate. GC-mark trees hanging off the pending inlines 1312169689Skan chain. 1313169689Skan 1314169689Skan2000-09-06 Mark Mitchell <mark@codesourcery.com> 1315169689Skan 1316169689Skan * NEWS: Mention that the named return value extension has been 1317169689Skan deprecated. 1318169689Skan * cp-tree.h (original_result_rtx): Define. 1319169689Skan (TREE_REFERENCE_EXPR): Remove. 1320169689Skan (DECL_VPARENT): Likewise. 1321169689Skan (pushdecl_nonclass_level): Likewise. 1322169689Skan (store_return_init): Likewise. 1323169689Skan (reinit_lang_specific): Likewise. 1324169689Skan (genrtl_named_return_value): Change prototype. 1325169689Skan * decl.c (original_result_rtx): Remove. 1326169689Skan (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs. 1327169689Skan Do not generate RTL for local variables here. 1328169689Skan (store_return_init): Remove. 1329169689Skan * semantics.c (genrtl_named_return_value): Simplify. Fold in 1330169689Skan store_return_init. 1331169689Skan (finish_named_return_value): Adjust accordingly. Warn that this 1332169689Skan extension is deprecated. 1333169689Skan (lang_expand_stmt): Adjust call to genrtl_named_return_value. 1334169689Skan 1335169689Skan2000-09-06 Nathan Sidwell <nathan@codesourcery.com> 1336169689Skan 1337169689Skan * pt.c (type_unification_real): Replace switch with if. 1338169689Skan (unify): Tsubst non-type parms before comparing. 1339169689Skan 1340169689Skan2000-09-06 Nathan Sidwell <nathan@codesourcery.com> 1341169689Skan 1342169689Skan * error.c (dump_typename): New function, broken out of ... 1343169689Skan (dump_type): ... here. Use it. 1344169689Skan * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE. 1345169689Skan 1346169689Skan2000-09-06 Nathan Sidwell <nathan@codesourcery.com> 1347169689Skan 1348169689Skan * init.c (build_offset_ref): Deal with namespace scoped 1349169689Skan TEMPLATE_ID_EXPRs. 1350169689Skan 1351169689Skan2000-09-06 Nathan Sidwell <nathan@codesourcery.com> 1352169689Skan 1353169689Skan * class.c (resolve_address_of_overloaded_function): Add 1354169689Skan explanation message. 1355169689Skan * decl.c (define_case_label): Reformat explanation. 1356169689Skan * decl2.c (finish_static_data_member_decl): Likewise. 1357169689Skan (grokfield): Likewise. 1358169689Skan * friend.c (do_friend): Likewise. 1359169689Skan 1360169689Skan2000-09-05 Zack Weinberg <zack@wolery.cumb.org> 1361169689Skan 1362169689Skan * tree.c (walk_tree): Expose tail recursion. 1363169689Skan (walk_stmt_tree): New function. 1364169689Skan * cp-tree.h: Prototype walk_stmt_tree. 1365169689Skan * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not 1366169689Skan the BLOCKs directly. If a BLOCK has no variables after 1367169689Skan pruning, discard it. 1368169689Skan (finish_stmt_tree): Use walk_stmt_tree. No need to save and 1369169689Skan restore the line number. 1370169689Skan 1371169689Skan2000-09-05 Mark Mitchell <mark@codesourcery.com> 1372169689Skan 1373169689Skan * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H. 1374169689Skan (pt.o): Remove dependency on HTAB_H. 1375169689Skan * cp-tree.h: Include hashtab.h. 1376169689Skan (walk_tree): Change prototype. 1377169689Skan (walk_tree_without_duplicates): New function. 1378169689Skan * decl.c (check_default_argument): Use it. 1379169689Skan * optimize.c (remap_decl): Adjust calls to walk_tree. 1380169689Skan (copy_body): Likewise. 1381169689Skan (expand_calls_inline): Likewise. 1382169689Skan (calls_setjmp_p): Use walk_tree_without_duplicates. 1383169689Skan * pt.c: Don't include hashtab.h. 1384169689Skan (for_each_template_parm): Use walk_tree_without_duplicates. 1385169689Skan * semantics.c (finish-stmt_tree): Likewise. 1386169689Skan (expand_body): Likewise. 1387169689Skan * tree.c (walk_tree): Add additional parameter. 1388169689Skan (walk_tree_without_duplicates): New function. 1389169689Skan (count_trees): Use it. 1390169689Skan (verify_stmt_tree): Adjust call to walk_tree. 1391169689Skan (find_tree): Use walk_tree_without_duplicates. 1392169689Skan (no_linkage_check): Likewise. 1393169689Skan (break_out_target_exprs): Adjust call to walk_tree. 1394169689Skan (cp_unsave): Likewise. 1395169689Skan 1396169689Skan2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1397169689Skan 1398169689Skan * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code. 1399169689Skan (TEMPLATE_TEMPLATE_PARM): Adjust comment. 1400169689Skan * cp-tree.h (TYPE_BINFO): Adjust comment. 1401169689Skan (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. 1402169689Skan (TEMPLATE_TYPE_PARM_INDEX): Likewise. 1403169689Skan (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. 1404169689Skan (TYPE_TEMPLATE_INFO): Likewise. 1405169689Skan (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise. 1406169689Skan * class.c (push_nested_class): Likewise. 1407169689Skan * decl.c (lookup_name_real): Likewise. 1408169689Skan (grokdeclarator): Likewise. 1409169689Skan (grok_op_properties): Likewise. 1410169689Skan (xref_tag): Likewise. 1411169689Skan (xref_basetypes): Likewise. 1412169689Skan * decl2.c (constructor_name_full): Likewise. 1413169689Skan (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case. 1414169689Skan (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. 1415169689Skan * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case. 1416169689Skan (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM. 1417169689Skan (dump_type_suffix): Likewise. 1418169689Skan * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM 1419169689Skan instead. 1420169689Skan (get_aggr_from_typedef): Likewise. 1421169689Skan * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case. 1422169689Skan (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM. 1423169689Skan (write_template_parm): Likewise. 1424169689Skan (write_template_template_parm): Check tree code instead of 1425169689Skan using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 1426169689Skan * method.c (build_overload_nested_name): Add 1427169689Skan BOUND_TEMPLATE_TEMPLATE_PARM. 1428169689Skan (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case. 1429169689Skan * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM. 1430169689Skan * pt.c (convert_template_argument): Check tree code instead of 1431169689Skan using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 1432169689Skan (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case. 1433169689Skan (for_each_template_parm): Adjust comment. 1434169689Skan (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. 1435169689Skan (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM. 1436169689Skan (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use 1437169689Skan template_args_equal to compare template template parameter cases. 1438169689Skan * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM. 1439169689Skan * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM 1440169689Skan instead. 1441169689Skan * tree.c (copy_template_template_parm): Decide whether to create 1442169689Skan a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node. 1443169689Skan (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM. 1444169689Skan (copy_tree_r): Likewise. 1445169689Skan * typeck.c (comptypes): Likewise. Check tree code instead of 1446169689Skan using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 1447169689Skan 1448169689Skan2000-09-04 Mark Elbrecht <snowball3@bigfoot.com> 1449169689Skan 1450169689Skan * decl.c (finish_function): Move the code for handling functions 1451169689Skan marked with the constructor and destructor attributes inside the 1452169689Skan expand_p block. 1453169689Skan 1454169689Skan2000-09-04 Nathan Sidwell <nathan@codesourcery.com> 1455169689Skan 1456169689Skan * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR. 1457169689Skan 1458169689Skan2000-09-04 Nathan Sidwell <nathan@codesourcery.com> 1459169689Skan 1460169689Skan * pt.c (lookup_template_class): Remove abort. 1461169689Skan * tree.c (get_type_decl): Allow error_mark_node. 1462169689Skan 1463169689Skan2000-09-04 Nathan Sidwell <nathan@codesourcery.com> 1464169689Skan 1465169689Skan * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside 1466169689Skan TEMPLATE_ID_EXPRs. 1467169689Skan 1468169689Skan2000-09-03 Mark Mitchell <mark@codesourcery.com> 1469169689Skan 1470169689Skan * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change 1471169689Skan new ABI mangling. 1472169689Skan 1473169689Skan2000-09-01 Nathan Sidwell <nathan@codesourcery.com> 1474169689Skan 1475169689Skan * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify 1476169689Skan union tag mismatch error reporting. 1477169689Skan 1478169689Skan2000-09-01 Nathan Sidwell <nathan@codesourcery.com> 1479169689Skan 1480169689Skan * call.c (build_scoped_method_call): Check it is not a namespace. 1481169689Skan 1482169689Skan2000-08-30 Jason Merrill <jason@redhat.com> 1483169689Skan 1484169689Skan * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context. 1485169689Skan 1486169689Skan * tree.c (bot_manip): Check TREE_CONSTANT rather than 1487169689Skan !TREE_SIDE_EFFECTS. Call break_out_target_exprs and 1488169689Skan build_target_expr_with_type for the non-AGGR_INIT_EXPR case. 1489169689Skan 1490169689Skan * decl.c (start_function): Always call make_function_rtl. 1491169689Skan 1492169689Skan2000-08-29 Zack Weinberg <zack@wolery.cumb.org> 1493169689Skan 1494169689Skan * semantics.c (prune_unused_decls): New function. 1495169689Skan (finish_stmt_tree): Call it via walk_tree. 1496169689Skan 1497169689Skan2000-08-29 Zack Weinberg <zack@wolery.cumb.org> 1498169689Skan 1499169689Skan * class.c (build_secondary_vtable): Constify a char *. 1500169689Skan * decl.c (init_decl_processing): Initialize function_id_node, 1501169689Skan pretty_function_id_node, and func_id_node. 1502169689Skan * input.c (struct input_source): Constify 'str'. 1503169689Skan (feed_input): Constify first argument. 1504169689Skan * mangle.c (write_identifier): Constify argument. 1505169689Skan * pt.c (mangle_class_name_for_template): Constify argument. 1506169689Skan 1507169689Skan2000-08-29 Mark Mitchell <mark@codesourcery.com> 1508169689Skan 1509169689Skan * typeck.c (mark_addressable): Remove code that pokes around in 1510169689Skan RTL. 1511169689Skan 1512169689Skan2000-08-28 Jason Merrill <jason@redhat.com> 1513169689Skan 1514169689Skan * lex.c (file_name_nondirectory): Move to toplev.c. 1515169689Skan 1516169689Skan * cp-tree.h (LOCAL_CLASS_P): New macro. 1517169689Skan * class.c (finish_struct_1): Use it. 1518169689Skan 1519169689Skan2000-08-27 Alex Samuel <samuel@codesourcery.com> 1520169689Skan 1521169689Skan * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo. 1522169689Skan (write_encoding): Pass another argument to write_name. 1523169689Skan (write_name): Add ignore_local_scope parameter. Fix handling of 1524169689Skan local names. 1525169689Skan (write_nested_name): Use write_unqualified_name. 1526169689Skan (write_prefix): Likewise. Skip out on FUNCTION_DECLs. 1527169689Skan (write_template_prefix): Use write_unqualified_name. 1528169689Skan (write_component): Remove. 1529169689Skan (write_local_name): Add parameter. Use direct local entity to 1530169689Skan discriminator calculation. 1531169689Skan (write_class_enum_type): Pass another argument to write_name. 1532169689Skan (write_template_template_arg): Likewise. 1533169689Skan (make_guard_variable): Likewise. 1534169689Skan 1535169689Skan2000-08-27 Jason Merrill <jason@redhat.com> 1536169689Skan 1537169689Skan * decl.c (pushdecl): Matching decls for local externs are found in 1538169689Skan the current level. Propagate linkage information from previous 1539169689Skan declarations. 1540169689Skan 1541169689Skan2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com> 1542169689Skan 1543169689Skan * ir.texi (Expressions): Fix typo. 1544169689Skan 1545169689Skan2000-08-25 Greg McGary <greg@mcgary.org> 1546169689Skan 1547169689Skan * tree.c (init_tree): Use ARRAY_SIZE. 1548169689Skan 1549169689Skan2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com> 1550169689Skan 1551169689Skan * error.c (cp_tree_printer): Rework. 1552169689Skan 1553169689Skan2000-08-25 Mark Mitchell <mark@codesourcery.com> 1554169689Skan 1555169689Skan * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and 1556169689Skan dyn-string.o. 1557169689Skan (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c. 1558169689Skan (cp-demangle.o): Remove target. 1559169689Skan (dyn-string.o): Likewise. 1560169689Skan 1561169689Skan * decl.c (grokfndecl): Require that `main' return an `int'. 1562169689Skan * mangle.c (write_encoding): Don't mangle return types for 1563169689Skan conversion functions. 1564169689Skan 1565169689Skan2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com> 1566169689Skan 1567169689Skan * error.c (tree_formatting_info): New data type. 1568169689Skan (tree_being_formatted): New macro. 1569169689Skan (tree_formatting_flags): Likewise. 1570169689Skan (put_whitespace): Likewise. 1571169689Skan (print_tree_identifier): Likewise. 1572169689Skan (print_identifier): Likewise. 1573169689Skan (cp_tree_printer, print_function_argument_list, print_declaration, 1574169689Skan print_expression, print_function_declaration, 1575169689Skan print_function_parameter, print_type, print_cv_qualifier): New 1576169689Skan functions. 1577169689Skan (init_error): Initialize lang_printer. 1578169689Skan 1579169689Skan2000-08-24 Jason Merrill <jason@redhat.com> 1580169689Skan 1581169689Skan * typeck.c (build_ptrmemfunc): Just reinterpret if there's no 1582169689Skan adjustment necessary. 1583169689Skan 1584169689Skan2000-08-24 Greg McGary <greg@mcgary.org> 1585169689Skan 1586169689Skan * cp-tree.h (MAIN_NAME_P): Remove macro. 1587169689Skan 1588169689Skan2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com> 1589169689Skan 1590169689Skan * error.c (print_instantiation_context): Don't forget to flush the 1591169689Skan buffer. 1592169689Skan 1593169689Skan2000-08-23 Jason Merrill <jason@redhat.com> 1594169689Skan 1595169689Skan * typeck.c (build_ptrmemfunc): Save the input pmf. 1596169689Skan 1597169689Skan * method.c (process_modifiers): Use same_type_p. 1598169689Skan 1599169689Skan2000-08-23 Mark Mitchell <mark@codesourcery.com> 1600169689Skan 1601169689Skan * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC. 1602169689Skan * mangle.c (write_function_type): Change prototype. 1603169689Skan (write_encoding): Don't mangle return types for 1604169689Skan constructors or destructors. 1605169689Skan (write_type): Adjust call to write_function_type. 1606169689Skan * pt.c (instantiate_template): Instantiate alternate entry points 1607169689Skan when instantiating the main function. 1608169689Skan 1609169689Skan2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com> 1610169689Skan 1611169689Skan * error.c (cp_print_error_function): Don't use embedded '\n' in 1612169689Skan output_printf. 1613169689Skan 1614169689Skan2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com> 1615169689Skan 1616169689Skan * decl.c (init_decl_processing): Remove bogus initialization. 1617169689Skan * error.c (lang_print_error_function): Restore here. 1618169689Skan (init_error): Initialize print_error_function. 1619169689Skan 1620169689Skan2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 1621169689Skan 1622169689Skan * decl2.c (arg_assoc): Revert my 2000-08-11 change. 1623169689Skan 1624169689Skan2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com> 1625169689Skan 1626169689Skan * Makefile.in (error.o): Depends on diagnostic.h 1627169689Skan 1628169689Skan * cp-tree.h (problematic_instantiation_changed, 1629169689Skan record_last_problematic_instantiation, current_instantiation, 1630169689Skan print_instantiation_context): Declare. 1631169689Skan (maybe_print_template_context): Remove. 1632169689Skan 1633169689Skan * decl.c (init_decl_processing): Set print_error_function to NULL. 1634169689Skan (lang_print_error_function): Remove, since we're using a new 1635169689Skan machinery. 1636169689Skan 1637169689Skan * error.c: #include diagnostic.h 1638169689Skan (function_category): New function. 1639169689Skan (cp_diagnostic_starter): Likewise. 1640169689Skan (cp_diagnostic_finalizer): Likewise. 1641169689Skan (cp_print_error_function): Likewise. 1642169689Skan (maybe_print_instantiation_context): Likewise. 1643169689Skan (print_instantiation_full_context): Likewise. 1644169689Skan (print_instantiation_partial_context): Likewise. 1645169689Skan (print_instantiation_context): Define. 1646169689Skan (init_error): Initialize diagnostic pager and finalizer. 1647169689Skan 1648169689Skan * pt.c (problematic_instantiation_changed): Define. 1649169689Skan (record_last_problematic_instantiation): Likewise. 1650169689Skan (current_instantiation): Likewise. 1651169689Skan (maybe_print_template_context): Remove. 1652169689Skan (print_template_context): Likewise. 1653169689Skan (current_tinst_level): Make static to reflect Brendan Kehoe's 1654169689Skan change of 1995-04-13. 1655169689Skan (push_tinst_level): Call print_instantiation_context. 1656169689Skan 1657169689Skan2000-08-21 Nix <nix@esperi.demon.co.uk> 1658169689Skan 1659169689Skan * lang-specs.h: Do not process -o or run the assembler if 1660169689Skan -fsyntax-only. 1661169689Skan 1662169689Skan2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk> 1663169689Skan 1664169689Skan * decl.c (flag_hosted, flag_noniso_default_format_attributes): New 1665169689Skan variables. 1666169689Skan * decl2.c (lang_decode_option): Disable gettext attributes for 1667169689Skan -ansi. 1668169689Skan 1669169689Skan2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com> 1670169689Skan 1671169689Skan * lex.c (lang_init_options): Default diagnostic message maximum 1672169689Skan length to 80, when line-wrapping. 1673169689Skan 1674169689Skan2000-08-20 Mark Mitchell <mark@codesourcery.com> 1675169689Skan 1676169689Skan * class.c (build_vtbl_initializer): Clear the entire 1677169689Skan vtbl_init_data. Start keeping track of the functions for which we 1678169689Skan have created vcall offsets here. 1679169689Skan (dfs_build_vcall_offset_vtbl_entries): Remove. 1680169689Skan (build_vcall_offset_vtbl_entries): Reimplement. 1681169689Skan (add_vcall_offset_vtbl_entries_r): New function. 1682169689Skan (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for 1683169689Skan computing when vcall offsets are necessary. 1684169689Skan 1685169689Skan2000-08-18 Nathan Sidwell <nathan@codesourcery.com> 1686169689Skan 1687169689Skan * decl.c (member_function_or_else): Use cp_error ... %T. 1688169689Skan (grokdeclarator): Likewise. 1689169689Skan (start_method): Likewise. 1690169689Skan * friend.c (make_friend_class): Use cp_pedwarn ... %T. 1691169689Skan 1692169689Skan2000-08-18 Nathan Sidwell <nathan@codesourcery.com> 1693169689Skan 1694169689Skan * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class 1695169689Skan TYPE_DECLs. 1696169689Skan 1697169689Skan2000-08-18 Nathan Sidwell <nathan@codesourcery.com> 1698169689Skan 1699169689Skan * cp-tree.h (PTRMEM_OK_P): New macro. 1700169689Skan (itf_ptrmem_ok): New enumeration value. 1701169689Skan * class.c (resolve_address_of_overloaded_function): Add PTRMEM 1702169689Skan argument. Diagnose implicit pointer to member. 1703169689Skan (instantiate_type): Don't diagnose implicit pointer to member 1704169689Skan here. Pass itf_ptrmem_ok if ok. Adjust calls to 1705169689Skan resolve_address_of_overloaded_function. 1706169689Skan * init.c (build_offset_ref): Set PTRMEM_OK_P. 1707169689Skan (resolve_offset_ref): Don't diagnose implicit pointer to member here. 1708169689Skan * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here. 1709169689Skan * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P. 1710169689Skan (build_unary_op): Deal with single non-static member in 1711169689Skan microsoft-land. 1712169689Skan 1713169689Skan2000-08-18 Nathan Sidwell <nathan@codesourcery.com> 1714169689Skan 1715169689Skan * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE. 1716169689Skan 1717169689Skan2000-08-18 Nathan Sidwell <nathan@codesourcery.com> 1718169689Skan 1719169689Skan * cp-tree.h (enum_name_string): Remove prototype. 1720169689Skan (report_case_error): Remove prototype. 1721169689Skan * cp/typeck2.c (enum_name_string): Remove. 1722169689Skan (report_case_error): Remove. 1723169689Skan * error.c (dump_expr): Deal with enum values directly. 1724169689Skan Correctly negate integer constant. 1725169689Skan 1726169689Skan2000-08-17 Nathan Sidwell <nathan@codesourcery.com> 1727169689Skan 1728169689Skan * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare. 1729169689Skan (__cxa_vec_delete2, __cxa_vec_delete3): Declare. 1730169689Skan * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement. 1731169689Skan (__cxa_vec_delete2, __cxa_vec_delete3): Implement. 1732169689Skan (__cxa_vec_new): Use __cxa_vec_new2. 1733169689Skan (__cxa_vec_delete): Use __cxa_vec_delete2. 1734169689Skan 1735169689Skan2000-08-17 Nathan Sidwell <nathan@codesourcery.com> 1736169689Skan 1737169689Skan * vec.cc (__cxa_vec_new): Set "C" linkage. 1738169689Skan (__cxa_vec_ctor): Likewise. 1739169689Skan (__cxa_vec_cctor): Likewise. 1740169689Skan (__cxa_vec_dtor): Likewise. 1741169689Skan (__cxa_vec_delete): Likewise. 1742169689Skan * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage. 1743169689Skan (__cxa_vec_ctor): Likewise. 1744169689Skan (__cxa_vec_cctor): Likewise. 1745169689Skan (__cxa_vec_dtor): Likewise. 1746169689Skan (__cxa_vec_delete): Likewise. 1747169689Skan 1748169689Skan2000-08-17 Nathan Sidwell <nathan@codesourcery.com> 1749169689Skan 1750169689Skan * class.c (instantiate_type): Reinstate local variable 1751169689Skan deleted in previous change. 1752169689Skan 1753169689Skan * cvt.c (cp_convert_to_pointer): Pass itf_complain, not 1754169689Skan itf_no_attributes. 1755169689Skan 1756169689Skan2000-08-17 Nathan Sidwell <nathan@codesourcery.com> 1757169689Skan 1758169689Skan * cp-tree.h (instantiate_type_flags): New enumeration. 1759169689Skan (instantiate_type): Change parameter. 1760169689Skan * class.c (instantiate_type): Adjust prototype. Adjust. 1761169689Skan * call.c (standard_conversion): Adjust instantiate_type call. 1762169689Skan (reference_binding): Likewise. 1763169689Skan (build_op_delete_call): Likewise. 1764169689Skan (convert_like_real): Likewise. 1765169689Skan * cvt.c (cp_convert_to_pointer): Likewise. 1766169689Skan (convert_to_reference): Likewise. 1767169689Skan * pt.c (convert_nontype_argument): Likewise. 1768169689Skan * typeck.c (build_binary_op): Likewise. 1769169689Skan (build_ptrmemfunc): Likewise. 1770169689Skan (convert_for_assignment): Likewise. 1771169689Skan 1772169689Skan2000-08-17 Nathan Sidwell <nathan@codesourcery.com> 1773169689Skan 1774169689Skan * cp-tree.h (CPTR_AGGR_TAG): New global tree node. 1775169689Skan (current_aggr): Define. 1776169689Skan * decl.c (grokdeclarator): Make sure a friend class is an 1777169689Skan elaborated type specifier. 1778169689Skan * parse.y (current_aggr): Remove static definition. 1779169689Skan (cp_parse_init): Adjust. 1780169689Skan (structsp): Clear and restore current_aggr. 1781169689Skan (component_decl_list): Clear current_aggr. 1782169689Skan 1783169689Skan * error.c (dump_type, case TYPENAME_TYPE): Don't emit the 1784169689Skan aggregate tag on the typename's context. 1785169689Skan 1786169689Skan * pt.c (tsubst_friend_class): Return error_mark_node, if 1787169689Skan parms becomes NULL. 1788169689Skan (instantiate_class_template): Ignore error_mark_node friend types. 1789169689Skan 1790169689Skan2000-08-14 Nathan Sidwell <nathan@codesourcery.com> 1791169689Skan 1792169689Skan * cvt.c (warn_ref_binding): New static function, broken out of ... 1793169689Skan (convert_to_reference): ... here. Use it. 1794169689Skan 1795169689Skan2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> 1796169689Skan 1797169689Skan * parse.y (template_arg): Add rule for template qualified with 1798169689Skan global scope. 1799169689Skan 1800169689Skan2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 1801169689Skan 1802169689Skan * decl2.c (add_function): Reorganize. 1803169689Skan (arg_assoc): Do not consider function template decls. 1804169689Skan 1805169689Skan2000-08-11 Jason Merrill <jason@redhat.com> 1806169689Skan 1807169689Skan * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're 1808169689Skan looking inside. 1809169689Skan 1810169689Skan2000-08-11 Nathan Sidwell <nathan@codesourcery.com> 1811169689Skan 1812169689Skan * cp-tree.h (resolve_scope_to_name): Remove unused prototype. 1813169689Skan (lookup_nested_tag): Likewise. 1814169689Skan 1815169689Skan * decl2.c (grokfield): Fix comment to reflect many types of _DECLs 1816169689Skan can be produced. 1817169689Skan 1818169689Skan2000-08-11 Nathan Sidwell <nathan@codesourcery.com> 1819169689Skan 1820169689Skan * parse.y (named_complex_class_head_sans_basetype): Remove 1821169689Skan always true if. 1822169689Skan 1823169689Skan2000-08-11 Nathan Sidwell <nathan@codesourcery.com> 1824169689Skan 1825169689Skan * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build 1826169689Skan explicit TEMPLATE_ID_EXPR args. 1827169689Skan (build_expr_from_tree, case CALL_EXPR): Likewise. 1828169689Skan 1829169689Skan2000-08-11 Nathan Sidwell <nathan@codesourcery.com> 1830169689Skan 1831169689Skan * decl.c (check_tag_decl): Diagnose typename's which don't 1832169689Skan declare anything. 1833169689Skan 1834169689Skan2000-08-10 Nathan Sidwell <nathan@codesourcery.com> 1835169689Skan 1836169689Skan * init.c (build_aggr_init): Reject bogus array initializers 1837169689Skan early. 1838169689Skan 1839169689Skan2000-08-09 Nathan Sidwell <nathan@codesourcery.com> 1840169689Skan 1841169689Skan * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi 1842169689Skan runtime. 1843169689Skan * cp/tinfo.cc (__dynamic_cast): Likewise. 1844169689Skan * cp/inc/cxxabi.h (__dynamic_cast): Likewise. 1845169689Skan 1846169689Skan2000-08-09 Nathan Sidwell <nathan@codesourcery.com> 1847169689Skan 1848169689Skan * cvt.c (convert_to_pointer_force): Fix error message when 1849169689Skan attempting to cast from ambiguous base. 1850169689Skan 1851169689Skan2000-08-08 Jason Merrill <jason@redhat.com> 1852169689Skan 1853169689Skan * pt.c (tsubst_aggr_type): Bail if creating the argvec fails. 1854169689Skan (tsubst_template_arg_vector): Likewise. 1855169689Skan 1856169689Skan * decl2.c (build_anon_union_vars): Choose the largest field; don't 1857169689Skan assume that one will be as large as the union. 1858169689Skan 1859169689Skan2000-08-07 Kazu Hirata <kazu@hxi.com> 1860169689Skan 1861169689Skan * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo. 1862169689Skan * decl.c (pop_labels): Likewise. 1863169689Skan 1864169689Skan2000-08-04 Jeffrey Oldham <oldham@codesourcery.com> 1865169689Skan 1866169689Skan * inc/cxxabi.h (__pbase_type_info): Changed member names to match 1867169689Skan specifications. 1868169689Skan (__pointer_to_member_type_info): Likewise. 1869169689Skan (__base_class_info): Likewise. 1870169689Skan (__class_type_info): Likewise. 1871169689Skan (__si_class_type_info): Likewise. 1872169689Skan (__vmi_class_type_info): Likewise. 1873169689Skan * tinfo.cc (__si_class_type_info::__do_find_public_src): 1874169689Skan Changed member names to match specifications. 1875169689Skan (__vmi_class_type_info::__do_find_public_src): Likewise. 1876169689Skan (__si_class_type_info::__do_dyncast): Likewise. 1877169689Skan (__vmi_class_type_info::__do_dyncast): Likewise. 1878169689Skan (__si_class_type_info::__do_upcast): Likewise. 1879169689Skan (__vmi_class_type_info::__do_upcast): Likewise. 1880169689Skan * tinfo2.cc (__pbase_type_info::__do_catch): Likewise. 1881169689Skan (__pbase_type_info::__pointer_catch): Likewise. 1882169689Skan (__pointer_type_info::__pointer_catch): Likewise. 1883169689Skan (__pointer_to_member_type_info::__pointer_catch): Likewise. 1884169689Skan 1885169689Skan2000-08-04 Zack Weinberg <zack@wolery.cumb.org> 1886169689Skan 1887169689Skan * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist. 1888169689Skan * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS. 1889169689Skan (cc1plus): Link with $(BACKEND) and $(C_OBJS). 1890169689Skan 1891169689Skan2000-08-04 Mark Mitchell <mark@codesourcery.com> 1892169689Skan 1893169689Skan * cp-tree.h (add_method): Change prototype. 1894169689Skan * class.c (add_method): Remove FIELDS parameter. Add ERROR_P. 1895169689Skan Don't double the size of the method vector in the error case. 1896169689Skan (handle_using_decl): Adjust call to add_method. 1897169689Skan (add_implicitly_declared_members): Likewise. 1898169689Skan (clone_function_decl): Likewise. 1899169689Skan * decl2.c (check_classfn): Likewise. 1900169689Skan * semantics.c (finish_member_declaration): Likewise. 1901169689Skan 1902169689Skan2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk> 1903169689Skan 1904169689Skan * decl.c (flag_isoc94): New variable. 1905169689Skan 1906169689Skan2000-08-02 Jason Merrill <jason@redhat.com> 1907169689Skan 1908169689Skan * pt.c (do_type_instantiation): Add complain parm; don't complain 1909169689Skan if called recursively. 1910169689Skan * cp-tree.h, parse.y: Adjust. 1911169689Skan 1912169689Skan2000-08-02 Zack Weinberg <zack@wolery.cumb.org> 1913169689Skan 1914169689Skan * decl2.c: Silently ignore -Wstrict-prototypes; warn about 1915169689Skan -Wno-strict-prototypes. 1916169689Skan 1917169689Skan * g++spec.c: Adjust type of second argument to 1918169689Skan lang_specific_driver, and update code as necessary. 1919169689Skan 1920169689Skan * cp-tree.h: Don't prototype min_precision here. 1921169689Skan (my_friendly_assert): Cast expression to void. 1922169689Skan * semantics.c (do_poplevel): Initialize scope_stmts. 1923169689Skan 1924169689Skan2000-08-02 Mark Mitchell <mark@codesourcery.com> 1925169689Skan 1926169689Skan * cp-tree.h (DECL_NEEDED_P): Tweak. 1927169689Skan 1928169689Skan2000-07-28 Jason Merrill <jason@redhat.com> 1929169689Skan 1930169689Skan * lang-specs.h: Use %i in rule for .ii files. 1931169689Skan 1932169689Skan2000-07-31 Zack Weinberg <zack@wolery.cumb.org> 1933169689Skan 1934169689Skan * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. 1935169689Skan 1936169689Skan2000-07-30 Mark Mitchell <mark@codesourcery.com> 1937169689Skan 1938169689Skan Allow indirect primary bases. 1939169689Skan * cp-tree.h (struct lang_type): Remove vfield_parent. Add 1940169689Skan primary_base. 1941169689Skan (CLASSTYPE_VFIELD_PARENT): Remove. 1942169689Skan (CLASSTYPE_PRIMARY_BINFO): Reimplement. 1943169689Skan (BINFO_PRIMARY_BINFO): Remove. 1944169689Skan (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement. 1945169689Skan (BINFO_VBASE_PRIMARY_P): Likewise. 1946169689Skan (BINFO_PRIMARY_BASE_OF): New macro. 1947169689Skan (BINFO_INDIRECT_PRIMARY_P): Likewise. 1948169689Skan (get_primary_binfo): New function. 1949169689Skan * decl.c (lang_mark_tree): Make lang_type::primary_base. 1950169689Skan * class.c (vcall_offset_data_s): Rename to ... 1951169689Skan (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p, 1952169689Skan and add ctor_vtbl_p. 1953169689Skan (get_derived_offset): Use get_primary_binfo. 1954169689Skan (dfs_mark_primary_bases): Adjust handling of virtual primary 1955169689Skan bases. 1956169689Skan (mark_primary_bases): Likewise. 1957169689Skan (set_primary_base): Take a binfo, not an integer, as a 1958169689Skan representation of the primary base. 1959169689Skan (indirect_primary_base_p): Remove. 1960169689Skan (determine_primary_base): Adjust for indirect primary bases. 1961169689Skan (dfs_find_final_overrider): Fix typo in coment. 1962169689Skan (update_vtable_entry_for_fn): Use get_primary_binfo. 1963169689Skan (layout_nonempty_base_or_field): Tweak. 1964169689Skan (build_base_fields): Adjust for new primary base semantics. 1965169689Skan (dfs_propagate_binfo_offsets): Remove. 1966169689Skan (propagate_binfo_offsets): Rewrite. 1967169689Skan (dfs_set_offset_for_shared_vbases): Remove. 1968169689Skan (layout_virtual_bases): Don't use it. 1969169689Skan (layout_class_type): Set CLASSTYPE_SIZE correctly under the new 1970169689Skan ABI. 1971169689Skan (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not 1972169689Skan CLASSTYPE_VFIELD_PARENT. 1973169689Skan (dfs_get_primary_binfo): New function. 1974169689Skan (get_primary_binfo): Likewise. 1975169689Skan (dump_class_hierarchy_r): Tweak printing of primary bases. 1976169689Skan (build_vtbl_initializer): Fix typo in comments. Use 1977169689Skan vtbl_init_data. 1978169689Skan (build_vcall_and_vbase_vtbl_entries): Likewise. 1979169689Skan (build_vbaes_offset_vtbl_entries): Likewise. 1980169689Skan (dfs_build_vcall_offset_vtbl_entries): Adjust setting of 1981169689Skan BV_VCALL_INDEX to handle indirect primary bases. 1982169689Skan (build_vcall_offset_vtbl_entries): Use vtbl_init_data. 1983169689Skan (build_rtti_vtbl_entries): Likewise. 1984169689Skan * search.c (get_shared_vbase_if_not_primary): Tweak. 1985169689Skan (find_vbase_instance): Likewise. 1986169689Skan (binfo_for_vtable): Simplify. 1987169689Skan * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF. 1988169689Skan (make_binfo): Make it have 11 entries. 1989169689Skan 1990169689Skan2000-07-30 Alex Samuel <samuel@codesourcery.com> 1991169689Skan 1992169689Skan * mangle.c (DECL_TEMPLATE_ID_P): Remove. 1993169689Skan (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when 1994169689Skan ascertaining primaryness. 1995169689Skan (G): Remove template_args. 1996169689Skan (decl_is_template_id): New function. 1997169689Skan (write_encoding): Use decl_is_template_id. 1998169689Skan (write_name): Likewise. Handle type_decls. Get main variant of 1999169689Skan type decls. 2000169689Skan (write_nested_name): Likewise. 2001169689Skan (write_prefix): Likewise. 2002169689Skan (write_template_prefix): Likewise. 2003169689Skan (write_special_name_constructor): Remove defunct production from 2004169689Skan comment. 2005169689Skan (write_bare_function_type): Remove comment about absent parameter. 2006169689Skan (write_template_template_arg): Add missing grammar production to 2007169689Skan comment. 2008169689Skan 2009169689Skan2000-07-27 Jason Merrill <jason@redhat.com> 2010169689Skan 2011169689Skan * decl.c (duplicate_decls): If common_type produces a non-typedef 2012169689Skan type for a typedef, just use the old type. 2013169689Skan 2014169689Skan2000-07-27 Mark Mitchell <mark@codesourcery.com> 2015169689Skan 2016169689Skan * cp-tree.h (function_depth): Declare. 2017169689Skan (verify_stmt_tree): Likewise. 2018169689Skan (find_tree): Likewise. 2019169689Skan * decl.c (function_depth): Give it external linkage. 2020169689Skan * optimize.c (optimize_function): Increment and decrement it. 2021169689Skan * tree.c (verify_stmt_tree_r): New function. 2022169689Skan (verify_stmt_tree): Likewise. 2023169689Skan (find_tree_r): Likewise. 2024169689Skan (find_tree): Likewise. 2025169689Skan 2026169689Skan2000-07-27 Jason Merrill <jason@redhat.com> 2027169689Skan 2028169689Skan * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use 2029169689Skan TYPE_PTRMEMFUNC_P. 2030169689Skan * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC. 2031169689Skan 2032169689Skan2000-07-26 Mark Mitchell <mark@codesourcery.com> 2033169689Skan 2034169689Skan * decl.c (start_cleanup_fn): Mark the function as `inline'. 2035169689Skan * decl2.c (get_guard): Call cp_finish_decl, not 2036169689Skan rest_of_decl_compilation, for local guards. 2037169689Skan * lex.c (do_identifier): Remove unused variable. 2038169689Skan 2039169689Skan2000-07-26 Marc Espie <espie@cvs.openbsd.org> 2040169689Skan 2041169689Skan * parse.y: Add missing ';'. 2042169689Skan 2043169689Skan2000-07-26 Mark Mitchell <mark@codesourcery.com> 2044169689Skan 2045169689Skan * parse.y (empty_parms): Use `()', not `(...)', when in the scope 2046169689Skan of `extern "C++"'. 2047169689Skan 2048169689Skan2000-07-25 Nathan Sidwell <nathan@codesourcery.com> 2049169689Skan 2050169689Skan Kill strict_prototype. Backwards compatibility only for 2051169689Skan non NO_IMPLICIT_EXTERN_C systems. 2052169689Skan * cp-tree.h (flag_strict_prototype): Remove. 2053169689Skan (strict_prototype): Remove. 2054169689Skan (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. 2055169689Skan * decl.c (maybe_push_to_top_level): Adjust. 2056169689Skan (pop_from_top_level): Adjust. 2057169689Skan (decls_match): Only allow sloppy parm matching for ancient 2058169689Skan system headers. 2059169689Skan (init_decl_processing): Adjust. 2060169689Skan (grokdeclarator): Adjust. 2061169689Skan * decl2.c (flag_strict_prototype): Remove. 2062169689Skan (strict_prototype): Remove. 2063169689Skan (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. 2064169689Skan (lang_f_options): Remove "strict-prototype". 2065169689Skan (unsupported-options): Add "strict-prototype". 2066169689Skan * lex.c (do_identifier): Adjust. 2067169689Skan (do_scoped_id): Adjust. 2068169689Skan * parse.y (empty_parms): Adjust. 2069169689Skan * class.c (push_lang_context): Adjust. 2070169689Skan (pop_lang_context): Adjust. 2071169689Skan * typeck.c (comp_target_parms): Adjust. 2072169689Skan 2073169689Skan2000-07-25 Nathan Sidwell <nathan@codesourcery.com> 2074169689Skan 2075169689Skan * decl.c (poplevel): Deal with anonymous variables at for scope. 2076169689Skan (maybe_inject_for_scope_var): Likewise. 2077169689Skan 2078169689Skan2000-07-25 Zack Weinberg <zack@wolery.cumb.org> 2079169689Skan 2080169689Skan * decl.c: Remove all signal handling code, now done in toplev.c. 2081169689Skan 2082169689Skan2000-07-23 Mark Mitchell <mark@codesourcery.com> 2083169689Skan 2084169689Skan * decl.c (make_rtl_for_nonlocal_decl): Rework. 2085169689Skan 2086169689Skan * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set 2087169689Skan correctly. 2088169689Skan 2089169689Skan2000-07-20 Zack Weinberg <zack@wolery.cumb.org> 2090169689Skan 2091169689Skan * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__. 2092169689Skan Define my_friendly_assert and my_friendly_abort as macros 2093169689Skan which may call friendly_abort. Prototype friendly abort, not 2094169689Skan my_friendly_abort or my_friendly_assert. 2095169689Skan * decl.c (signal_catch): Report the signal caught in the error 2096169689Skan message. Call fatal directly. 2097169689Skan * typeck2.c (ack, my_friendly_assert): Delete. 2098169689Skan (my_friendly_abort): Rename to friendly_abort. Expect file, 2099169689Skan line, and function parameters. Report the abort code, then 2100169689Skan call fancy_abort. Do not mask an abort if errors have 2101169689Skan already occurred. 2102169689Skan 2103169689Skan2000-07-18 Nathan Sidwell <nathan@codesourcery.com> 2104169689Skan 2105169689Skan * typeck.c (comp_target_parms): Remove obsolete parameter. 2106169689Skan (comp_target_types): Adjust. 2107169689Skan 2108169689Skan2000-07-17 Jason Merrill <jason@redhat.com> 2109169689Skan 2110169689Skan * typeck.c (mark_addressable): Never set TREE_USED. 2111169689Skan * call.c (build_call): Don't abort on calls to library functions 2112169689Skan that have been declared normally. 2113169689Skan 2114169689Skan * typeck.c (build_binary_op): Fix grammar in warning. 2115169689Skan 2116169689Skan * exception.cc (__eh_free): Fix prototype. 2117169689Skan 2118169689Skan * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR. 2119169689Skan 2120169689Skan * decl.c (pushdecl): Handle seeing an OVERLOAD in 2121169689Skan IDENTIFIER_NAMESPACE_VALUE. 2122169689Skan 2123169689Skan2000-07-16 Mark Mitchell <mark@codesourcery.com> 2124169689Skan 2125169689Skan * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation. 2126169689Skan * method.c (use_thunk): Correct handling of vcall offsets. 2127169689Skan 2128169689Skan2000-07-14 Zack Weinberg <zack@wolery.cumb.org> 2129169689Skan 2130169689Skan * .cvsignore: parse.h and parse.c have no cp- prefix. 2131169689Skan 2132169689Skan2000-07-13 Mark Mitchell <mark@codesourcery.com> 2133169689Skan 2134169689Skan * .cvsignore: New file. 2135169689Skan 2136169689Skan2000-07-13 Zack Weinberg <zack@wolery.cumb.org> 2137169689Skan 2138169689Skan * lang-specs.h: Use the new named specs. Remove unnecessary braces. 2139169689Skan 2140169689Skan2000-07-12 Mark Mitchell <mark@codesourcery.com> 2141169689Skan 2142169689Skan * Makefile.in ($(PARSE_H)): Depend directly on parse.y. 2143169689Skan * parse.c: Remove. 2144169689Skan * parse.h: Likewise. 2145169689Skan 2146169689Skan2000-07-11 Mark Mitchell <mark@codesourcery.com> 2147169689Skan 2148169689Skan * class.c (layout_class_type): Add pointers to virtual bases after 2149169689Skan base classes under the old ABI. 2150169689Skan 2151169689Skan2000-07-10 Benjamin Chelf <chelf@codesourcery.com> 2152169689Skan 2153169689Skan * semantics.c (finish_for_stmt): Remove call to emit_line_note. 2154169689Skan (finish_continue_stmt): Likewise. 2155169689Skan (begin_for_stmt): Remove call to note_level_for_for. 2156169689Skan (finish_goto_stmt): Change call from build_min_nt 2157169689Skan to build_stmt. 2158169689Skan (finish_expr_stmt): Likewise. 2159169689Skan (begin_if_stmt): Likewise. 2160169689Skan (begin_while_stmt): Likewise. 2161169689Skan (finish_while_stmt): Likewise. 2162169689Skan (finish_return_stmt): Likewise. 2163169689Skan (begin_for_stmt): Likewise. 2164169689Skan (finish_for_stmt): Likewise. 2165169689Skan (finish_break_stmt): Likewise. 2166169689Skan (begin_switch_stmt): Likewise. 2167169689Skan (finish_case_label): Likewise. 2168169689Skan (genrtl_try_block): Likewise. 2169169689Skan (begin_try_block): Likewise. 2170169689Skan (begin_handler): Likewise. 2171169689Skan (begin_compound_stmt): Likewise. 2172169689Skan (finish_asm_stmt): Likewise. 2173169689Skan (finish_label_stmt): Likewise. 2174169689Skan (add_decl_stmt): Likewise. 2175169689Skan (finish_subobject): Likewise. 2176169689Skan (finish_decl_cleanup): Likewise. 2177169689Skan (finish_named_return_value): Likewise. 2178169689Skan (setup_vtbl_ptr): Likewise. 2179169689Skan (add_scope_stmt): Likewise. 2180169689Skan * decl.c (finish_constructor_body): Likewise. 2181169689Skan (finish_destructor_body): Likewise. 2182169689Skan * optimize.c (copy_body_r): Likewise. 2183169689Skan (initialize_inlined_parameters): Likewise. 2184169689Skan (declare_return_variable): Likewise. 2185169689Skan (expand_call_inline): Likewise. 2186169689Skan 2187169689Skan2000-07-10 Jakub Jelinek <jakub@redhat.com> 2188169689Skan 2189169689Skan * semantics.c (expand_body): Sync interface information 2190169689Skan at the end of function body expansion. 2191169689Skan 2192169689Skan2000-07-09 Jason Merrill <jason@redhat.com> 2193169689Skan 2194169689Skan * init.c (build_new_1): Bail early if the call to new fails. 2195169689Skan 2196169689Skan * decl.c (compute_array_index_type): Check specifically for 2197169689Skan an INTEGER_CST, not just TREE_CONSTANT. 2198169689Skan 2199169689Skan * decl.c (duplicate_decls): Don't call duplicate_decls on 2200169689Skan the DECL_TEMPLATE_RESULT. 2201169689Skan (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different 2202169689Skan codes. 2203169689Skan 2204169689Skan * error.c (dump_template_bindings): Don't crash if we had an 2205169689Skan invalid argument list. 2206169689Skan 2207169689Skan * typeck.c (c_expand_start_case): Do narrowing here. 2208169689Skan * semantics.c (finish_switch_cond): Not here. 2209169689Skan 2210169689Skan2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com> 2211169689Skan 2212169689Skan * parse.y (asm_clobbers): Do string concatenation. 2213169689Skan 2214169689Skan2000-07-09 Mark Mitchell <mark@codesourcery.com> 2215169689Skan 2216169689Skan * decl.c (pushtag): Don't put local classes in template functions 2217169689Skan on the local_classes list. 2218169689Skan 2219169689Skan2000-07-04 Scott Snyder <snyder@fnal.gov> 2220169689Skan 2221169689Skan * decl2.c (get_guard): Add missing return for old ABI local 2222169689Skan variable case. 2223169689Skan 2224169689Skan2000-07-09 Mark Mitchell <mark@codesourcery.com> 2225169689Skan 2226169689Skan * cp-tree.h (char_type_p): New function. 2227169689Skan * decl.c (init_decl_processing): Don't initialize 2228169689Skan signed_wchar_type_node or unsigned_wchar_type_node. 2229169689Skan (complete_array_type): Handle brace-enclosed string-constants. 2230169689Skan * rtti.c (emit_support_tinfos): Remove #if 0'd code. 2231169689Skan * tree.c (char_type_p): New function. 2232169689Skan * typeck2.c (digest_init): Use char_type_p. 2233169689Skan 2234169689Skan2000-07-06 Nathan Sidwell <nathan@codesourcery.com> 2235169689Skan 2236169689Skan * pt.c (tsubst): Don't layout type, if it's error_mark. 2237169689Skan 2238169689Skan2000-07-06 Nathan Sidwell <nathan@codesourcery.com> 2239169689Skan 2240169689Skan * pt.c (instantiate_pending_templates): Reset template level. 2241169689Skan 2242169689Skan2000-07-05 Jason Merrill <jason@redhat.com> 2243169689Skan 2244169689Skan * call.c (joust): Don't complain about `operator char *()' beating 2245169689Skan `operator const char *() const'. 2246169689Skan 2247169689Skan2000-07-04 scott snyder <snyder@fnal.gov> 2248169689Skan Jason Merrill <jason@redhat.com> 2249169689Skan 2250169689Skan * repo.c (repo_get_id): Handle the case where a class with virtual 2251169689Skan bases has a null TYPE_BINFO_VTABLE. 2252169689Skan 2253169689Skan2000-07-04 Kevin Buhr <buhr@stat.wisc.edu> 2254169689Skan Jason Merrill <jason@redhat.com> 2255169689Skan 2256169689Skan * parse.y (member_init): Just pass in the type. 2257169689Skan * init.c (expand_member_init): Handle getting a type. 2258169689Skan 2259169689Skan2000-07-04 Martin v. L�wis <loewis@informatik.hu-berlin.de> 2260169689Skan Jason Merrill <jason@redhat.com> 2261169689Skan 2262169689Skan * decl.c (finish_function): Warn if a function has no return 2263169689Skan statement. 2264169689Skan Suggested by Andrew Koenig. 2265169689Skan * typeck.c (check_return_expr): Do set current_function_returns_value 2266169689Skan if we got an error_mark_node. 2267169689Skan 2268169689Skan2000-07-03 Nathan Sidwell <nathan@codesourcery.com> 2269169689Skan 2270169689Skan * decl2.c (push_decl_namespace): Push the original namespace. 2271169689Skan 2272169689Skan2000-07-03 Nathan Sidwell <nathan@codesourcery.com> 2273169689Skan 2274169689Skan * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES. 2275169689Skan * semantics.c (begin_class_definition): Clear it. 2276169689Skan 2277169689Skan2000-07-02 Benjamin Chelf <chelf@codesourcery.com> 2278169689Skan 2279169689Skan * cp-tree.h (genrtl_goto_stmt): Remove declaration. 2280169689Skan (genrtl_expr_stmt): Likewise. 2281169689Skan (genrtl_decl_stmt): Likewise. 2282169689Skan (genrtl_if_stmt): Likewise. 2283169689Skan (genrtl_while_stmt): Likewise. 2284169689Skan (genrtl_do_stmt): Likewise. 2285169689Skan (genrtl_return_stmt): Likewise. 2286169689Skan (genrtl_for_stmt): Likewise. 2287169689Skan (genrtl_break_stmt): Likewise. 2288169689Skan (genrtl_continue_stmt): Likewise. 2289169689Skan (genrtl_scope_stmt): Likewise. 2290169689Skan (genrtl_switch_stmt): Likewise. 2291169689Skan (genrtl_case_label): Likewise. 2292169689Skan (genrtl_begin_compound_stmt): Likewise. 2293169689Skan (genrtl_finish_compound_stmt): Likewise. 2294169689Skan (genrtl_compound_stmt): Likewise. 2295169689Skan (genrtl_asm_stmt): Likewise. 2296169689Skan 2297169689Skan * init.c (begin_init_stmts): Remove call to 2298169689Skan genrtl_begin_compound_stmt. 2299169689Skan (finish_init_stmts): Remove call to genrtl_finish_compound_stmt. 2300169689Skan 2301169689Skan * semantics.c (lang_expand_stmt): Changed call to 2302169689Skan genrtl_compound_stmt to ignore return value. 2303169689Skan 2304169689Skan2000-07-02 Mark Mitchell <mark@codesourcery.com> 2305169689Skan 2306169689Skan * mangle.c (canonicalize_for_substitution): Return the canonical 2307169689Skan variant of a type. 2308169689Skan 2309169689Skan * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a 2310169689Skan TYPE_DECL. 2311169689Skan * typeck.c (commonparms): Remove obstack manipulations. 2312169689Skan 2313169689Skan2000-07-01 Benjamin Chelf <chelf@codesourcery.com> 2314169689Skan 2315169689Skan * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o. 2316169689Skan 2317169689Skan * Makefile.in (OBJS): Added ../c-semantics.o. 2318169689Skan (OBJDEPS): Likewise. 2319169689Skan 2320169689Skan * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to 2321169689Skan ../c-common.h. 2322169689Skan (struct stmt_tree): Added comment. 2323169689Skan (current_function_name_declared): Removed. 2324169689Skan (stmts_are_full_exprs_p): Likewise. 2325169689Skan (genrtl_do_pushlevel): Likewise. 2326169689Skan (genrtl_clear_out_block): Likewise. 2327169689Skan (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h. 2328169689Skan (DECL_ANON_UNION_ELEMS): Likewise. 2329169689Skan (emit_local_var): Likewise. 2330169689Skan (make_rtl_for_local_static): Likewise. 2331169689Skan (do_case): Likewise. 2332169689Skan (expand_stmt): Likewise. 2333169689Skan (genrtl_decl_cleanup): Likewise. 2334169689Skan (c_expand_asm_operands): Likewise. 2335169689Skan (c_expand_return): Likewise. 2336169689Skan (c_expand_start_case): Likewise. 2337169689Skan 2338169689Skan * decl.c (make_rtl_for_local_static): Moved to c-semantics.c. 2339169689Skan (emit_local_var): Likewise. 2340169689Skan (initialize_local_var): Change reference to 2341169689Skan stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). 2342169689Skan Change reference to stmts_are_full_exprs_p to 2343169689Skan current_stmt_tree->stmts_are_full_exprs_p. 2344169689Skan (push_cp_function_context): Likewise. 2345169689Skan 2346169689Skan * expect.c (expand_throw): Change reference to 2347169689Skan stmts_are_full_exprs_p. 2348169689Skan 2349169689Skan * init.c (build_aggr_init): Change reference to 2350169689Skan stmts_are_full_exprs_p. 2351169689Skan (build_vec_init): Likewise. 2352169689Skan 2353169689Skan * optimize.c (maybe_clone_body): Change reference to 2354169689Skan current_function_name_declared to 2355169689Skan cp_function_chain->name_declared. 2356169689Skan 2357169689Skan * pt.c (instantiate_decl): Change reference to 2358169689Skan current_function_name_declared to 2359169689Skan cp_function_chain->name_declared. 2360169689Skan 2361169689Skan * semantics.c (expand_cond): Moved declaration to c-common.h. 2362169689Skan (genrtl_do_pushlevel): Moved to c-semantics.c. 2363169689Skan (genrtl_clear_out_block): Likewise. 2364169689Skan (genrtl_goto_stmt): Likewise. 2365169689Skan (genrtl_expr_stmt): Likewise. 2366169689Skan (genrtl_decl_stmt): Likewise. 2367169689Skan (gerntl_if_stmt): Likewise. 2368169689Skan (genrtl_while_stmt): Likewise. 2369169689Skan (genrtl_do_stmt): Likewise. 2370169689Skan (genrtl_return_stmt): Likewise. 2371169689Skan (genrtl_for_stmt): Likewise. 2372169689Skan (genrtl_break_stmt): Likewise. 2373169689Skan (genrtl_continue_stmt): Likewise. 2374169689Skan (genrtl_scope_stmt): Likewise. 2375169689Skan (genrtl_switch_stmt): Likewise. 2376169689Skan (genrtl_case_label): Likewise. 2377169689Skan (genrtl_begin_compound_stmt): Likewise. 2378169689Skan (genrtl_finish_compound_stmt): Likewise. 2379169689Skan (genrtl_compound_stmt): Likewise. 2380169689Skan (genrtl_asm_stmt): Likewise. 2381169689Skan (genrtl_decl_cleanup): Likewise. 2382169689Skan (expand_cond): Likewise. 2383169689Skan (expand_stmt): Renamed to ... 2384169689Skan (lang_expand_stmt): ... this. 2385169689Skan (lang_expand_expr_stmt): Initialize. 2386169689Skan (set_current_function_name_declared): Likewise. 2387169689Skan (stmts_are_full_exprs_p): Likewise. 2388169689Skan (current_function_name_declared): Likewise. 2389169689Skan (anon_aggr_type_p): Likewise. 2390169689Skan (do_poplevel): Change reference to 2391169689Skan stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). 2392169689Skan Change reference to stmts_are_full_exprs_p to 2393169689Skan current_stmt_tree->stmts_are_full_exprs_p. 2394169689Skan (add_tree): Likewise. 2395169689Skan (finish_expr_stmt): Likewise. 2396169689Skan (prep_stmt): Likewise. 2397169689Skan (lang_expand_stmt): Likewise. 2398169689Skan (begin_compound_stmt): Change reference to 2399169689Skan current_function_name_declared to 2400169689Skan cp_function_chain->name_declared and call to 2401169689Skan current_function_name_declared(). 2402169689Skan (setup_vtbl_ptr): Likewise. 2403169689Skan (genrtl_do_poplevel): Removed. 2404169689Skan 2405169689Skan2000-06-30 Jason Merrill <jason@redhat.com> 2406169689Skan 2407169689Skan * init.c (init_init_processing): Go back to aligning like 2408169689Skan double_type_node for old ABI. 2409169689Skan (get_cookie_size): Make cookie larger if we get a type that needs 2410169689Skan more alignment. 2411169689Skan (build_vec_delete): Call it. 2412169689Skan 2413169689Skan * typeck.c (qualify_type_recursive): New fn. 2414169689Skan (composite_pointer_type): Use it. 2415169689Skan (build_binary_op): Use composite_pointer_type. 2416169689Skan 2417169689Skan2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu> 2418169689Skan Jason Merrill <jason@redhat.com> 2419169689Skan 2420169689Skan * typeck.c (check_return_expr): Don't complain about returning 2421169689Skan NULL from operator new if -fcheck-new. 2422169689Skan * cp-tree.h: Declare flag_check_new here. 2423169689Skan * init.c: Not here. 2424169689Skan 2425169689Skan2000-06-28 Alex Samuel <samuel@codesourcery.com> 2426169689Skan 2427169689Skan * mangle.c (find_substitution): Use same_type_p. 2428169689Skan (write_encoding): Don't check for substitutions. 2429169689Skan 2430169689Skan2000-06-30 Nathan Sidwell <nathan@codesourcery.com> 2431169689Skan 2432169689Skan * parse.y (expr_no_comma_rangle): New non-terminal. 2433169689Skan (template_parm): Use it for default parameter case. 2434169689Skan (template_arg): Use it. 2435169689Skan (expr_no_commas): Remove commented out undefined extensions. 2436169689Skan * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. 2437169689Skan * parse.h, parse.c: Rebuilt. 2438169689Skan 2439169689Skan2000-06-30 Mark Mitchell <mark@codesourcery.com> 2440169689Skan 2441169689Skan * semantics.c (genrtl_asm_stmt): Don't decay input operands here. 2442169689Skan (finish_asm_stmt): Do it here, instead. 2443169689Skan 2444169689Skan * cp-tree.h (ridpointers): Don't declare. 2445169689Skan * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX. 2446169689Skan (record_builtin_java_type): Likewise. 2447169689Skan (init_decl_processing): Likewise. 2448169689Skan * lex.c: Move inclusion of lex.h. 2449169689Skan (ridpointers): Don't define. 2450169689Skan (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of 2451169689Skan RID_MAX. 2452169689Skan * lex.h (enum rid): Rename to ... 2453169689Skan (enum cp_rid): ... this. 2454169689Skan (ridpointers): Don't declare. 2455169689Skan * parse.y: Move inclusion of lex.h. 2456169689Skan * parse.c: Regenerated. 2457169689Skan * spew.c: Move inclusion of lex.h. 2458169689Skan 2459169689Skan * cp-tree.h (struct language_function): Remove temp_name_counter. 2460169689Skan (temp_name_counter): Remove. 2461169689Skan (get_temp_name): Change prototype. 2462169689Skan (get_guard): New function. 2463169689Skan (get_guard_cond): Likewise. 2464169689Skan (set_guard): Likewise. 2465169689Skan * cvt.c (build_up_reference): Adjust call to get_temp_name. 2466169689Skan * decl.c (expand_static_init): Use get_guard and friends to 2467169689Skan implement guard variables. 2468169689Skan * decl2.c (get_temp_name): Assume that the variables created are 2469169689Skan always static. 2470169689Skan (get_sentry): Rename to ... 2471169689Skan (get_guard): ... this. Implement new ABI guard variables. 2472169689Skan (get_guard_bits): New function. 2473169689Skan (get_guard_cond): Likewise. 2474169689Skan (set_guard): Likewise. 2475169689Skan (start_static_initialization_or_destruction): Use them. 2476169689Skan (do_static_initialization): Replace sentry with guard throughout. 2477169689Skan (do_static_destruction): Likewise. 2478169689Skan * init.c (create_temporary_var): Add comment. 2479169689Skan 2480169689Skan2000-06-28 Alex Samuel <samuel@codesourcery.com> 2481169689Skan 2482169689Skan * mangle.c (find_substitution): Use same_type_p. 2483169689Skan (write_encoding): Don't check for substitutions. 2484169689Skan 2485169689Skan2000-06-30 Nathan Sidwell <nathan@codesourcery.com> 2486169689Skan 2487169689Skan * parse.y (expr_no_comma_rangle): New non-terminal. 2488169689Skan (template_parm): Use it for default parameter case. 2489169689Skan (template_arg): Use it. 2490169689Skan (expr_no_commas): Remove commented out undefined extensions. 2491169689Skan * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. 2492169689Skan * parse.h, parse.c: Rebuilt. 2493169689Skan 2494169689Skan2000-06-29 Mark Mitchell <mark@codesourcery.com> 2495169689Skan 2496169689Skan * cp-tree.h (flag_const_strings): Remove. 2497169689Skan (warn_parentheses): Likewise. 2498169689Skan (warn_format): Likewise. 2499169689Skan (common_type): Likewise. 2500169689Skan (default_conversion): Likewise. 2501169689Skan (build_binary_op): Likewise. 2502169689Skan (cp_build_binary_op): New macro. 2503169689Skan * call.c (build_new_op): Use cp_build_binary_op instead of 2504169689Skan build_binary_op. 2505169689Skan * class.c (build_vtable_entry_ref): Likewise. 2506169689Skan * decl.c (expand_static_init): Likewise. 2507169689Skan (compute_array_index_type): Likewise. 2508169689Skan (build_enumerator): Likewise. 2509169689Skan * decl2.c (delete_sanity): Likewise. 2510169689Skan (start_static_initialization_or_destruction): Likewise. 2511169689Skan * error.c (dump_type_suffix): Likewise. 2512169689Skan * init.c (resolve_offset_ref): Likewise. 2513169689Skan (build_new): Likewise. 2514169689Skan (build_new_1): Likewise. 2515169689Skan (build_vec_delete_1): Likewise. 2516169689Skan (build_vec_init): Likewise. 2517169689Skan (build_delete): Likewise. 2518169689Skan * rtti.c (synthesize_tinfo_fn): Likewise. 2519169689Skan (synthesize_tinfo_var): Likewise. 2520169689Skan * search.c (expand_upcast_fixups): Likewise. 2521169689Skan (fixup_all_virtual_upcast_offsets): Likewise. 2522169689Skan * typeck.c (build_array_ref): Likewise. 2523169689Skan (get_member_function_from_ptrfunc): Likewise. 2524169689Skan (build_binary_op): Add parameter. 2525169689Skan (pointer_int_sum): Use cp_build_binary_op. 2526169689Skan (pointer_diff): Likewise. 2527169689Skan (build_modify_expr): Likewise. 2528169689Skan (get_delta_difference): Likewise. 2529169689Skan (build_ptrmemfunc): Likewise. 2530169689Skan 2531169689Skan2000-06-29 Nathan Sidwell <nathan@codesourcery.com> 2532169689Skan 2533169689Skan * cp-tree.h (SET_DECL_ARTIFICIAL): Remove. 2534169689Skan * decl.c (create_implicit_typedef): Adjust. 2535169689Skan * decl2.c (build_artificial_parm): Adjust. 2536169689Skan * method.c (implicitly_declare_fn): Adjust. 2537169689Skan * pt.c (push_inline_template_parms_recursive): Adjust. 2538169689Skan (process_template_parm): Adjust. 2539169689Skan (overloaded_template_name): Adjust. 2540169689Skan * semantics.c (finish_template_template_parm): Adjust. 2541169689Skan 2542169689Skan2000-06-28 Mark Mitchell <mark@codesourcery.com> 2543169689Skan 2544169689Skan * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove. 2545169689Skan * class.c (update_vtable_entry_for_fn): Correct logic for deciding 2546169689Skan where to emit thunks. 2547169689Skan (build_vtt): Adjust call to build_vtt_inits. 2548169689Skan (build_vtt_inits): Add parameter to indicate whether or not 2549169689Skan sub-VTTs for virtual bases should be included. Adjust handling of 2550169689Skan construction vtables. 2551169689Skan (get_matching_base): New function. 2552169689Skan (dfs_build_vtt_inits): Rename to ... 2553169689Skan (dfs_build_secondary_vptr_vtt_inits): Adjust handling of 2554169689Skan construction vtables. 2555169689Skan (dfs_fixup_binfo_vtbls): Likewise. 2556169689Skan (build_ctor_vtbl_groups): Build construction vtables for virtual 2557169689Skan bases, too. 2558169689Skan (accumulate_vtbl_inits): Tweak logic for deciding whether or not 2559169689Skan to build construction vtbls. 2560169689Skan (dfs_accumulate_vtbl_inits): Adjust handling of 2561169689Skan construction vtables. 2562169689Skan 2563169689Skan * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified 2564169689Skan types correctly. 2565169689Skan 2566169689Skan2000-06-27 Mark Mitchell <mark@codesourcery.com> 2567169689Skan 2568169689Skan * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too. 2569169689Skan 2570169689Skan2000-06-26 Nathan Sidwell <nathan@codesourcery.com> 2571169689Skan 2572169689Skan * search.c (hides): Remove. 2573169689Skan (is_subobject_of_p): Add most_derived parameter. Use 2574169689Skan CANONICAL_BINFO. 2575169689Skan (lookup_field_queue_p): Adjust. 2576169689Skan (lookup_field_r): Adjust. 2577169689Skan 2578169689Skan2000-06-26 Nathan Sidwell <nathan@codesourcery.com> 2579169689Skan 2580169689Skan * decl2.c (handle_class_head): Bash typedefs to the type's main 2581169689Skan decl. 2582169689Skan 2583169689Skan2000-06-25 Mark Mitchell <mark@codesourcery.com> 2584169689Skan 2585169689Skan * cp-tree.h (genrtl_begin_stmt_expr): Rename to ... 2586169689Skan (begin_global_stmt_expr): ... this. 2587169689Skan (genrtl_finish_stmt_expr): Rename to ... 2588169689Skan (finish_global_stmt_expr): ... this. 2589169689Skan * init.c (begin_init_stmts): Adjust calls. 2590169689Skan (finish_init_stmts): Likewise. 2591169689Skan * semantics.c (genrtl_begin_stmt_expr): Rename to ... 2592169689Skan (begin_global_stmt_expr): ... this. 2593169689Skan (genrtl_finish_stmt_expr): Rename to ... 2594169689Skan (finish_global_stmt_expr): ... this. 2595169689Skan 2596169689Skan2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 2597169689Skan 2598169689Skan * search.c (lookup_member): Fix typo in comment. 2599169689Skan 2600169689Skan2000-06-24 Jason Merrill <jason@redhat.com> 2601169689Skan 2602169689Skan * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace. 2603169689Skan (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL. 2604169689Skan 2605169689Skan2000-06-24 Martin v. L�wis <loewis@informatik.hu-berlin.de> 2606169689Skan 2607169689Skan * parse.y (complex_direct_notype_declarator): Support global_scope. 2608169689Skan * Makefile.in: Adjust conflict count. 2609169689Skan 2610169689Skan2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu> 2611169689Skan 2612169689Skan * parse.y (template_arg): Convert TEMPLATE_DECL 2613169689Skan that is a template template parameter to 2614169689Skan TEMPLATE_TEMPLATE_PARM here. 2615169689Skan 2616169689Skan * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment. 2617169689Skan * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro. 2618169689Skan (copy_template_template_parm): Adjust prototype. 2619169689Skan * decl.c (grokdeclarator): Remove dead code. 2620169689Skan * pt.c (process_template_parm): Tidy. 2621169689Skan (lookup_template_class): Construct nodes in 2622169689Skan copy_template_template_parm. 2623169689Skan (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to 2624169689Skan lookup_template_class. Use TYPE_TI_TEMPLATE. 2625169689Skan * tree.c (copy_template_template_parm): Add NEWARGS 2626169689Skan parameter. 2627169689Skan (mapcar): Adjust call to copy_template_template_parm. 2628169689Skan * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL. 2629169689Skan * method.c (build_template_template_parm_names): Change error 2630169689Skan code to avoid compilation warning. 2631169689Skan 2632169689Skan * gxxint.texi: Document template template parameter 2633169689Skan name mangling. 2634169689Skan 2635169689Skan2000-06-21 Alex Samuel <samuel@codesourcery.com> 2636169689Skan 2637169689Skan * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o. 2638169689Skan (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c. 2639169689Skan (cp-demangle.o): New rule. 2640169689Skan (dyn-string.o): Likewise. 2641169689Skan * inc/cxxabi.h (__cxa_demangle): New declaration. 2642169689Skan 2643169689Skan2000-06-22 Mark Mitchell <mark@codesourcery.com> 2644169689Skan 2645169689Skan * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro. 2646169689Skan (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise. 2647169689Skan (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset 2648169689Skan a tree, not an int. 2649169689Skan (THUNK_GENERATE_WITH_VTABLE_P): New macro. 2650169689Skan (make_thunk): Change prototype. 2651169689Skan (emit_thunk): Rename to use_thunk. 2652169689Skan (mangle_thunk): Change prototype. 2653169689Skan * class.c (get_derived_offset): Simplify. 2654169689Skan (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and 2655169689Skan BV_GENERATE_THUNK_WITH_VTABLE_P. 2656169689Skan (build_primary_vtable): Simplify. 2657169689Skan (add_virtual_function): Use BV_FN, rather than TREE_VALUE. 2658169689Skan (dfs_find_base): Remove. 2659169689Skan (update_vtable_entry_for_fn): Correct bug in finding the base 2660169689Skan where a virtual function was first declared. Figure out whether 2661169689Skan or not to emit a vcall-thunk with the vtables in which it appears. 2662169689Skan Correct logic for deciding whether to use an ordinary thunk, or a 2663169689Skan vcall thunk. 2664169689Skan (finish_struct_1): Remove unnecssary code. 2665169689Skan (build_vtbl_initializer): Use ssize_int for the running counter of 2666169689Skan negative indices. 2667169689Skan (build_vtbl_initializer): Only use vcall thunks where necessary. 2668169689Skan Mark thunks as needing to be emitted with their vtables, or not. 2669169689Skan (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in 2670169689Skan indices. Use size_binop. 2671169689Skan (dfs_build_vcall_offset_vtbl_entries): Don't rely on 2672169689Skan BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use 2673169689Skan size_binop. 2674169689Skan (build_rtti_vtbl_entries): Adjust call to build_vtable_entry. 2675169689Skan (build_vtable_entry): Mark thunks as needing to be emitted with 2676169689Skan their vtables, or not. 2677169689Skan * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk. 2678169689Skan * decl2.c (mark_vtable_entries): Use use_thunk instead of 2679169689Skan emit_thunk. 2680169689Skan * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk 2681169689Skan information. 2682169689Skan * error.c (dump_expr): Use BV_FN. 2683169689Skan * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree, 2684169689Skan not an int. 2685169689Skan * method.c (make_thunk): Likewise. 2686169689Skan (emit_thunk): Rename to use_thunk. Allow callers to decide 2687169689Skan whether or not to actually emit the thunk. Adjust for changes in 2688169689Skan representation of vcall offsets. 2689169689Skan * search.c (dfs_get_pure_virtuals): Use BV_FN. 2690169689Skan * semantics.c (emit_associated_thunks): New function. 2691169689Skan (expand_body): Use it. 2692169689Skan * ir.texi: Adjust descriptions of thunks. 2693169689Skan 2694169689Skan2000-06-22 Jason Merrill <jason@redhat.com> 2695169689Skan 2696169689Skan * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE. 2697169689Skan (tsubst_friend_function): Copy it here. 2698169689Skan 2699169689Skan * decl.c (grok_op_properties): Fix typo. 2700169689Skan 2701169689Skan * decl2.c (delete_sanity): Clarify warning, avoid failure on 2702169689Skan deleting void*. 2703169689Skan 2704169689Skan * pt.c (check_explicit_specialization): Clarify error. 2705169689Skan 2706169689Skan * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from 2707169689Skan an old OVERLOAD when we're declaring a non-function. 2708169689Skan (pushdecl, destroy_local_var): Check for error_mark_node. 2709169689Skan (warn_extern_redeclared_static): Also bail early if 2710169689Skan we're a CONST_DECL. 2711169689Skan (push_overloaded_decl): Ignore an old error_mark_node. 2712169689Skan 2713169689Skan2000-06-22 Nathan Sidwell <nathan@codesourcery.com> 2714169689Skan 2715169689Skan * call.c (build_x_va_arg): Check if in a template decl. 2716169689Skan * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg. 2717169689Skan 2718169689Skan2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 2719169689Skan 2720169689Skan * class.c (push_lang_context): TYPE_NAME gets you to the Java 2721169689Skan types DECLs. 2722169689Skan * decl.c (check_goto): Computed gotos assumed OK. 2723169689Skan 2724169689Skan2000-06-20 Jason Merrill <jason@redhat.com> 2725169689Skan 2726169689Skan * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs 2727169689Skan for which we don't need to look for instantiations. 2728169689Skan 2729169689Skan2000-06-21 Nathan Sidwell <nathan@codesourcery.com> 2730169689Skan 2731169689Skan * parse.y (program): Always call finish_translation_unit. 2732169689Skan * parse.c, parse.h: Rebuilt. 2733169689Skan 2734169689Skan2000-06-20 Zack Weinberg <zack@wolery.cumb.org> 2735169689Skan 2736169689Skan * method.c: Don't include hard-reg-set.h. 2737169689Skan 2738169689Skan2000-06-20 Nathan Sidwell <nathan@codesourcery.com> 2739169689Skan 2740169689Skan * rtti.c (get_base_offset): Cope when vbase field is in a base. 2741169689Skan 2742169689Skan2000-06-20 Nathan Sidwell <nathan@codesourcery.com> 2743169689Skan 2744169689Skan * call.c (build_conditional_expr): Use VOID_TYPE_P. 2745169689Skan * cvt.c (cp_convert_to_pointer): Likewise. 2746169689Skan (convert_to_void): Likewise. 2747169689Skan * error.c (dump_expr): Likewise. 2748169689Skan * except.c (complete_ptr_ref_or_void_ptr_p): Likewise. 2749169689Skan * init.c (build_delete): Likewise. 2750169689Skan * method.c (emit_thunk): Likewise. 2751169689Skan * optmize.c (declare_return_variable): Likewise. 2752169689Skan * rtti.c (get_tinfo_decl_dynamic): Likewise. 2753169689Skan (get_typeid): Likewise. 2754169689Skan (build_dynamic_cast_1): Likewise. 2755169689Skan * typeck.c (composite_pointer_type): Likewise. 2756169689Skan (common_type): Likewise. 2757169689Skan (build_indirect_ref): Likewise. 2758169689Skan (build_binary_op): Likewise. 2759169689Skan (build_x_compound_expr): Likewise. 2760169689Skan (check_return_expr): Likewise. 2761169689Skan * typeck2.c (add_exception_specifier): Likewise. 2762169689Skan 2763169689Skan * mangle.c (write_method_parms): Use direct comparison for end 2764169689Skan of parmlist. 2765169689Skan 2766169689Skan2000-06-19 Benjamin Chelf <chelf@codesourcery.com> 2767169689Skan 2768169689Skan * cp-tree.h (genrtl_try_block): Declare function. 2769169689Skan (genrtl_handler): Likewise. 2770169689Skan (genrtl_catch_block): Likewise. 2771169689Skan (genrtl_ctor_stmt): Likewise. 2772169689Skan (genrtl_subobject): Likewise. 2773169689Skan (genrtl_decl_cleanup): Likewise. 2774169689Skan (genrtl_do_poplevel): Likewise. 2775169689Skan (genrtl_do_pushlevel): Likewise. 2776169689Skan (genrtl_clear_out_block): Likewise. 2777169689Skan (genrtl_goto_stmt): Likewise. 2778169689Skan (genrtl_expr_stmt): Likewise. 2779169689Skan (genrtl_decl_stmt): Likewise. 2780169689Skan (genrtl_if_stmt): Likewise. 2781169689Skan (genrtl_while_stmt): Likewise. 2782169689Skan (genrtl_do_stmt): Likewise. 2783169689Skan (genrtl_return_stmt): Likewise. 2784169689Skan (genrtl_for_stmt): Likewise. 2785169689Skan (genrtl_break_stmt): Likewise. 2786169689Skan (genrtl_continue_stmt): Likewise. 2787169689Skan (genrtl_scope_stmt): Likewise. 2788169689Skan (genrtl_switch_stmt): Likewise. 2789169689Skan (genrtl_case_label): Likewise. 2790169689Skan (genrtl_begin_compound_stmt): Likewise. 2791169689Skan (genrtl_finish_compound_stmt): Likewise. 2792169689Skan (genrtl_compound_stmt): Likewise. 2793169689Skan (genrtl_asm_stmt): Likewise. 2794169689Skan (genrtl_named_return_value): Likewise. 2795169689Skan (genrtl_begin_stmt_expr): Likewise. 2796169689Skan (genrtl_finish_stmt_expr): Likewise. 2797169689Skan (finish_for_stmt): Removed first argument. 2798169689Skan (finish_switch_stmt): Likewise. 2799169689Skan 2800169689Skan * semantics.c (genrtl_try_block): Define function. 2801169689Skan (genrtl_handler): Likewise. 2802169689Skan (genrtl_catch_block): Likewise. 2803169689Skan (genrtl_ctor_stmt): Likewise. 2804169689Skan (genrtl_subobject): Likewise. 2805169689Skan (genrtl_decl_cleanup): Likewise. 2806169689Skan (genrtl_do_poplevel): Likewise. 2807169689Skan (genrtl_do_pushlevel): Likewise. 2808169689Skan (genrtl_clear_out_block): Likewise. 2809169689Skan (genrtl_goto_stmt): Likewise. 2810169689Skan (genrtl_expr_stmt): Likewise. 2811169689Skan (genrtl_decl_stmt): Likewise. 2812169689Skan (genrtl_if_stmt): Likewise. 2813169689Skan (genrtl_while_stmt): Likewise. 2814169689Skan (genrtl_do_stmt): Likewise. 2815169689Skan (genrtl_return_stmt): Likewise. 2816169689Skan (genrtl_for_stmt): Likewise. 2817169689Skan (genrtl_break_stmt): Likewise. 2818169689Skan (genrtl_continue_stmt): Likewise. 2819169689Skan (genrtl_scope_stmt): Likewise. 2820169689Skan (genrtl_switch_stmt): Likewise. 2821169689Skan (genrtl_case_label): Likewise. 2822169689Skan (genrtl_begin_compound_stmt): Likewise. 2823169689Skan (genrtl_finish_compound_stmt): Likewise. 2824169689Skan (genrtl_compound_stmt): Likewise. 2825169689Skan (genrtl_asm_stmt): Likewise. 2826169689Skan (genrtl_named_return_value): Likewise. 2827169689Skan (genrtl_begin_stmt_expr): Likewise. 2828169689Skan (genrtl_finish_stmt_expr): Likewise. 2829169689Skan (finish_for_stmt): Removed first argument and generate rtl 2830169689Skan specific code. 2831169689Skan (finish_switch_stmt): Likewise. 2832169689Skan (do_poplevel): Removed generate rtl specific code. 2833169689Skan (do_pushlevel): Likewise. 2834169689Skan (add_tree): Likewise. 2835169689Skan (finish_goto_stmt): Likewise. 2836169689Skan (finish_expr_stmt): Likewise. 2837169689Skan (begin_if_stmt): Likewise. 2838169689Skan (finish_if_stmt_cond): Likewise. 2839169689Skan (finish_then_clause): Likewise. 2840169689Skan (begin_else_clause): Likewise. 2841169689Skan (finish_else_clause): Likewise. 2842169689Skan (finish_if_stmt): Likewise. 2843169689Skan (clear_out_block): Likewise. 2844169689Skan (begin_while_stmt): Likewise. 2845169689Skan (finish_while_stmt_cond): Likewise. 2846169689Skan (finish_while_stmt): Likewise. 2847169689Skan (begin_do_stmt): Likewise. 2848169689Skan (finish_do_body): Likewise. 2849169689Skan (finish_do_stmt): Likewise. 2850169689Skan (finish_return_stmt): Likewise. 2851169689Skan (begin_for_stmt): Likewise. 2852169689Skan (finish_for_init_stmt): Likewise. 2853169689Skan (finish_for_cond): Likewise. 2854169689Skan (finish_for_expr): Likewise. 2855169689Skan (finish_break_stmt): Likewise. 2856169689Skan (finish_continue_stmt): Likewise. 2857169689Skan (begin_switch_stmt): Likewise. 2858169689Skan (finish_switch_cond): Likewise. 2859169689Skan (finish_case_label): Likewise. 2860169689Skan (begin_try_block): Likewise. 2861169689Skan (begin_function_try_block): Likewise. 2862169689Skan (finish_try_block): Likewise. 2863169689Skan (finish_cleanup_try_block): Likewise. 2864169689Skan (finish_cleanup): Likewise. 2865169689Skan (finish_function_try_block): Likewise. 2866169689Skan (finish_handler_sequence): Likewise. 2867169689Skan (finish_function_handler_sequence): Likewise. 2868169689Skan (begin_handler): Likewise. 2869169689Skan (finish_handler_parms): Likewise. 2870169689Skan (begin_catch_block): Likewise. 2871169689Skan (finish_handler): Likewise. 2872169689Skan (begin_compound_stmt): Likewise. 2873169689Skan (finish_compound_stmt): Likewise. 2874169689Skan (finish_asm_stmt): Likewise. 2875169689Skan (finish_label_stmt): Likewise. 2876169689Skan (finish_label_decl): Likewise. 2877169689Skan (finish_subobject): Likewise. 2878169689Skan (finish_decl_cleanup): Likewise. 2879169689Skan (finish_named_return_value): Likewise. 2880169689Skan (begin_stmt_expr): Likewise. 2881169689Skan (finish_stmt_expr): Likewise. 2882169689Skan 2883169689Skan * decl.c (initialize_local_var): Changed call to finish_expr_stmt 2884169689Skan to call genrtl_expr_stmt when appropriate. 2885169689Skan 2886169689Skan * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and 2887169689Skan begin_compound_expr to call genrtl_begin_stmt_expr and 2888169689Skan genrtl_begin_compound_expr when appropriate. 2889169689Skan (finish_init_stmts): Changed calls to finish_compound_expr and 2890169689Skan finish_stmt_expr to call genrtl_finish_compound_expr and 2891169689Skan genrtl_finish_stmt_expr when appropriate. 2892169689Skan (expand_default_init): Changed call to finish_expr_stmt to call 2893169689Skan genrtl_expr_stmt when appropriate. 2894169689Skan (build_vec_init): Likewise. 2895169689Skan 2896169689Skan * parse.y (simple_stmt): Removed first argument from call to 2897169689Skan finish_for_stmt. Removed first argument from call to 2898169689Skan finish_switch_stmt. 2899169689Skan 2900169689Skan * parse.c: Regenerated. 2901169689Skan 2902169689Skan * pt.c (tsubst_expr): Removed first argument from call to 2903169689Skan finish_for_stmt. Removed first argument from call to 2904169689Skan finish_switch_stmt. 2905169689Skan 2906169689Skan2000-06-16 Benjamin Chelf <chelf@codesourcery.com> 2907169689Skan 2908169689Skan * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to 2909169689Skan CP_DUMMY_TREE_CODE. Remove #include "c-common.def". 2910169689Skan 2911169689Skan * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def". 2912169689Skan (cplus_tree_code_length[]): Likewise. 2913169689Skan (cplus_tree_code_name[]): Likewise. 2914169689Skan (init_parse): Added call to add_c_tree_codes. Changed 2915169689Skan LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE. 2916169689Skan 2917169689Skan2000-06-16 Mark Mitchell <mark@codesourcery.com> 2918169689Skan 2919169689Skan * cp-tree.h (finish_mem_initializers): Declare. 2920169689Skan (count_trees): Likewise. 2921169689Skan * parse.y (base_init): Use finish_mem_initializers. 2922169689Skan * semantics.c (finish_mem_initializers): New function. 2923169689Skan 2924169689Skan * tree.c (count_trees_r): Prototype. Use DATA parameter to store 2925169689Skan the number of trees. 2926169689Skan (n_trees): Remove. 2927169689Skan (count_trees): Don't use it. 2928169689Skan 2929169689Skan2000-06-15 Jason Merrill <jason@redhat.com> 2930169689Skan 2931169689Skan * tree.c (count_trees): New debugging function. 2932169689Skan 2933169689Skan * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P. 2934169689Skan * init.c (build_member_call): Pull out the name of a DECL. 2935169689Skan 2936169689Skan * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H. 2937169689Skan * semantics.c (expand_body): Push to TV_INTEGRATION here. 2938169689Skan * optimize.c (optimize_function): Not here. 2939169689Skan * pt.c (instantiate_decl): Push to TV_PARSE. 2940169689Skan 2941169689Skan2000-06-15 Mark Mitchell <mark@codesourcery.com> 2942169689Skan 2943169689Skan * cp-tree.h (struct language_function): Remove x_base_init_list 2944169689Skan and x_member_init_list. 2945169689Skan (current_base_init_list): Remove. 2946169689Skan (current_member_init_list): Likewise. 2947169689Skan (setup_vtbl_ptr): Change prototype. 2948169689Skan (emit_base_init): Likewise. 2949169689Skan (expand_member_init): Likewise. 2950169689Skan (reinit_parse_for_function): Remove. 2951169689Skan * decl.c (save_function_data): Don't clear x_base_init_list and 2952169689Skan x_member_init_list. 2953169689Skan (mark_language_function): Don't mark them. 2954169689Skan * init.c (perform_member_init): Tweak comment. 2955169689Skan (sort_member_init): Take the list of initializers as an argument. 2956169689Skan (sort_base_init): Likewise. 2957169689Skan (emit_base_init): Likewise. 2958169689Skan (expand_member_init): Return the initializer. Don't use global 2959169689Skan variables. 2960169689Skan * lex.c (reinit_parse_for_function): Remove. 2961169689Skan * method.c (build_template_parm_names): Correct substitution. 2962169689Skan (do_build_copy_constructor): Don't use current_member_init_list 2963169689Skan and current_base_init_list. 2964169689Skan (synthesize_method): Likewise. 2965169689Skan * parse.y (base_init): Split mem-initializers into 2966169689Skan base-initializers and field-initializers. 2967169689Skan (member_init_list): Build up the list here. 2968169689Skan (member_init): Return the initializer. 2969169689Skan (fn.depfn): Don't use reinit_parse_for_function. 2970169689Skan * parse.c: Regenerated. 2971169689Skan * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the 2972169689Skan ERROR_MARK. 2973169689Skan (tsubst_expr): Don't use current_member_init_list 2974169689Skan and current_base_init_list. 2975169689Skan (tsubst_expr_values): Rename to ... 2976169689Skan (tsubst_initializer_list): ... this. Use convert_from_reference. 2977169689Skan * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list 2978169689Skan and current_base_init_list. 2979169689Skan (begin_function_definition): Don't call reinit_parse_for_function. 2980169689Skan 2981169689Skan * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors. 2982169689Skan 2983169689Skan * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE 2984169689Skan correctly. 2985169689Skan 2986169689Skan * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking. 2987169689Skan 2988169689Skan2000-06-14 Benjamin Chelf <chelf@codesourcery.com> 2989169689Skan 2990169689Skan * cp-tree.h (IF_COND): Move to c-common.h. 2991169689Skan (THEN_CLAUSE): Likewise. 2992169689Skan (ELSE_CLAUSE): Likewise. 2993169689Skan (WHILE_COND): Likewise. 2994169689Skan (WHILE_BODY): Likewise. 2995169689Skan (DO_COND): Likewise. 2996169689Skan (DO_BODY): Likewise. 2997169689Skan (RETURN_EXPR): Likewise. 2998169689Skan (EXPR_STMT_EXPR): Likewise. 2999169689Skan (FOR_INIT_STMT): Likewise. 3000169689Skan (FOR_COND): Likewise. 3001169689Skan (FOR_EXPR): Likewise. 3002169689Skan (FOR_BODY): Likewise. 3003169689Skan (SWITCH_COND): Likewise. 3004169689Skan (SWITCH_BODY): Likewise. 3005169689Skan (CASE_LOW): Likewise. 3006169689Skan (CASE_HIGH): Likewise. 3007169689Skan (GOTO_DESTINATION): Likewise. 3008169689Skan (COMPOUND_BODY): Likewise. 3009169689Skan (ASM_CV_QUAL): Likewise. 3010169689Skan (ASM_STRING): Likewise. 3011169689Skan (ASM_OUTPUTS): Likewise. 3012169689Skan (ASM_INPUTS): Likewise. 3013169689Skan (ASM_CLOBBERS): Likewise. 3014169689Skan (DECL_STMT_DECL): Likewise. 3015169689Skan (STMT_EXPR_STMT): Likewise. 3016169689Skan (LABEL_STMT_LABEL): Likewise. 3017169689Skan (SCOPE_BEGIN_P): Likewise. 3018169689Skan (SCOPE_END_P): Likewise. 3019169689Skan (SCOPE_STMT_BLOCK): Likewise. 3020169689Skan (SCOPE_NULLIFIED_P): Likewise. 3021169689Skan (SCOPE_NO_CLEANUPS_P): Likewise. 3022169689Skan (SCOPE_PARTIAL_P): Likewise. 3023169689Skan (ASM_VOLATILE_P): Likewise. 3024169689Skan (STMT_LINENO): Likewise. 3025169689Skan (STMT_LINENO_FOR_FN_P): Likewise. 3026169689Skan 3027169689Skan * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR, 3028169689Skan ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT, 3029169689Skan FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT, 3030169689Skan CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT, 3031169689Skan SCOPE_STMT, CASE_LABEL, STMT_EXPR. 3032169689Skan 3033169689Skan * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def. 3034169689Skan 3035169689Skan * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def. 3036169689Skan (cc1plus$(exeext)): Added $(srcdir)/c-common.def. 3037169689Skan 3038169689Skan * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'. 3039169689Skan (cplus_tree_code_length[]): Added '#include "c-common.def"'. 3040169689Skan (cplus_tree_code_name[]): Added '#include "c-common.def"'. 3041169689Skan 3042169689Skan2000-06-14 Mark Mitchell <mark@codesourcery.com> 3043169689Skan 3044169689Skan * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro. 3045169689Skan * class.c (dfs_find_final_overrider): Set it appropriately. 3046169689Skan (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to 3047169689Skan avoid unneeded secondary vptrs. 3048169689Skan 3049169689Skan2000-06-13 Jakub Jelinek <jakub@redhat.com> 3050169689Skan 3051169689Skan * class.c (build_secondary_vtable): Set DECL_USER_ALIGN. 3052169689Skan (check_bitfield_decl, check_field_decl): Likewise. 3053169689Skan (build_vtbl_or_vbase_field, build_base_field): Likewise. 3054169689Skan (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN. 3055169689Skan * decl.c (record_unknown_type): Set TYPE_USER_ALIGN. 3056169689Skan (xfer_tag, finish_enum): Likewise. 3057169689Skan * decl2.c (finish_builtin_type): Likewise. 3058169689Skan * init.c (init_init_processing): Likewise. 3059169689Skan * pt.c (instantiate_class_template): Likewise. 3060169689Skan * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN. 3061169689Skan * cp-tree.h (struct lang_type): Add user_align member. 3062169689Skan (CLASSTYPE_USER_ALIGN): Define. 3063169689Skan 3064169689Skan2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl> 3065169689Skan 3066169689Skan * Make-lang.in (c++.install-common): Install g++-cross in 3067169689Skan $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as 3068169689Skan $(target_alias)-g++ and $(target_alias)-c++. 3069169689Skan 3070169689Skan2000-06-12 Mark Mitchell <mark@codesourcery.com> 3071169689Skan 3072169689Skan * class.c (vcall_offset_data_s): Add last_init and fns. 3073169689Skan (overrides): Rename to same_signature_p. 3074169689Skan (dfs_find_final_overrider): Adjust accordingly. 3075169689Skan (mark_overriders): Likewise. 3076169689Skan (warn_hidden): Likewise. 3077169689Skan (build_vtbl_initializer): Reorganize machinery for building things 3078169689Skan at negative offsets. 3079169689Skan (build_vcall_and_vbase_vtbl_entries): Likewise. 3080169689Skan (build_vbase_offset_vtbl_entries): Likewise. 3081169689Skan (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall 3082169689Skan offset entries. Do not create two entries for functions with the 3083169689Skan same signature. 3084169689Skan (build_vcall_offset_vtbl_entries): Initialize vod->fns. 3085169689Skan (build_rtti_vtbl_entries): Reorganize machinery for building things 3086169689Skan at negative offsets. 3087169689Skan 3088169689Skan * optimize.c (expand_call_inline): Don't recurse into the code 3089169689Skan used to initialize the parameters more than once. 3090169689Skan 3091169689Skan2000-06-11 Mark Mitchell <mark@codesourcery.com> 3092169689Skan 3093169689Skan * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment. 3094169689Skan (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here. 3095169689Skan (find_substitution): Only use the `Sa' substitution for 3096169689Skan std::allocator, not instantiations of it. 3097169689Skan (write_template_prefix): Move comment. Only use a TREE_LIST to 3098169689Skan represent substitutions for a member template. 3099169689Skan (write_array_type): Mangle array dimensions correctly. 3100169689Skan * optimize.c (maybe_clone_body): Copy more information from the 3101169689Skan cloned function. 3102169689Skan * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE 3103169689Skan on the regenerated declaration. 3104169689Skan 3105169689Skan2000-06-11 Chip Salzenberg <chip@valinux.com> 3106169689Skan Mark Mitchell <mark@codesourcery.com> 3107169689Skan 3108169689Skan * class.c (build_vtable): Clarify comment. 3109169689Skan (build_ctor_vtbl_group): Pass the most derived type to 3110169689Skan build_vtable. 3111169689Skan 3112169689Skan2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3113169689Skan 3114169689Skan * decl2.c (compare_options): Don't needlessly cast away const-ness. 3115169689Skan 3116169689Skan2000-06-10 Mark Mitchell <mark@codesourcery.com> 3117169689Skan 3118169689Skan * decl.c (add_binding): Handle duplicate declarations of external 3119169689Skan variables. 3120169689Skan 3121169689Skan2000-06-09 Chip Salzenberg <chip@valinux.com> 3122169689Skan Mark Mitchell <mark@codesourcery.com> 3123169689Skan 3124169689Skan * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an 3125169689Skan argument. 3126169689Skan (write_signed_number): New macro. 3127169689Skan (write_unsigned_number): Likewise. 3128169689Skan (write_source_name): Use them. 3129169689Skan (write_number): Handle signed and unsigned values. 3130169689Skan (write_integer_cst): Use tree_int_cst_sgn, and use 3131169689Skan write_unsigned_number or write_signed_number as appropriate. 3132169689Skan (write_discriminator): Use write_unsigned_number or 3133169689Skan write_signed_number as appropriate. 3134169689Skan (write_template_arg_literal): Likewise. 3135169689Skan (write_array_type): Use tree_low_cst. 3136169689Skan (write_template_parm): Use write_unsigned_number or 3137169689Skan write_signed_number as appropriate. 3138169689Skan (write_substitution): Adjust call to write_number. 3139169689Skan (write_type): Get the TYPE_MAIN_VARIANT before mangling it. 3140169689Skan (write_expression): Handle non-type template arguments of 3141169689Skan reference type correctly. 3142169689Skan (mangle_thunk): Use write_signed_number. 3143169689Skan 3144169689Skan2000-06-09 Chip Salzenberg <chip@valinux.com> 3145169689Skan 3146169689Skan * mangle.c (find_substition): Don't mangle objects with typename 3147169689Skan substitutions (e.g. "cin" as "Si"). 3148169689Skan 3149169689Skan2000-06-09 Zack Weinberg <zack@wolery.cumb.org> 3150169689Skan 3151169689Skan * call.c (add_candidate): Use ggc_alloc_cleared. 3152169689Skan * decl.c (lookup_label): Likewise. 3153169689Skan * lex.c (retrofit_lang_decl): Likewise. 3154169689Skan 3155169689Skan2000-06-09 Jason Merrill <jason@casey.soma.redhat.com> 3156169689Skan 3157169689Skan * semantics.c (expand_body): Push to TV_EXPAND. 3158169689Skan * optimize.c (optimize_function): Push to TV_INTEGRATION. 3159169689Skan * decl.c (start_function): Always call announce_function. 3160169689Skan 3161169689Skan * tinfo2.cc: Just declare abort. 3162169689Skan 3163169689Skan2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com> 3164169689Skan 3165169689Skan * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @' 3166169689Skan whenever @ is a symbolic name. 3167169689Skan 3168169689Skan2000-06-08 Jakub Jelinek <jakub@redhat.com> 3169169689Skan 3170169689Skan * method.c (make_thunk): Clear DECL_VTT_PARM in thunk. 3171169689Skan 3172169689Skan2000-06-07 Mark Mitchell <mark@codesourcery.com> 3173169689Skan 3174169689Skan * decl.c (pushdecl): Look up functions by DECL_NAME, not 3175169689Skan DECL_ASSEMBLER_NAME. 3176169689Skan 3177169689Skan2000-06-06 Mark Mitchell <mark@codesourcery.com> 3178169689Skan 3179169689Skan * decl2.c (c_language): Define. 3180169689Skan 3181169689Skan2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com> 3182169689Skan 3183169689Skan * lex.c (lang_init_options): Tweak. 3184169689Skan 3185169689Skan * decl2.c: Remove #inclusion of diagnostic.h 3186169689Skan (lang_decode_option): Move diagnostic formatting options to 3187169689Skan toplevel. 3188169689Skan 3189169689Skan * lang-options.h: Remove documentation for diagnostic options. 3190169689Skan 3191169689Skan * Makefile.in (lex.o): Depends upon diagnostic.h 3192169689Skan 3193169689Skan2000-06-06 Mark Mitchell <mark@codesourcery.com> 3194169689Skan 3195169689Skan * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have 3196169689Skan the same DECL_RESULT, it's not a redefinition. 3197169689Skan * pt.c (tsubst_decl): Remove code to handle illegal 3198169689Skan specializations. 3199169689Skan 3200169689Skan2000-06-06 Nathan Sidwell <nathan@codesourcery.com> 3201169689Skan 3202169689Skan * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c 3203169689Skan 3204169689Skan2000-06-05 Jason Merrill <jason@casey.soma.redhat.com> 3205169689Skan 3206169689Skan * search.c (maybe_suppress_debug_info): Don't check 3207169689Skan CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set. 3208169689Skan 3209169689Skan * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION 3210169689Skan here if extern_p. 3211169689Skan 3212169689Skan Remember instantiation context in deferred instantiations. 3213169689Skan * cp-tree.h (struct tinst_level): Remove. 3214169689Skan (TINST_DECL, TINST_LINE, TINST_FILE): New macros. 3215169689Skan * pt.c (current_tinst_level): Now a tree. 3216169689Skan (print_template_context, push_tinst_level, pop_tinst_level, 3217169689Skan tinst_for_decl): Adjust. 3218169689Skan (reopen_tinst_level): New fn. 3219169689Skan (init_pt): Register current_tinst_level as a root. 3220169689Skan (add_pending_template): Put current_tinst_level in TREE_PURPOSE 3221169689Skan of the pending templates list. 3222169689Skan (instantiate_pending_templates): Adjust. Call reopen_tinst_level. 3223169689Skan * lex.c (extract_interface_info): Adjust. 3224169689Skan * decl2.c (warn_if_unknown_interface): Adjust. 3225169689Skan 3226169689Skan2000-06-05 Mark Mitchell <mark@codesourcery.com> 3227169689Skan 3228169689Skan * class.c (indirect_primary_base_p): New function. 3229169689Skan (determine_primary_base): Use it. 3230169689Skan 3231169689Skan2000-06-05 Nathan Sidwell <nathan@codesourcery.com> 3232169689Skan 3233169689Skan Update new-abi dynamic cast algorithm. 3234169689Skan * tinfo.cc (__class_type_info::__dyncast_result): Add 3235169689Skan whole_details. Adjust constructor. 3236169689Skan (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags. 3237169689Skan Avoid unnecessary searching. 3238169689Skan (__dynamic_cast): Adjust for __dyncast_result::whole_details. 3239169689Skan 3240169689Skan2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 3241169689Skan 3242169689Skan * decl.c (init_decl_processing): Don't call record_component_aliases. 3243169689Skan * tree.c (build_cplus_array_type_1): Likewise. 3244169689Skan 3245169689Skan2000-06-04 Mark Mitchell <mark@codesourcery.com> 3246169689Skan 3247169689Skan * ir.texi: Correct typo. 3248169689Skan * mangle.c (write_expression): Handle non-type template arguments 3249169689Skan with reference type. 3250169689Skan * method.c (build_overload_value): Likewise. 3251169689Skan * pt.c (convert_nontype_argument): Explicitly represent conversion 3252169689Skan to a reference with an ADDR_EXPR. 3253169689Skan (unify): Always unify arguments in left-to-right order. 3254169689Skan 3255169689Skan2000-06-03 Alex Samuel <samuel@codesourcery.com> 3256169689Skan Mark Mitchell <mark@codesourcery.com> 3257169689Skan 3258169689Skan * Make-lang.in (CXX_SRCS): Add mangle.c. 3259169689Skan * Makefile.in (CXX_OBJS): Add mangle.o. 3260169689Skan (mangle.o): New rule. 3261169689Skan 3262169689Skan * class.c (local_classes): New variable. 3263169689Skan * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI. 3264169689Skan (get_vtt_name): Use mangle_vtt_name for new ABI. 3265169689Skan (init_class_processing): Initialize local_classes. 3266169689Skan (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI. 3267169689Skan * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER. 3268169689Skan (std_identifier): New macro. 3269169689Skan (DECL_VOLATILE_MEMFUNC_P): New macro. 3270169689Skan (DECL_NAMESPACE_STD_P): Likewise. 3271169689Skan (local_classes): Declare. 3272169689Skan (get_mostly_instantiated_function_type): Declare. 3273169689Skan (init_mangle): Declare. 3274169689Skan (mangle_decl): Likewise. 3275169689Skan (mangle_type_string): Likewise. 3276169689Skan (mangle_type): Likewise. 3277169689Skan (mangle_typeinfo_for_type): Likewise. 3278169689Skan (mangle_typeinfo_string_for_type): Likewise. 3279169689Skan (mangle_vtbl_for_type): Likewise. 3280169689Skan (mangle_vtt_for_type): Likewise. 3281169689Skan (mangle_ctor_vtbl_for_type): Likewise. 3282169689Skan (mangle_thunk): Likewise. 3283169689Skan (mangle_conv_op_name_for_type): Likewise. 3284169689Skan (mangle_guard_variable): Likewise. 3285169689Skan * decl.c (pushtag): Keep track of local classes. 3286169689Skan (initialize_predefined_identifiers): Initialize std_identifier. 3287169689Skan (init_decl_processing): Use std_identifier. 3288169689Skan (start_decl): Don't treat instantiations as specializations. 3289169689Skan (grokdeclarator): Likewise. 3290169689Skan (grokvardecl): Call mangle_decl for new ABI. Only set mangled 3291169689Skan name for fully-instantiated templates. 3292169689Skan * decl2.c (grokclassfn): Use set_mangled_name_for_decl for 3293169689Skan destructors with the new ABI. 3294169689Skan (finish_static_data_member_decl): Use mangle_decl under the new ABI. 3295169689Skan (grokfield): Use mangle_type for new ABI. 3296169689Skan (grokoptypename): Use mangle_conv_op_for_type for new ABI. 3297169689Skan (get_sentry): Use mangle_guard_variable for new ABI. 3298169689Skan (start_static_initialization_or_destruction): Likewise. 3299169689Skan * expr.c (extract_aggr_init): Remove. 3300169689Skan (extract_scalar_init): Likewise. 3301169689Skan (extract_init): Remove #if 0'd code. 3302169689Skan * mangle.c: New function. 3303169689Skan * method.c (build_mangled_name): Assert not flag_new_abi. 3304169689Skan (build_static_name): Likewise. 3305169689Skan (build_decl_overload_real): Likewise. 3306169689Skan (build_typename_overload): Likewise. 3307169689Skan (build_overload_with_type): Likewise. 3308169689Skan (build_overload_name): Likewise. 3309169689Skan (get_ctor_vtbl_name): Likewise. 3310169689Skan (start_squangling): Likewise. 3311169689Skan (get_id_2): Likewise. 3312169689Skan (set_mangled_name_for_decl): Call mangle_decl for new ABI. 3313169689Skan (init_method): Call init_mangle for new ABI. 3314169689Skan (make_thunk): Call mangle_thunk for new ABI. 3315169689Skan * operators.def: Correct new ABI manglings for the `%' operator. 3316169689Skan Add `::' operator. 3317169689Skan * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and 3318169689Skan DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL. 3319169689Skan (lookup_template_class): Call mangle_decl for new ABI. 3320169689Skan (get_mostly_instantiated_function_type): New function. 3321169689Skan (set_mangled_name_for_template_decl): Use it. 3322169689Skan (tsubst_decl): Use set_mangled_name_for_decl for destructors with 3323169689Skan the new ABI. Use mangle_conv_op_name_for_type for instantiated 3324169689Skan conversion op names. 3325169689Skan * rtti.c (tinfo_name): Call mangle_type_string for new ABI. 3326169689Skan (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI. 3327169689Skan (tinfo_base_init): Likewise. Mangle typeinfo string name with 3328169689Skan mangle_typeinfo_string_for_type. 3329169689Skan 3330169689Skan2000-06-03 Mark Mitchell <mark@codesourcery.com> 3331169689Skan 3332169689Skan * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment. 3333169689Skan (INNERMOST_TEMPLATE_ARGS): New macro. 3334169689Skan (innermost_args): Remove. 3335169689Skan (get_innermost_template_args): New function. 3336169689Skan * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS. 3337169689Skan * error.c (dump_function_decl): Be caution when using 3338169689Skan most_general_template. 3339169689Skan * method.c (build_template_parm_names): Use 3340169689Skan INNERMOST_TEMPLATE_ARGS. 3341169689Skan * pt.c (add_to_template_args): Tidy comment 3342169689Skan (get_innermost_template_args): New function. 3343169689Skan (check_explicit_specialization): Clear DECL_INITIAL for a new 3344169689Skan specialization. 3345169689Skan (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS. 3346169689Skan Tidy. 3347169689Skan (push_template_decl): Always register specializations of the most 3348169689Skan general template. 3349169689Skan (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS. 3350169689Skan (coerce_template_parms): Likewise. 3351169689Skan (lookup_template_class): Likewise. 3352169689Skan (innermost_args): Remove. 3353169689Skan (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS. 3354169689Skan (tsubst_decl): Handle tricky specializations. Use 3355169689Skan get_innermost_template_args. 3356169689Skan (instantiate_template): Simplify handling of partial 3357169689Skan instantiations. 3358169689Skan (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS. 3359169689Skan (most_general_template): Reimplement, in a more straightforward 3360169689Skan manner. 3361169689Skan (regenerate_decl_from_template): Tweak formatting. Use 3362169689Skan TMPL_ARGS_DEPTH for clarity. 3363169689Skan (set_mangled_name_for_template_decl): Use INNERMOST_ARGS. 3364169689Skan 3365169689Skan * dump.c (dequeue_and_dump): Dump information about thunks. 3366169689Skan 3367169689Skan2000-06-01 Richard Henderson <rth@cygnus.com> 3368169689Skan 3369169689Skan * decl.c (init_decl_processing): Set lang_get_alias_set first thing. 3370169689Skan 3371169689Skan2000-06-01 Richard Henderson <rth@cygnus.com> 3372169689Skan 3373169689Skan * decl2.c (unsupported_options): Fix typo, make const. 3374169689Skan (lang_decode_option): Fix bsearch argument order. 3375169689Skan 3376169689Skan2000-06-01 Mark Mitchell <mark@codesourcery.com> 3377169689Skan 3378169689Skan * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE 3379169689Skan on FIELD_DECLs. 3380169689Skan 3381169689Skan2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 3382169689Skan 3383169689Skan * cp-tree.h (c_get_alias_set): Deleted. 3384169689Skan * Makefile.in (decl.o): Include ../expr.h. 3385169689Skan * decl.c (expr.h): Include. 3386169689Skan (init_decl_processing): Call record_component_aliases for arrays. 3387169689Skan (grokdeclarator): Likewise. 3388169689Skan Set TREE_ADDRESSABLE for fields that aren't bitfields. 3389169689Skan * tree.c (build_cplus_array_type_1): Call record_component_aliases. 3390169689Skan 3391169689Skan2000-05-31 Mark Mitchell <mark@codesourcery.com> 3392169689Skan 3393169689Skan Remove guiding declaration support. 3394169689Skan * cp/cp-tree.h (flag_dump_translation_unit): Make it const. 3395169689Skan (flag_guiding_decls): Remove. 3396169689Skan * call.c (build_user_type_conversion_1): Remove support for 3397169689Skan guiding decls. 3398169689Skan (build_new_function_call): Likewise. 3399169689Skan (build_new_op): Likewise. 3400169689Skan (build_new_method_call): Likewise. 3401169689Skan * decl.c (start_function): Likewise. 3402169689Skan * friend.c (is_friend): Likewise. 3403169689Skan (do_friend): Likewise. 3404169689Skan * decl2.c ((flag_dump_translation_unit): Make it const. 3405169689Skan (flag_guiding_decls): Remove. 3406169689Skan (unsupported_options): New variable 3407169689Skan (compare_options): New function. 3408169689Skan (lang_decode_option): Use them. 3409169689Skan 3410169689Skan * decl.c (build_cp_library_fn): Set DECL_CONTEXT. 3411169689Skan 3412169689Skan * method.c (mangle_expression): Adjust test for legal expression 3413169689Skan operators. 3414169689Skan 3415169689Skan * pt.c (instantiate_decl): Save and restore the local 3416169689Skan specializations list. 3417169689Skan 3418169689Skan2000-05-30 Jason Merrill <jason@decepticon.cygnus.com> 3419169689Skan 3420169689Skan * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING. 3421169689Skan 3422169689Skan2000-05-30 Mark Mitchell <mark@codesourcery.com> 3423169689Skan 3424169689Skan * call.c (add_template_candidate_real): Handle member template 3425169689Skan constructors for classes with virtual bases. 3426169689Skan (build_user_type_conversion_1): Use in_charge_arg_for_name. 3427169689Skan (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P. 3428169689Skan 3429169689Skan * ir.texi: Update thunk documentation. 3430169689Skan 3431169689Skan * call.c (joust): Fix handling of overloaded builtin operators. 3432169689Skan 3433169689Skan2000-05-30 Zack Weinberg <zack@wolery.cumb.org> 3434169689Skan 3435169689Skan * cp-tree.h (DECL_ANTICIPATED): New macro. 3436169689Skan Document new use of DECL_LANG_FLAG_7. 3437169689Skan * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins 3438169689Skan in the user namespace. 3439169689Skan * lex.c (do_identifier): If the identifier's declaration has 3440169689Skan DECL_ANTICIPATED on, it has not yet been declared. But do not 3441169689Skan replace it with an ordinary implicit declaration. 3442169689Skan 3443169689Skan * tinfo2.cc: Include stdlib.h. 3444169689Skan 3445169689Skan2000-05-29 Mark Mitchell <mark@codesourcery.com> 3446169689Skan 3447169689Skan * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro. 3448169689Skan * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not 3449169689Skan CLASSTYPE_ALIGN. 3450169689Skan 3451169689Skan2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com> 3452169689Skan 3453169689Skan * decl2.c (lang_decode_option): Use skip_leading_substring instead 3454169689Skan of plain strncmp. 3455169689Skan 3456169689Skan2000-05-28 Alexandre Oliva <aoliva@cygnus.com> 3457169689Skan 3458169689Skan * operators.def (<?): Duplicated, should have been... 3459169689Skan (>?): this. Fixed. 3460169689Skan 3461169689Skan2000-05-27 Alex Samuel <samuel@codesourcery.com> 3462169689Skan Mark Mitchell <mark@codesourcery.com> 3463169689Skan 3464169689Skan * cp-tree.h (ansi_opname): Make it a macro. 3465169689Skan (ansi_assopname): Likewise. 3466169689Skan (struct lang_decl_flags): Add assignment_operator_p. 3467169689Skan (struct lang_decl): Add operator_code. 3468169689Skan (DECL_VTT_PARM): Adjust. 3469169689Skan (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an 3470169689Skan overloaded operator. 3471169689Skan (SET_OVERLOADED_OPERATOR_CODE): New macro. 3472169689Skan (DECL_ASSIGNMENT_OPERATOR_P): New macro. 3473169689Skan (DECL_ARRAY_DELETE_OPERATOR_P): Adjust. 3474169689Skan (opname_tab): Remove. 3475169689Skan (assignop_tab): Likewise. 3476169689Skan (operator_name_info_t): New type. 3477169689Skan (operator_name_info): New variable. 3478169689Skan (assignment_operator_name_info): Likewise. 3479169689Skan (build_cp_library_fn): Remove declaration. 3480169689Skan (push_cp_library_fn): Likewise. 3481169689Skan (operator_name_string): Likewise. 3482169689Skan (build_decl_overload): Likewise. 3483169689Skan * call.c (print_z_candidates): Simplify. 3484169689Skan (build_object_call): Adjust usage of ansi_opname. Use 3485169689Skan DECL_OVERLOADED_OPERATOR_P. 3486169689Skan (op_error): Adjust operator name lookup. 3487169689Skan (build_conditional_expr): Adjust usage of ansi_opname. 3488169689Skan (build_new_op): Likewise. 3489169689Skan (build_op_delete_call): Likewise. 3490169689Skan (build_over_call): Likewise. 3491169689Skan (joust): Use DECL_OVERLOADED_OPERATOR_P. 3492169689Skan * decl.c (duplicate_decls): Copy operator_code. 3493169689Skan (init_decl_processing): Adjust parameters to push_cp_library_fn. 3494169689Skan (builtin_function): Adjust parameters to build_library_fn_1. 3495169689Skan (build_library_fn_1): Accept an overloaded operator code. 3496169689Skan (build_library_fn): Pass ERROR_MARK. 3497169689Skan (build_cp_library_fn): Accept an overloaded operator code. 3498169689Skan (push_cp_library_fn): Likewise. 3499169689Skan (grokfndecl): Tweak. 3500169689Skan (grokdeclarator): Simplify code to compute names of overloaded 3501169689Skan operators. Adjust use of ansi_opname. 3502169689Skan (ambi_op_p): Work on tree_codes, not identifiers. 3503169689Skan (unary_op_p): Likewise. 3504169689Skan (grok_op_properties): Likewise. 3505169689Skan (start_function): Use DECL_OVERLOADED_OPERATOR_P. 3506169689Skan (lang_mark_tree): Don't try to mark the operator_code. 3507169689Skan * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P. 3508169689Skan * error.c (dump_decl): Remove special handling for operator 3509169689Skan names. 3510169689Skan (dump_function_name): Likewise. 3511169689Skan (dump_expr): Adjust name lookup of operators. 3512169689Skan (op_to_string): Simplify. 3513169689Skan (assop_to_string): Likewise. 3514169689Skan * init.c (build_new_1): Adjust use of ansi_opname. 3515169689Skan * lex.c (opname_tab): Remove. 3516169689Skan (assignop_tab): Likewise. 3517169689Skan (ansi_opname): Likewise. 3518169689Skan (ansi_assopname): Likewise. 3519169689Skan (operator_name_string): Likewise. 3520169689Skan (reinit_lang_specific): Likewise. 3521169689Skan (operator_name_info): New variable. 3522169689Skan (assignment_operator_name_info): Likewise. 3523169689Skan (init_operators): New function. 3524169689Skan (init_parse): Use it. 3525169689Skan (do_identifier): Adjust use of ansi_opname. 3526169689Skan * method.c (mangle_expression): Don't use ansi_opname for 3527169689Skan mangling. 3528169689Skan (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P. 3529169689Skan (build_decl_overload): Remove. 3530169689Skan (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly. 3531169689Skan (do_build_assign_ref): Adjust use of ansi_opname. 3532169689Skan (synthesize_method): Likewise. 3533169689Skan (implicitly_declare_fn): Likewise. 3534169689Skan * operators.def: New file. 3535169689Skan * parse.y (operator): Adjust use of ansi_opname. 3536169689Skan * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P. 3537169689Skan (set_mangled_name_for_template_decl): Don't play games with 3538169689Skan current_namespace. 3539169689Skan (special_function_p): Adjust use of ansi_opname. 3540169689Skan * typeck.c (check_return_expr): Likewise. 3541169689Skan * Make-lang.in (cc1plus): Depend on operators.def. 3542169689Skan * Makefile.in (lex.o): Likewise. 3543169689Skan (decl.o): Likewise. 3544169689Skan 3545169689Skan2000-05-27 Zack Weinberg <zack@wolery.cumb.org> 3546169689Skan 3547169689Skan * Make-lang.in (cplib2.ready): Eradicate. 3548169689Skan 3549169689Skan2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 3550169689Skan 3551169689Skan * method.c (mangle_expression): Use TREE_CODE_LENGTH. 3552169689Skan * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH. 3553169689Skan (built_min, cp_tree_equal): Likewise. 3554169689Skan 3555169689Skan2000-05-26 Mark Mitchell <mark@codesourcery.com> 3556169689Skan 3557169689Skan * class.c (layout_nonempty_base_or_field): Replace 3558169689Skan `record_layout_info' with `record_layout_info_s'. 3559169689Skan 3560169689Skan2000-05-26 Jason Merrill <jason@casey.soma.redhat.com> 3561169689Skan 3562169689Skan Fix goto checking. 3563169689Skan * cp-tree.h (struct language_function): x_named_labels is now 3564169689Skan a struct named_label_list*. 3565169689Skan * decl.c (struct named_label_use_list): Renamed from... 3566169689Skan (struct named_label_list): ...this. New struct. 3567169689Skan (push_binding_level): Don't set eh_region. 3568169689Skan (note_level_for_eh): New fn. 3569169689Skan (pop_label): Take label and old value directly. 3570169689Skan (pop_labels): Adjust for new named_labels format. 3571169689Skan (lookup_label): Likewise. 3572169689Skan (poplevel): Note characteristics of a binding level containing a 3573169689Skan named label. Mess with named label lists earlier. 3574169689Skan (mark_named_label_lists): New fn. 3575169689Skan (mark_lang_function): Call it. 3576169689Skan (use_label): New fn, split out from... 3577169689Skan (make_label_decl): ...here. Don't call it. 3578169689Skan (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, 3579169689Skan check_previous_gotos): New fns, split out from... 3580169689Skan (define_label): ...here. 3581169689Skan (check_switch_goto): New fn. 3582169689Skan (define_case_label): Call it. 3583169689Skan (check_goto): New fn. 3584169689Skan * semantics.c (finish_goto_stmt): Call it and use_label. 3585169689Skan (begin_compound_stmt): If we're a try block, call note_level_for_eh. 3586169689Skan (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings. 3587169689Skan 3588169689Skan2000-05-26 Mark Mitchell <mark@codesourcery.com> 3589169689Skan 3590169689Skan * class.c (build_vtable_entry_ref): Correct usage of 3591169689Skan get_vtbl_decl_for_binfo. 3592169689Skan 3593169689Skan * decl2.c (grokclassfn): Set DECL_LANGUAGE here. 3594169689Skan * method.c (implicitly_declare_fn): Not here. 3595169689Skan 3596169689Skan2000-05-26 Nathan Sidwell <nathan@codesourcery.com> 3597169689Skan 3598169689Skan * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ... 3599169689Skan (CPTI_PTMD_DESC_TYPE): ... here. 3600169689Skan (ptmd_desc_type_node): Rename to ... 3601169689Skan (ptm_desc_type_node): ... here. 3602169689Skan * decl.c: Likewise. 3603169689Skan * rtti.c (ptmd_initializer): Rename to ... 3604169689Skan (ptm_initializer): ... here. 3605169689Skan (sythesize_tinfo_var): Adjust. Deal with pointer to member 3606169689Skan function. 3607169689Skan (create_tinfo_types): Adjust. 3608169689Skan 3609169689Skan2000-05-25 Mark Mitchell <mark@codesourcery.com> 3610169689Skan 3611169689Skan Finish implementation of VTTs. 3612169689Skan * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and 3613169689Skan CPTI_VTT_PARM_IDENTIFIER. 3614169689Skan (vtt_parm_identifier): New macro. 3615169689Skan (vtt_parm_type): Likewise. 3616169689Skan (BINFO_SUBVTT_INDEX): Likewise. 3617169689Skan (BINFO_VPTR_INDEX): Likewise. 3618169689Skan (struct lang_decl): Add vtt_parm. 3619169689Skan (DECL_VTT_PARM): New macro. 3620169689Skan (DECL_USE_VTT_PARM): Likewise. 3621169689Skan (DECL_NEEDS_VTT_PARM_P): Likewise. 3622169689Skan (get_vtt_name): Declare. 3623169689Skan (build_artificial_parm): Likewise. 3624169689Skan (fixup_all_virtual_upcast_offsets): Likewise. 3625169689Skan (expand_indirect_vtbls_init): Remove. 3626169689Skan * call.c (build_new_method_call): Pass the vtt to subobject 3627169689Skan constructors and destructors. 3628169689Skan * class.c (get_vtt_name): Give it external linkage. 3629169689Skan (build_clone): Handle the magic VTT parameters for clones. 3630169689Skan (clone_function_decl): Fix typo in comment. 3631169689Skan (build_vtt): Keep track of the indices in the VTTs where various 3632169689Skan entities are stored. 3633169689Skan (build_vtt_inits): Likewise. 3634169689Skan (dfs_build_vtt_inits): Likewise. 3635169689Skan (build_ctor_vtbl_group): Tweak type of construction vtables. 3636169689Skan (dfs_accumulate_vtbl_inits): Build vtables for all bases, even 3637169689Skan primary bases, when building construction vtables. 3638169689Skan * decl.c (duplicate_decls): Handle DECL_VTT_PARM. 3639169689Skan (initialize_predefined_identifiers): Add vtt_parm_identifier. 3640169689Skan (init_decl_processing): Initialize vtt_parm_type. 3641169689Skan (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P. 3642169689Skan (lang_mark_tree): Make vtt_parm. 3643169689Skan * decl2.c (build_artificial_parm): New function. 3644169689Skan (maybe_retrofit_in_chrg): Use it. Add VTT parameters. 3645169689Skan (grokclassfn): Use build_artificial_parm. 3646169689Skan * init.c (initialize_vtbl_ptrs): Call 3647169689Skan fixup_all_virtual_upcast_offsets directly. 3648169689Skan (perform_member_init): Use the complete subobject destructor for 3649169689Skan member cleanups. 3650169689Skan (build_vtbl_address): New function. 3651169689Skan (expand_virtual_init): Handle VTTs. 3652169689Skan * optimize (maybe_clone_body): Likewise. 3653169689Skan * search.c (fixup_all_virtual_upcast_offsets): Give it external 3654169689Skan linkage. 3655169689Skan (expand_indirect_vtbls_init): Remove. 3656169689Skan * semantics.c (setup_vtbl_ptr): Fix typos in comment. 3657169689Skan * tree.c (make_binfo): Make them bigger. 3658169689Skan 3659169689Skan2000-05-25 Nathan Sidwell <nathan@codesourcery.com> 3660169689Skan 3661169689Skan * inc/cxxabi.h (__pbase_type_info): Define, based on 3662169689Skan __pointer_type_info. 3663169689Skan (__pointer_type_info): Derive from __pbase_type_info. Adjust. 3664169689Skan (__pointer_to_member_type_info): Likewise. 3665169689Skan * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement. 3666169689Skan (__pointer_to_member_type_info::__is_pointer_p): Remove. 3667169689Skan (__pointer_type_info::__do_catch): Rename to ... 3668169689Skan (__pbase_type_info::__do_catch): ... here. Adjust. 3669169689Skan (__pbase_type_info::__pointer_catch): Implement. 3670169689Skan (__pointer_type_info::__pointer_catch): Adjust. 3671169689Skan (__pointer_to_member_type_info::__pointer_catch): Adjust. 3672169689Skan 3673169689Skan2000-05-25 Nathan Sidwell <nathan@codesourcery.com> 3674169689Skan 3675169689Skan * tinfo.h (__user_type_info::contained_virtual_p): New 3676169689Skan predicate. 3677169689Skan * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond 3678169689Skan shaped hierarchy. 3679169689Skan (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to 3680169689Skan diamond shaped hierarchy. Add early out for mixed diamond and 3681169689Skan duplicate shaped hierarchy. 3682169689Skan 3683169689Skan2000-05-24 Mark Mitchell <mark@codesourcery.com> 3684169689Skan 3685169689Skan * cp-tree.h (build_delete): Change prototype. 3686169689Skan (build_vec_delete): Likewise. 3687169689Skan * call.c (build_scoped_method_call): Use special_function_kind 3688169689Skan values to indicate the kind of destruction to be done. 3689169689Skan (build_method_call): Likewise. 3690169689Skan * decl.c (finish_destructor_body): Likewise. 3691169689Skan (maybe_build_cleanup_1): Likewise. Rename to ... 3692169689Skan (maybe_build_cleanup): ... this. 3693169689Skan * decl2.c (delete_sanity): Use special_function_kind 3694169689Skan values to indicate the kind of destruction to be done. 3695169689Skan (build_cleanup): Likewise. 3696169689Skan * init.c (perform_member_init): Likewise. 3697169689Skan (build_vec_delete_1): Likewise. 3698169689Skan (build_dtor_call): Simplify. 3699169689Skan (build_delete): Use special_function_kind 3700169689Skan values to indicate the kind of destruction to be done. 3701169689Skan (build_vbase_delete): Likewise. 3702169689Skan (build_vec_delete): Likewise. 3703169689Skan 3704169689Skan * init.c (sort_member_init): Fix typo in error message generation 3705169689Skan code. 3706169689Skan 3707169689Skan2000-05-15 Donald Lindsay <dlindsay@cygnus.com> 3708169689Skan 3709169689Skan * semantics.c (begin_class_definition): make the packed 3710169689Skan attribute be sensitive to the "-fpack-struct" command line flag 3711169689Skan 3712169689Skan2000-05-24 Nathan Sidwell <nathan@codesourcery.com> 3713169689Skan 3714169689Skan Update new-abi upcast algorithm. 3715169689Skan * inc/cxxabi.h (__class_type_info::__do_upcast): Change 3716169689Skan prototype and meaning of return value. 3717169689Skan (__si_class_type_info::__do_upcast): Likewise. 3718169689Skan (__vmi_class_type_info::__do_upcast): Likewise. 3719169689Skan * tinfo.cc (__class_type_info::__upcast_result): Replace 3720169689Skan whole2dst with part2dst. Adjust ctor. 3721169689Skan (__class_type_info::__do_upcast): Adjust call of worker function. 3722169689Skan (__class_type_info::__do_upcast): Adjust. 3723169689Skan (__si_class_type_info::__do_upcast): Adjust. Use parent's 3724169689Skan __do_upcast. 3725169689Skan (__vmi_class_type_info::__do_upcast): Likewise. Fix private 3726169689Skan virtual base in diamond hierarchy bug. 3727169689Skan 3728169689Skan2000-05-23 Mark Mitchell <mark@codesourcery.com> 3729169689Skan 3730169689Skan * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable 3731169689Skan and bitfield to tinfo_fn_p. 3732169689Skan (DECL_TINFO_FN_P): Adjust. 3733169689Skan (SET_DECL_TINFO_FN_P): Likewise. 3734169689Skan (DECL_MUTABLE_P): Likewise. 3735169689Skan (DECL_C_BIT_FIELD): Likewise. 3736169689Skan (SET_DECL_C_BIT_FIELD): Likewise. 3737169689Skan (CLEAR_DECL_C_BIT_FIELD): Likewise. 3738169689Skan (DECL_UNINLINABLE): Likewise. 3739169689Skan * class.c (alter_access): Call retrofit_lang_decl if ncessary. 3740169689Skan (handle_using_decl): Remove assertion. 3741169689Skan (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl, 3742169689Skan to build FIELD_DECLs. 3743169689Skan (build_base_field): Likewise. 3744169689Skan (layout_class_type): Likewise. 3745169689Skan * decl.c (init_decl_processing): Likewise. 3746169689Skan (build_ptrmemfunc_type): Likewise. 3747169689Skan (grokdeclarator): Likewise. 3748169689Skan * decl2.c (grok_x_components): Likewise. 3749169689Skan * except.c (call_eh_info): Likewise. 3750169689Skan * init.c (init_init_processing): Likewise. 3751169689Skan * rtti.c (expand_class_desc): Likewise. 3752169689Skan (create_pseudo_type_info): Likewise. 3753169689Skan (get_vmi_pseudo_type_info): Likewise. 3754169689Skan (create_tinfo_types): Likewise. 3755169689Skan * ptree.c (print_lang_decl): Adjust. 3756169689Skan * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC 3757169689Skan before checking DECL_MUTABLE_P. 3758169689Skan 3759169689Skan * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge 3760169689Skan parameters for template functions. 3761169689Skan * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for 3762169689Skan destructors as well as constructors. 3763169689Skan 3764169689Skan2000-05-22 Mark Mitchell <mark@codesourcery.com> 3765169689Skan 3766169689Skan * class.c (build_ctor_vtbl_group): Set inits. 3767169689Skan * optimize.c (maybe_clone_body): Set DECL_INLINE and 3768169689Skan DECL_THIS_INLINE appropriately for clones. 3769169689Skan 3770169689Skan * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp. 3771169689Skan (DECL_CONV_FN_P): Simplify. 3772169689Skan (DECL_OPERATOR): Remove. 3773169689Skan (language_to_string): Declare. 3774169689Skan * decl.c (duplicate_decls): Fix typo in comment. 3775169689Skan (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P. 3776169689Skan (grok_op_properties): Use DECL_CONV_FN_P instead of 3777169689Skan IDENTIFIER_TYPENAME_P. 3778169689Skan * dump.c (dequeue_and_dump): Dump the language linkage of 3779169689Skan declarations. 3780169689Skan * error.c (language_to_string): Give it external linkage. 3781169689Skan * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P. 3782169689Skan (implicitly_declare_fn): Set DECL_LANGUAGE. 3783169689Skan * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not 3784169689Skan IDENTIFIER_TYPENAME_P. 3785169689Skan (tsubst_decl): Likewise. 3786169689Skan (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P. 3787169689Skan * semantics.c (finish_member_declaration): Don't mark members of 3788169689Skan classes declared in an extern "C" region as extern "C". 3789169689Skan 3790169689Skan2000-05-22 Martin v. L�wis <loewis@informatik.hu-berlin.de> 3791169689Skan 3792169689Skan * decl2.c (qualified_lookup_using_namespace): Look through 3793169689Skan namespace aliases. 3794169689Skan 3795169689Skan * decl.c (push_using_decl): Return the old decl on namespace level. 3796169689Skan 3797169689Skan2000-05-21 Mark Mitchell <mark@codesourcery.com> 3798169689Skan 3799169689Skan * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks. 3800169689Skan (VTT_NAME_PREFIX): New macro. 3801169689Skan (CTOR_VTBL_NAME_PREFIX): Likewise. 3802169689Skan (get_ctor_vtbl_name): New function. 3803169689Skan * class.c (get_vtable_name): Simplify. 3804169689Skan (get_vtt_name): New function. 3805169689Skan (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE. 3806169689Skan (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list 3807169689Skan when a virtual base becomes primary. 3808169689Skan (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build 3809169689Skan VTTs. 3810169689Skan (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in 3811169689Skan additional parameters. 3812169689Skan (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED. 3813169689Skan (initialize_array): New function. 3814169689Skan (build_vtt): Likewise. 3815169689Skan (build_vtt_inits): Likewise. 3816169689Skan (dfs_build_vtt_inits): Likewise. 3817169689Skan (dfs_fixup_binfo_vtbls): Likewise. 3818169689Skan (build_ctor_vtbl_group): Likewise. 3819169689Skan (initialize_vtable): Use initialize_array. 3820169689Skan (accumulate_vtbl_inits): Reimplement to handle construction 3821169689Skan vtables. 3822169689Skan (dfs_accumulate_vtbl_inits): Likewise. 3823169689Skan (bulid_vtbl_initializer): Adjust parameter name. 3824169689Skan * method.c (build_typename_overload): Remove #if 0'd code. 3825169689Skan (get_ctor_vtbl_name): New function. 3826169689Skan * search.c (dfs_walk_real): Use BINFO_N_BASETYPES. 3827169689Skan (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo. 3828169689Skan 3829169689Skan * cp-tree.h (struct lang_type): Remove search_slot. 3830169689Skan (CLASSTYPE_SEARCH_SLOT): Remove. 3831169689Skan (emit_base_init): Change prototype. 3832169689Skan (initialize_vtbl_ptrs): Likewise. 3833169689Skan (expand_indirect_vtbls_init): Likewise. 3834169689Skan (clear_search_slots): Remove. 3835169689Skan * decl.c (lang_mark_tree): Don't mark search_slot. 3836169689Skan * init.c (initialize_vtbl_ptrs): Simplify. 3837169689Skan (emit_base_init): Likewise. 3838169689Skan * search.c (struct vbase_info): Document decl_ptr. 3839169689Skan (convert_pointer_to_single_level): Remove. 3840169689Skan (dfs_find_vbases): Remove. 3841169689Skan (dfs_init_base_pointers): Simplify. 3842169689Skan (dfs_clear_vbase_slots): Remove. 3843169689Skan (dfs_vtable_path_unmark): New function. 3844169689Skan (init_vbase_pointers): Simplify. 3845169689Skan (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT. 3846169689Skan (expand_indirect_vtbls_init): Simplify. Don't call 3847169689Skan mark_all_temps_used. 3848169689Skan * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and 3849169689Skan initialize_vtbl_ptrs. 3850169689Skan 3851169689Skan2000-05-20 Zack Weinberg <zack@wolery.cumb.org> 3852169689Skan 3853169689Skan * except.c: Add static prototypes. 3854169689Skan 3855169689Skan2000-05-20 H.J. Lu <hjl@gnu.org> 3856169689Skan 3857169689Skan * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext). 3858169689Skan 3859169689Skan2000-05-19 Mark Mitchell <mark@codesourcery.com> 3860169689Skan 3861169689Skan Don't create a separate copy of virtual bases for the 3862169689Skan CLASSTYPE_VBASECLASSES list. 3863169689Skan * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation. 3864169689Skan (BINFO_FOR_VBASE): Remove. 3865169689Skan (CANONICAL_BINFO): Adjust. 3866169689Skan (binfo_for_vbase): New function. 3867169689Skan * class.c (build_vbase_pointer_fields): Use binfo_for_vbase 3868169689Skan instead of BINFO_FOR_VBASE. 3869169689Skan (build_vbase_pointer): Likewise. 3870169689Skan (build_secondary_vtable): Likewise. 3871169689Skan (dfs_mark_primary_bases): Likewise. 3872169689Skan (mark_primary_bases): Likewise. 3873169689Skan (layout_nonempty_base_or_field): Likewise. 3874169689Skan (dfs_set_offset_for_shared_vbases): Likewise. 3875169689Skan (dfs_set_offset_for_unshared_vbases): Likewise. 3876169689Skan (layout_virtual_bases): Likewise. Adjust for changes to the 3877169689Skan CLASSTYPE_VBASECLASSES list. 3878169689Skan (dump_class_hierarchy_r): Use binfo_for_vbase 3879169689Skan instead of BINFO_FOR_VBASE. 3880169689Skan (dump_class_hierarchy): Likewise. 3881169689Skan (finish_vtbls): Likewise. 3882169689Skan (build_vtbl_initializer): Adjust for changes to the 3883169689Skan CLASSTYPE_VBASECLASSES list. 3884169689Skan (build_vbase_offset_vtbl_entries): Use binfo_for_vbase. 3885169689Skan * decl.c (finish_destructor_body): Adjust for changes to the 3886169689Skan CLASSTYPE_VBASECLASSES list. 3887169689Skan * init.c (sort_base_init): Use binfo_for_vbase. 3888169689Skan (construct_virtual_bases): Adjust for changes to the 3889169689Skan CLASSTYPE_VBASECLASSES list. 3890169689Skan (expand_member_init): Use binfo_for_vbase. 3891169689Skan (build_vbase_delete): Adjust for changes to the 3892169689Skan CLASSTYPE_VBASECLASSES list. 3893169689Skan * method.c (do_build_copy_constructor): Likewise. 3894169689Skan * rtti.c (get_base_offset): Use binfo_for_vbase. 3895169689Skan (expand_class_desc): Remove #if 0'd code. 3896169689Skan * search.c (struct vbase_info): Remove vbase_types. 3897169689Skan (get_base_distance): Use binfo_for_vbase. 3898169689Skan (lookup_field_queue_p): Use CANONICAL_BINFO. 3899169689Skan (get_shared_vbase_if_not_primary): Use binfo_for_vbase. 3900169689Skan (get_pure_virtuals): Adjust for changes to the 3901169689Skan CLASSTYPE_VBASECLASSES list. 3902169689Skan (dfs_find_vbases): Use binfo_for_vbase. 3903169689Skan (dfs_init_vbase_pointers): Likewise. 3904169689Skan (init_vbase_pointers): Don't initialize vi.vbase_types. 3905169689Skan (virtual_context): Use binfo_for_vbase. 3906169689Skan (fixup_all_virtual_upcast_offsets): Adjust for changes to the 3907169689Skan CLASSTYPE_VBASECLASSES list. 3908169689Skan (expand_indirect_vtbls_init): Simplify. 3909169689Skan (dfs_get_vbase_types): Don't replicate virtual bases. 3910169689Skan (find_vbase_instance): Use binfo_for_vbase. 3911169689Skan (binfo_for_vbase): New function. 3912169689Skan * typeck.c (get_delta_difference): Use binfo_for_vbase. 3913169689Skan 3914169689Skan2000-05-17 Mark Mitchell <mark@codesourcery.com> 3915169689Skan 3916169689Skan * decl2.c (finish_anon_union): Generalize error messages to handle 3917169689Skan anonymous structures. 3918169689Skan * init.c (perform_member_init): Remove `name' parameter. 3919169689Skan (build_field_list): New function. 3920169689Skan (sort_member_init): Handle anonymous union initialization order 3921169689Skan correctly. Check for multiple initializations of the same union. 3922169689Skan (emit_base_init): Don't look up fields by name here. 3923169689Skan (expand_member_init): Record the result of name lookup for future 3924169689Skan reference. 3925169689Skan * typeck.c (build_component_ref): Fix formatting. 3926169689Skan 3927169689Skan2000-05-17 Andrew Cagney <cagney@b1.cygnus.com> 3928169689Skan 3929169689Skan * decl.c (pop_label): Replace warn_unused with warn_unused_label. 3930169689Skan * typeck.c (build_x_compound_expr): Replace warn_unused with 3931169689Skan warn_unused_value. 3932169689Skan 3933169689Skan * decl2.c (lang_decode_option): Update -Wall unused flags by 3934169689Skan calling set_Wunused. 3935169689Skan 3936169689Skan2000-05-16 Mark Mitchell <mark@codesourcery.com> 3937169689Skan 3938169689Skan * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation. 3939169689Skan * init.c (dfs_vtable_path_unmark): Remove. 3940169689Skan * search.c (marked_new_vtable_p): Likewise. 3941169689Skan (unmarked_new_vtable_p): Likewise. 3942169689Skan (dfs_search_slot_nonempty_p): Likewise. 3943169689Skan (dfs_mark): Likewise. 3944169689Skan (dfs_vtable_path_unmark): Likewise. 3945169689Skan (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED. 3946169689Skan (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED. 3947169689Skan (dfs_init_vbase_pointers): Remove special-case new ABI code. 3948169689Skan (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED. 3949169689Skan (init_vbase_pointers): Simplify. 3950169689Skan (expand_indirect_vtbls_init): Likewise. 3951169689Skan 3952169689Skan * class.c (copy_virtuals): New function. 3953169689Skan (build_primary_table): Use it. 3954169689Skan (build_secondary_vtable): Likewise. 3955169689Skan (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to 3956169689Skan indicate that no vcall offset is required. 3957169689Skan (add_virtual_function): Likewise. 3958169689Skan (modify_all_vtables): Likewise. 3959169689Skan (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. 3960169689Skan (dfs_accumulate_vtbl_inits): Likewise. 3961169689Skan (build_vtbl_initializer): Make changes to handle construction 3962169689Skan vtables. 3963169689Skan (dfs_build_vcall_offset_vtbl_entries): Likewise. 3964169689Skan (build_rtti_vtbl_entries): Likewise. 3965169689Skan (build_vtable_entries): Handle a NULL vcall_index. 3966169689Skan 3967169689Skan2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com> 3968169689Skan 3969169689Skan * decl2.c (lang_decode_option): Fix thinko. 3970169689Skan 3971169689Skan2000-05-14 Jason Merrill <jason@casey.cygnus.com> 3972169689Skan 3973169689Skan * except.c (check_handlers): New fn. 3974169689Skan * cp-tree.h: Declare it. 3975169689Skan * semantics.c (finish_handler_sequence): Call it. 3976169689Skan (finish_function_handler_sequence): Likewise. 3977169689Skan (finish_handler_parms): Set TREE_TYPE on the handler. 3978169689Skan * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro. 3979169689Skan * search.c (get_base_distance_recursive): If protect>1, ignore 3980169689Skan special access. 3981169689Skan (get_base_distance): Don't reduce watch_access. 3982169689Skan 3983169689Skan2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com> 3984169689Skan 3985169689Skan * lex.c: #include diagnostic.h. 3986169689Skan (lang_init_options): Set default prefixing rules. 3987169689Skan 3988169689Skan * lang-options.h: Add -fdiagnostics-show-location=. 3989169689Skan 3990169689Skan * decl2.c: #include diagnostic.h. 3991169689Skan (lang_decode_option): Handle -fdiagnostics-show-location=. 3992169689Skan 3993169689Skan2000-05-12 Nathan Sidwell <nathan@codesourcery.com> 3994169689Skan 3995169689Skan * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes. 3996169689Skan * vec.cc: Revert my 2000-05-07 change. 3997169689Skan 3998169689Skan2000-05-11 Jason Merrill <jason@casey.cygnus.com> 3999169689Skan 4000169689Skan * class.c (check_field_decls): Complain about non-static data 4001169689Skan members with same name as class in class with constructor. 4002169689Skan 4003169689Skan2000-05-10 Jason Merrill <jason@casey.cygnus.com> 4004169689Skan 4005169689Skan * decl.c (grokdeclarator): Allow non-static data members with 4006169689Skan same name as class. 4007169689Skan 4008169689Skan2000-05-09 Zack Weinberg <zack@wolery.cumb.org> 4009169689Skan 4010169689Skan * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, 4011169689Skan and pending_inline.filename. Update prototypes. 4012169689Skan * decl.c (define_label): Constify filename parameter. 4013169689Skan * decl2.c (warn_if_unknown_interface): Constify local char *. 4014169689Skan * input.c Constify input_source.filename. Don't declare 4015169689Skan input_filename or lineno. Constify filename parameter to feed_input. 4016169689Skan * lex.c (init_parse): Constify parameter and return value. 4017169689Skan (cp_pragma_interface, cp_pragma_implementation): Constify 4018169689Skan filename argument. 4019169689Skan (reinit_parse_for_method, reinit_parse_for_block, 4020169689Skan reinit_parse_for_expr, feed_defarg, handle_cp_pragma): 4021169689Skan Constify local char *. 4022169689Skan * pt.c: Don't declare lineno or input_filename. 4023169689Skan (print_template_context, tsubst_friend_function, tsubst_decl, 4024169689Skan tsubst, instantiate_decl): Constify local char *. 4025169689Skan * semantics.c (expand_body): Constify local char *. 4026169689Skan * tree.c (build_srcloc): Constify filename parameter. 4027169689Skan * typeck.c (c_expand_asm_operands): Constify filename 4028169689Skan parameter. 4029169689Skan 4030169689Skan2000-05-08 Nathan Sidwell <nathan@codesourcery.com> 4031169689Skan 4032169689Skan * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix 4033169689Skan offsetof expansion. 4034169689Skan 4035169689Skan2000-05-08 Branko Cibej <branko.cibej@hermes.si> 4036169689Skan 4037169689Skan * inc/cxxabi.h: Fix typos in comment. 4038169689Skan (__base_class_info::__offset): Use a static_cast. 4039169689Skan 4040169689Skan2000-05-07 Nathan Sidwell <nathan@codesourcery.com> 4041169689Skan 4042169689Skan * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place 4043169689Skan of std::size_t and std::ptrdiff_t respectively. 4044169689Skan * tinfo.cc: Likewise. 4045169689Skan * vec.cc: Likewise. 4046169689Skan 4047169689Skan2000-05-06 Richard Henderson <rth@cygnus.com> 4048169689Skan 4049169689Skan * typeck.c (build_c_cast): Don't warn integer->pointer size 4050169689Skan mismatch for constants. 4051169689Skan 4052169689Skan2000-05-06 Nathan Sidwell <nathan@codesourcery.com> 4053169689Skan 4054169689Skan * rtti.c (ptmd_initializer): Set non-public, if class is 4055169689Skan incomplete. 4056169689Skan 4057169689Skan * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++". 4058169689Skan (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 4059169689Skan __cxa_vec_delete): Likewise. 4060169689Skan * tinfo.cc (__dynamic_cast): Likewise. 4061169689Skan * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 4062169689Skan __cxa_vec_delete): Likewise. 4063169689Skan 4064169689Skan2000-05-04 Mark Mitchell <mark@codesourcery.com> 4065169689Skan 4066169689Skan * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove. 4067169689Skan (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise. 4068169689Skan (lang_decl_flags): Add vcall_offset. 4069169689Skan (THUNK_VCALL_OFFSET): Use it. 4070169689Skan * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk. 4071169689Skan * method.c (make_thunk): Create the lang_decl here, not in 4072169689Skan emit_thunk. 4073169689Skan (emit_thunk): Make generic thunks into ordinary functions once 4074169689Skan they have been fed to expand_body. 4075169689Skan * semantics.c (expand_body): Set current_function_is_thunk here. 4076169689Skan 4077169689Skan2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4078169689Skan 4079169689Skan * class.c (update_vtable_entry_for_fn): Prototype. 4080169689Skan 4081169689Skan * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl' 4082169689Skan and `tmpl'. 4083169689Skan 4084169689Skan * search.c (dfs_build_inheritance_graph_order): Prototype. 4085169689Skan 4086169689Skan2000-05-04 Mark Mitchell <mark@codesourcery.com> 4087169689Skan 4088169689Skan * cp-tree.h (special_function_kind): Add various kinds of 4089169689Skan destructors. 4090169689Skan (special_function_p): New function. 4091169689Skan * class.c (overrides): Don't let one kind of destructor override 4092169689Skan another. 4093169689Skan * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding 4094169689Skan whether or not to instantiate a template. 4095169689Skan * tree.c (special_function_p): Define. 4096169689Skan 4097169689Skan2000-05-03 Mark Mitchell <mark@codesourcery.com> 4098169689Skan 4099169689Skan * cp-tree.def (THUNK_DECL): Remove. 4100169689Skan * cp-tree.h (DECL_THUNK_P): New macro. 4101169689Skan (DECL_NON_THUNK_FUNCTION_P): Likewise. 4102169689Skan (DECL_EXTERN_C_FUNCTION_P): Likewise. 4103169689Skan (SET_DECL_THUNK_P): Likewise. 4104169689Skan (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P. 4105169689Skan (FNADDR_FROM_VTABLE_ENTRY): Likewise. 4106169689Skan (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P. 4107169689Skan * decl.c (decls_match): Use DECL_EXTERN_C_P. 4108169689Skan (duplicate_decls): Likewise. 4109169689Skan (pushdecl): Likewise. Adjust thunk handling. 4110169689Skan (grokfndecl): Use DECL_EXTERN_C_P. 4111169689Skan * decl2.c (mark_vtable_entries): Use DECL_THUNK_P. 4112169689Skan * dump.c (dequeue_and_dump): Remove THUNK_DECL handling. 4113169689Skan * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P. 4114169689Skan * expr.c (cplus_expand_expr): Remove THUNK_DECL handling. 4115169689Skan * method.c (make_thunk): Use SET_DECL_THUNK_P. Set 4116169689Skan DECL_NO_STATIC_CHAIN. 4117169689Skan (emit_thunk): Don't play games with TREE_CODE on thunks. Don't 4118169689Skan set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk. 4119169689Skan * search.c (covariant_return_p): Remove THUNK_DECL handling. 4120169689Skan * ir.texi: Update. 4121169689Skan 4122169689Skan2000-05-01 Jason Merrill <jason@casey.cygnus.com> 4123169689Skan 4124169689Skan * tree.c (walk_tree): Set lineno. 4125169689Skan 4126169689Skan2000-05-01 Mark Mitchell <mark@codesourcery.com> 4127169689Skan 4128169689Skan * exception.cc: Update license notice. 4129169689Skan * new.cc: Likewise. 4130169689Skan * new1.cc: Likewise. 4131169689Skan * new2.cc: Likewise. 4132169689Skan * tinfo.cc: Likewise. 4133169689Skan * tinfo2.cc: Likewise. 4134169689Skan * vec.cc: Likewise. 4135169689Skan * inc/cxxabi.h: Likewise. 4136169689Skan * inc/exception: Likewise. 4137169689Skan * inc/new: Likewise. 4138169689Skan * inc/new.h: Likewise. 4139169689Skan * inc/typeinfo: Likewise. 4140169689Skan 4141169689Skan2000-05-01 Jason Merrill <jason@casey.cygnus.com> 4142169689Skan 4143169689Skan * tree.c (build_target_expr_with_type): If we already have a 4144169689Skan TARGET_EXPR, just return it. 4145169689Skan 4146169689Skan * optimize.c (initialize_inlined_parameters): Don't generate an 4147169689Skan EXPR_STMT if we can just use DECL_INITIAL. 4148169689Skan * decl.c (emit_local_var): Only make the initialization a 4149169689Skan full-expression if stmts_are_full_exprs_p. 4150169689Skan 4151169689Skan2000-05-01 Mark Mitchell <mark@codesourcery.com> 4152169689Skan 4153169689Skan * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New 4154169689Skan macro. 4155169689Skan * call.c (standard_conversion): Use it. 4156169689Skan (direct_reference_binding): Likewise. 4157169689Skan (build_over_call): Likewise. 4158169689Skan (is_properly_derived_from): Likewise. 4159169689Skan (compare_ics): Likewise. 4160169689Skan * class.c (resolves_to_fixed_type_p): Likewise. 4161169689Skan * optimize.c (declare_return_variable): Likewise. 4162169689Skan * pt.c (is_specialization_of): Likewise. 4163169689Skan (unify): Likewise. 4164169689Skan * typeck.c (comp_target_parms): Likeiwse. 4165169689Skan (build_static_cast): Likewise. 4166169689Skan (build_reinterpret_cast): Likewise. 4167169689Skan (build_const_cast): Likewise. 4168169689Skan (comp_ptr_ttypes_real): Likewise. 4169169689Skan (comp_ptr_ttypes_const): Likewise. 4170169689Skan * typeck2.c (process_init_constructor): Likewise. 4171169689Skan 4172169689Skan2000-04-30 Scott Snyder <snyder@fnal.gov> 4173169689Skan 4174169689Skan * decl.c (finish_destructor_body): Use the base destructor when 4175169689Skan destroying virtual bases. 4176169689Skan 4177169689Skan2000-04-30 Mark Mitchell <mark@codesourcery.com> 4178169689Skan 4179169689Skan * expr.c (cplus_expand_expr): Preserve temporaries when expanding 4180169689Skan STMT_EXPRs. 4181169689Skan * optimize.c (struct inline_data): Add target_exprs field. 4182169689Skan (declare_return_variable): When a function returns an aggregate, 4183169689Skan use the variable declared in the TARGET_EXPR as the remapped 4184169689Skan DECL_RESULT. 4185169689Skan (expand_call_inline): Update the pending target_exprs stack. 4186169689Skan (optimize_function): Initialize the stack. 4187169689Skan 4188169689Skan * decl2.c (finish_file): Fix typo in comment. 4189169689Skan 4190169689Skan * method.c (emit_thunk): Don't try to return a `void' value. 4191169689Skan 4192169689Skan * optimize.c (initialize_inlined_parameters): If the parameter is 4193169689Skan addressable, we need to make a new VAR_DECL, even if the 4194169689Skan initializer is constant. 4195169689Skan 4196169689Skan2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro> 4197169689Skan 4198169689Skan * decl.c (grok_op_properties): Add an extra check of argtypes. 4199169689Skan 4200169689Skan2000-04-27 Mark Mitchell <mark@codesourcery.com> 4201169689Skan 4202169689Skan * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying 4203169689Skan variables. 4204169689Skan (initialize_inlined_parameters): Try to avoid creating new 4205169689Skan VAR_DECLs. 4206169689Skan 4207169689Skan2000-04-27 Alex Samuel <samuel@codesourcery.com> 4208169689Skan 4209169689Skan * lex.c (my_get_run_time): Remove. 4210169689Skan (init_filename_times): Use get_run_time instead of my_get_run_time. 4211169689Skan (check_newline): Likewise. 4212169689Skan (dump_time_statistics): Likewise. 4213169689Skan * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead 4214169689Skan of computing elapsed time explicitly. 4215169689Skan 4216169689Skan2000-04-26 Mark Mitchell <mark@codesourcery.com> 4217169689Skan 4218169689Skan * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P. 4219169689Skan * init.c (decl_constant_value): Check TREE_READONLY_DECL_P. 4220169689Skan * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P 4221169689Skan before calling decl_constant_value. 4222169689Skan * class.c (check_bitfield_decl): Likewise. 4223169689Skan * cvt.c (ocp_convert): Likewise. 4224169689Skan (convert): Likewise. 4225169689Skan * decl.c (compute_array_index_type): Likewise. 4226169689Skan (build_enumerator): Likewise. 4227169689Skan * decl2.c (check_cp_case_value): Likewise. 4228169689Skan * pt.c (convert_nontype_argument): Likewise. 4229169689Skan (tsubst): Likewise. 4230169689Skan * typeck.c (decay_conversion): Likewise. 4231169689Skan (build_compound_expr): Likewise. 4232169689Skan (build_reinterpret_cast): Likewise. 4233169689Skan (build_c_cast): Likewise. 4234169689Skan (convert_for_assignment): Likewise. 4235169689Skan 4236169689Skan2000-04-26 Jason Merrill <jason@casey.cygnus.com> 4237169689Skan 4238169689Skan * decl.c (finish_function): Don't play games with DECL_INLINE. 4239169689Skan 4240169689Skan2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr> 4241169689Skan 4242169689Skan * ir.texi: Correct typo. 4243169689Skan 4244169689Skan2000-04-25 Martin v. L�wis <loewis@informatik.hu-berlin.de> 4245169689Skan 4246169689Skan * decl.c (grokdeclarator): Reject VLAs as members. 4247169689Skan 4248169689Skan2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com> 4249169689Skan 4250169689Skan * call.c (standard_conversion): Accept conversion between 4251169689Skan COMPLEX_TYPEs. 4252169689Skan 4253169689Skan * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE. 4254169689Skan 4255169689Skan2000-04-24 Zack Weinberg <zack@wolery.cumb.org> 4256169689Skan 4257169689Skan * decl2.c (finish_file): Remove double setup for accounting 4258169689Skan compile time. 4259169689Skan 4260169689Skan2000-04-24 Robert Lipe <robertlipe@usa.net> 4261169689Skan 4262169689Skan * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD. 4263169689Skan 4264169689Skan2000-04-23 Benjamin Kosnik <bkoz@cygnus.com> 4265169689Skan 4266169689Skan * new.cc (set_new_handler): Needs to be in std::. 4267169689Skan 4268169689Skan2000-04-23 Mark Mitchell <mark@codesourcery.com> 4269169689Skan 4270169689Skan * cp-tree.h (lang_decl): Remove pretty_function_p. 4271169689Skan (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the 4272169689Skan language-specific node. 4273169689Skan * decl.c (cp_make_fname_decl): Use build_decl, not 4274169689Skan build_lang_decl, to build the variables. 4275169689Skan (grokvardecl): Don't call build_lang_decl for local variables in 4276169689Skan templates. 4277169689Skan (grokdeclarator): Don't call build_lang_decl for local type 4278169689Skan declarations in templates. 4279169689Skan * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated 4280169689Skan zero'd memory, rather than calling memset. 4281169689Skan * pt.c: Include hashtab.h. 4282169689Skan (local_specializations): New variable. 4283169689Skan (retrieve_local_specialization): Use it. 4284169689Skan (register_local_specialization): Likewise. 4285169689Skan (tsubst_decl): Don't assume local variables have 4286169689Skan DECL_LANG_SPECIFIC. 4287169689Skan (instantiate_decl): Set up local_specializations. 4288169689Skan * Makefile.in (HTAB_H): New variable. 4289169689Skan 4290169689Skan2000-04-23 Richard Henderson <rth@cygnus.com> 4291169689Skan 4292169689Skan * typeck.c (c_expand_asm_operands): Restore the original 4293169689Skan contents of the output list. 4294169689Skan 4295169689Skan2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com> 4296169689Skan 4297169689Skan * ir.texi: Document complex number representation. 4298169689Skan 4299169689Skan2000-04-20 Nathan Sidwell <nathan@codesourcery.com> 4300169689Skan 4301169689Skan * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi. 4302169689Skan (target_incomplete_p): New function. 4303169689Skan (tinfo_base_init): Create comdat NTBS name variable. 4304169689Skan (ptr_initializer): Add non_public parameter. Calculate it. 4305169689Skan (ptmd_initializer): Likewise. 4306169689Skan (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo. 4307169689Skan (create_real_tinfo_var): Add non_public parameter. Use it. 4308169689Skan Push proxy into global namespace. 4309169689Skan * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask): 4310169689Skan New enumeration. 4311169689Skan * inc/typeinfo (type_info::before, type_info::operator==): 4312169689Skan Compare __name addresses. 4313169689Skan 4314169689Skan * tinfo2.cc: Remove new-abi builtins comment. 4315169689Skan 4316169689Skan2000-04-20 Jason Merrill <jason@casey.cygnus.com> 4317169689Skan 4318169689Skan * typeck.c (build_x_function_call): Resolve an OFFSET_REF. 4319169689Skan 4320169689Skan * call.c (joust): Exit early if we get the same function, too. 4321169689Skan 4322169689Skan * decl2.c (key_method): Return NULL_TREE for template classes. 4323169689Skan (import_export_class): Don't need to check for template classes. 4324169689Skan 4325169689Skan2000-04-18 Zack Weinberg <zack@wolery.cumb.org> 4326169689Skan 4327169689Skan * lex.c: Remove references to cccp.c. 4328169689Skan 4329169689Skan2000-04-18 Mark Mitchell <mark@codesourcery.com> 4330169689Skan 4331169689Skan * cp-tree.h (lang_decl_flags): Remove const_memfunc and 4332169689Skan volatile_memfunc. Add destructor_attr. Adjust dummy. 4333169689Skan (DECL_DESTRUCTOR_P): Use destructor_attr. 4334169689Skan (DECL_CONST_MEMFUNC_P): Reimplement. 4335169689Skan (DECL_VOLATILE_MEMFUNC_P): Remove. 4336169689Skan * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS. 4337169689Skan (overrides): Use DECL_DESTRUCTOR_P. 4338169689Skan (check_for_override): Likewise. 4339169689Skan * decl.c (start_function): Likewise. 4340169689Skan * decl2.c (grokfclassfn): Likewise. 4341169689Skan (check_classfn): Likewise. 4342169689Skan (grok_function_init): Likewise. 4343169689Skan 4344169689Skan2000-04-17 Mark Mitchell <mark@codesourcery.com> 4345169689Skan 4346169689Skan * decl2.c (grokfield): Issue error on illegal data member 4347169689Skan declaration. 4348169689Skan 4349169689Skan2000-04-17 Mark P Mitchell <mark@codesourcery.com> 4350169689Skan 4351169689Skan * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL. 4352169689Skan 4353169689Skan2000-04-16 Mark Mitchell <mark@codesourcery.com> 4354169689Skan 4355169689Skan * class.c (build_vtable_entry): Don't build thunks for type-info 4356169689Skan functions. 4357169689Skan 4358169689Skan2000-04-16 Jason Merrill <jason@casey.cygnus.com> 4359169689Skan 4360169689Skan * decl.c (decls_match): Allow a redeclaration of a builtin to 4361169689Skan specify args while the builtin did not. 4362169689Skan 4363169689Skan2000-04-15 Mark Mitchell <mark@codesourcery.com> 4364169689Skan 4365169689Skan * cp-tree.def (THUNK_DECL): Add to documentation. 4366169689Skan * cp-tree.h (flag_huge_objects): Declare. 4367169689Skan * class.c (modify_vtable_entry): Tidy. 4368169689Skan (update_vtable_entry_for_fn): Split out from dfs_modify_vtables. 4369169689Skan Calculate delta appropriately for the new ABI. 4370169689Skan (dfs_modify_vtables): Use it. 4371169689Skan (modify_all_vtables): Fix thinko in code to add overriding copies 4372169689Skan of functions to primary vtables. 4373169689Skan (build_clone): Fix typo in comment. 4374169689Skan (clone_function_decl): Correct order of destructors in vtable. 4375169689Skan (build_vbase_offset_vtbl_entries): Adjust comment. 4376169689Skan (dfs_vcall_offset_queue_p): Remove. 4377169689Skan (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX. 4378169689Skan (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases. 4379169689Skan (build_vtable_entry): Correct check for pure virtual functions. 4380169689Skan Don't declare flag_huge_objects. 4381169689Skan * decl.c (flag_huge_objects): Remove declaration. 4382169689Skan * method.c (make_thunk): Tweak mangling for vcall offset thunks. 4383169689Skan Use int_size_in_bytes. 4384169689Skan (emit_thunk): Handle vcall offset thunks. 4385169689Skan 4386169689Skan2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 4387169689Skan 4388169689Skan * decl2.c (parse_time, varconst_time): Delete declarations. 4389169689Skan (finish_file): Delete LINENO declaration. 4390169689Skan START_TIME and THIS_TIME now long. 4391169689Skan 4392169689Skan2000-04-13 Nathan Sidwell <nathan@codesourcery.com> 4393169689Skan 4394169689Skan * class.c (build_base_field): Reformat comment. 4395169689Skan 4396169689Skan * inc/cxxabi.h (stddef.h): Comment inclusion. 4397169689Skan (__base_class_info::__offset): Comment shift. 4398169689Skan 4399169689Skan2000-04-12 Mark Mitchell <mark@codesourcery.com> 4400169689Skan 4401169689Skan * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. 4402169689Skan (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER. 4403169689Skan (cp_push_exception_identifier): New macro. 4404169689Skan (DECL_COMPLETE_DESTRUCTOR_P): New macro. 4405169689Skan (DECL_BASE_DESTRUCTOR_P): Likewise. 4406169689Skan (DECL_DELETING_DESTRUCTOR_P): Likewise. 4407169689Skan (get_vtbl_decl_for_binfo): Fix formatting. 4408169689Skan (in_charge_arg_for_name): New macro. 4409169689Skan (maybe_build_cleanup_and_delete): Remove declaration. 4410169689Skan * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P. 4411169689Skan (in_charge_arg_for_name): New function. 4412169689Skan (build_new_method_call): Use it. Handle cloned destructors. 4413169689Skan (build_clone): Don't make the base constructor virtual. 4414169689Skan Automatically defer generated functions. 4415169689Skan (clone_function_decl): Handle destructors, too. 4416169689Skan (clone_constructors_and_destructors): Likewise. 4417169689Skan (create_vtable_ptr): Don't create a vtable entry for a cloned 4418169689Skan function. 4419169689Skan * decl.c (predefined_identifier): Add ctor_or_dtor_p. 4420169689Skan (initialize_predefined_identifiers): Update appropriately. 4421169689Skan (finish_destructor_body): Simplify. 4422169689Skan (maybe_build_cleanup_and_delete): Remove. 4423169689Skan * except.c (expand_throw): Handle new-ABI destructors. 4424169689Skan * init.c (expand_cleanup_for_base): Use base_dtor_identifier. 4425169689Skan (build_dtor_call): New function. 4426169689Skan (build_delete): Use it. Simplify. 4427169689Skan * optimize.c (maybe_clone_body): Handle destructors. 4428169689Skan * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P. 4429169689Skan 4430169689Skan * exception.cc (cleanup_fn): New typedef. 4431169689Skan (CALL_CLEANUP): New macro. 4432169689Skan (cp_eh_info): Use them. 4433169689Skan (__cp_push_exception): Likewise. 4434169689Skan (__cp_pop_exception): Likewise. 4435169689Skan 4436169689Skan2000-04-11 Mark Mitchell <mark@codesourcery.com> 4437169689Skan 4438169689Skan * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER. 4439169689Skan (complete_dtor_identifier): New macro. 4440169689Skan (CLASSTYPE_FIRST_CONVERSION): Remove. 4441169689Skan (CLASSTYPE_CONSTRUCTOR_SLOT): New macro. 4442169689Skan (CLASSTYPE_DESTRUCTOR_SLOT): Likewise. 4443169689Skan (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise. 4444169689Skan (CLASSTYPE_CONSTRUCTORS): Likewise. 4445169689Skan (CLASSTYPE_DESTRUCTORS): Likewise. 4446169689Skan (lang_decl): Add cloned_function. 4447169689Skan (DECL_COMPLETE_CONSTRUCTOR_P): New macro. 4448169689Skan (DECL_BASE_CONSTRUCTOR_P): Likewise. 4449169689Skan (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise. 4450169689Skan (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise. 4451169689Skan (DECL_CLONED_FUNCTION_P): Likewise. 4452169689Skan (DECL_CLONED_FUNCTION): Likewise. 4453169689Skan (clone_function_decl): Declare. 4454169689Skan (maybe_clone_body): Likewise. 4455169689Skan * call.c (build_user_type_conversion_1): Call complete object 4456169689Skan constructors in the new ABI. 4457169689Skan (build_new_method_call): Don't add in-charge parameters under the 4458169689Skan new ABI. 4459169689Skan * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P, 4460169689Skan DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and 4461169689Skan CLASSTYPE_DESTRUCTOR_SLOT. 4462169689Skan (build_clone): New function. 4463169689Skan (clone_function_decl): Likewise. 4464169689Skan (clone_constructors_and_destructors): Likewise. 4465169689Skan (check_bases_and_members): Use it. 4466169689Skan * decl.c (iniitialize_predefined_identifiers): Initialize 4467169689Skan complete_dtor_identifier. 4468169689Skan (finish_function): Don't add extra code to a clone. 4469169689Skan (lang_mark_tree): Mark cloned_function. 4470169689Skan * decl2.c (mark_used): Don't bother trying to instantiate things 4471169689Skan we synthesized. 4472169689Skan * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice. 4473169689Skan * method.c (set_mangled_name_for_decl): Don't treat clones as 4474169689Skan constructors. 4475169689Skan (synthesize_method): Sythesize cloned functions, not the clones. 4476169689Skan * optimize.c (inline_data): Update comment on ret_label. 4477169689Skan (remap_block): Don't assume DECL_INITIAL exists. 4478169689Skan (copy_body_r): Allow ret_label to be NULL. 4479169689Skan (maybe_clone_body): Define. 4480169689Skan * pt.c (tsubst_decl): Handle clones. 4481169689Skan (instantiate_clone): New function. 4482169689Skan (instantiate_template): Use it. 4483169689Skan (set_mangled_name_for_template_decl): Don't treat clones as 4484169689Skan constructors. 4485169689Skan * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT, 4486169689Skan CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT. 4487169689Skan * semantics.c (expand_body): Clone function bodies as necessary. 4488169689Skan 4489169689Skan * optimize.c (remap_decl): Avoid sharing structure for arrays 4490169689Skan whose size is only known at run-time. 4491169689Skan * tree.c (copy_tree_r): Don't copy PARM_DECLs. 4492169689Skan 4493169689Skan * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr 4494169689Skan to has_in_charge_parm_p. 4495169689Skan (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ... 4496169689Skan (DECL_HAS_IN_CHARGE_PARM_P): ... this. 4497169689Skan (DECL_COPY_CONSTRUCTOR_P): New macro. 4498169689Skan * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P. 4499169689Skan (build_user_type_conversion_1): Likewise. 4500169689Skan (convert_like_real): Likewise. 4501169689Skan (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P. 4502169689Skan * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P. 4503169689Skan (copy_args_p): Likewise. 4504169689Skan (grok_ctor_properties): Likewise. 4505169689Skan (start_function): Likewise. 4506169689Skan * decl2.c (maybe_retrofit_in_charge): Likewise. Set it. 4507169689Skan * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P. 4508169689Skan * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P. 4509169689Skan * method.c (do_build_copy_constructor): Use 4510169689Skan DECL_HAS_IN_CHARGE_PARM_P. 4511169689Skan (synthesize_method): Likewise. 4512169689Skan * pt.c (instantiate_template): Remove goto. 4513169689Skan * tree.c (build_cplus_method_type): Remove mention of obstacks in 4514169689Skan comment. 4515169689Skan 4516169689Skan * cp-tre.h (finish_function): Change prototype. 4517169689Skan * decl.c (end_cleanup_fn): Adjust caller. 4518169689Skan (finish_function): Take only one parameter. 4519169689Skan * decl2.c (finish_objects): Adjust caller. 4520169689Skan (finish_static_storage_duration_function): Likewise. 4521169689Skan * method.c (emit_thunk): Likewise. 4522169689Skan * parse.y: Likewise. 4523169689Skan * parse.c: Regenerated. 4524169689Skan * pt.c (instantiate_decl): Likewise. 4525169689Skan * rtti.c (synthesize_tinfo_fn): Likewise. 4526169689Skan * semantics.c (expand_body): Likewise. 4527169689Skan 4528169689Skan * cp-tree.h (copy_decl): New function. 4529169689Skan * class.c (finish_struct_1): Use it. 4530169689Skan * lex.c (copy_decl): Define it. 4531169689Skan * pt.c (tsubst_decl): Likewise. 4532169689Skan * tree.c (copy_template_template_parm): Likewise. 4533169689Skan 4534169689Skan * cp-tree.h (lang_type): Remove has_nonpublic_ctor and 4535169689Skan has_nonpublic_assign_ref. 4536169689Skan (TYPE_HAS_NONPUBLIC_CTOR): Don't declare. 4537169689Skan (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise. 4538169689Skan * class.c (finish_struct_methods): Don't set 4539169689Skan TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF. 4540169689Skan (interface_only): Don't declare. 4541169689Skan (interface_unknown): Likewise. 4542169689Skan 4543169689Skan2000-04-11 Martin v. L�wis <loewis@informatik.hu-berlin.de> 4544169689Skan 4545169689Skan * tree.h (HAVE_TEMPLATES): Remove definition. 4546169689Skan * lang-options.h (-fthis-is-variable): Remove documentation. 4547169689Skan 4548169689Skan2000-04-10 Jason Merrill <jason@casey.cygnus.com> 4549169689Skan 4550169689Skan * class.c (instantiate_type): Handle object-relative template-id. 4551169689Skan 4552169689Skan * semantics.c (finish_expr_stmt): Call convert_to_void here. 4553169689Skan * decl.c (cplus_expand_expr_stmt): Not here. 4554169689Skan 4555169689Skan * rtti.c (build_dynamic_cast_1): Call non_lvalue. 4556169689Skan Initialize exprtype earlier. 4557169689Skan 4558169689Skan * parse.y (fn.def1): Check for defining types in return types. 4559169689Skan 4560169689Skan * decl.c (check_tag_decl): Notice extra fundamental types. 4561169689Skan Diagnose empty decls in classes, too. 4562169689Skan 4563169689Skan * decl.c (grokdeclarator): Don't override an anonymous name if no 4564169689Skan declarator was given. 4565169689Skan 4566169689Skan * cvt.c (convert_to_void): Call resolve_offset_ref. 4567169689Skan 4568169689Skan * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF. 4569169689Skan 4570169689Skan * decl2.c (decl_namespace): Handle getting a type. 4571169689Skan 4572169689Skan * typeck.c (build_c_cast): Re-enable warning for cast between 4573169689Skan pointer and integer of different size. 4574169689Skan 4575169689Skan2000-04-10 Nathan Sidwell <nathan@codesourcery.com> 4576169689Skan 4577169689Skan * inc/cxxabi.h (__pointer_type_info): Add restrict and 4578169689Skan incomplete flags. 4579169689Skan (__pointer_type_info::__pointer_catch): New virtual function. 4580169689Skan (__pointer_to_member_type_info): Derive from 4581169689Skan __pointer_type_info. Adjust. 4582169689Skan (__pointer_to_member_type_info::__do_catch): Remove. 4583169689Skan (__pointer_to_member_type_info::__is_pointer_p): Declare. 4584169689Skan (__pointer_to_member_type_info::__pointer_catch): Declare. 4585169689Skan * rtti.c (qualifier_flags): Add restrict flag. 4586169689Skan (ptmd_initializer): Reorder members. 4587169689Skan (create_tinfo_types): Expand comments. Reorder 4588169689Skan ptmd_desc_type_node members. 4589169689Skan * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p): 4590169689Skan Implement. 4591169689Skan (__pointer_type_info::__do_catch): Move specific code into 4592169689Skan __pointer_catch. Call it. 4593169689Skan (__pointer_type_info::__pointer_catch): Non-pointer-to-member 4594169689Skan specific catch checking. Fix void conversion check. 4595169689Skan (__pointer_to_member_type_info::__do_catch): Remove. 4596169689Skan (__pointer_to_member_type_info::__pointer_catch): Implement. 4597169689Skan 4598169689Skan2000-04-10 Martin v. L�wis <loewis@informatik.hu-berlin.de> 4599169689Skan 4600169689Skan * lex.c (init_parse): Remove traces of classof and headof. 4601169689Skan * decl2.c (flag_operator_names): Default to 1. 4602169689Skan (lang_decode_option): Do not set it for -ansi. 4603169689Skan 4604169689Skan2000-04-09 Mark Mitchell <mark@codesourcery.com> 4605169689Skan 4606169689Skan * cp-tree.h (struct lang_decl): Remove main_decl_variant. 4607169689Skan (DECL_MAIN_VARIANT): Remove. 4608169689Skan * decl.c (duplicate_decls): Don't set it. 4609169689Skan (start_function): Likewise. 4610169689Skan (lang_mark_tree): Don't mark it. 4611169689Skan * decl2.c (defer_fn): Don't use it. 4612169689Skan * lex.c (retrofit_lang_decl): Don't set it. 4613169689Skan * pt.c (tsubst_decl): Likewise. 4614169689Skan * ptree.c (print_lang_decl): Don't print it. 4615169689Skan * typeck.c (mark_addressable): Don't use it. 4616169689Skan 4617169689Skan2000-04-09 Nathan Sidwell <nathan@codesourcery.com> 4618169689Skan 4619169689Skan * vec.cc: Include <new> and <exception>. 4620169689Skan (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup. 4621169689Skan (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or 4622169689Skan terminate. 4623169689Skan (__cxa_vec_delete): Catch dtor exceptions. 4624169689Skan 4625169689Skan2000-04-09 Nathan Sidwell <nathan@codesourcery.com> 4626169689Skan 4627169689Skan Prepend __ to implementation defined names. 4628169689Skan * inc/typeinfo (type_info): Rename _name to __name. 4629169689Skan (type_info::type_info): Rename parameter. 4630169689Skan (type_info::operator==, type_info::operator!=, 4631169689Skan type_info::before): Likewise. 4632169689Skan (type_info::is_pointer_p, type_info::is_function_p, 4633169689Skan type_info::do_catch, type_info::do_upcast): Prepend __. Rename 4634169689Skan parameters. 4635169689Skan * inc/cxxabi.h 4636169689Skan (__fundamental_type_info::__fundamental_type_info) Rename parameters. 4637169689Skan (__pointer_type_info::__pointer_type_info): Likewise. 4638169689Skan (__pointer_type_info::is_pointer_p, 4639169689Skan __pointer_type_info::do_catch): Prepend __. Rename parameters. 4640169689Skan (__array_type_info::__array_type_info): Rename parameters. 4641169689Skan (__function_type_info::__function_type_info): Likewise. 4642169689Skan (__function_type_info::is_function_p): Prepend __. 4643169689Skan (__enum_type_info::__enum_type_info): Rename parameters. 4644169689Skan (__pointer_to_member_type_info::__pointer_to_member_type_info): 4645169689Skan Likewise. 4646169689Skan (__pointer_to_member_type_info::do_catch): Prepend __. Rename 4647169689Skan parameters. 4648169689Skan (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __. 4649169689Skan (__class_type_info::__class_type_info): Rename parameters. 4650169689Skan (__class_type_info::sub_kind): Prepend __. Adjust member names. 4651169689Skan (__class_type_info::upcast_result, 4652169689Skan __class_type_info::dyncast_result): Prepend __. Move definition 4653169689Skan into tinfo.cc. 4654169689Skan (__class_type_info::do_upcast, __class_type_info::do_catch, 4655169689Skan __class_type_info::find_public_src, 4656169689Skan __class_type_info::do_dyncast, 4657169689Skan __class_type_info::do_find_public_src): Prepend __. Rename 4658169689Skan parameters. 4659169689Skan (__si_class_type_info::__si_class_type_info): Rename parameters. 4660169689Skan (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast, 4661169689Skan __si_class_type_info::do_find_public_src): Prepent __. Rename 4662169689Skan parameters. 4663169689Skan (__vmi_class_type_info::__vmi_class_type_info): Rename parameters. 4664169689Skan (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast, 4665169689Skan __vmi_class_type_info::do_find_public_src): Prepent __. Rename 4666169689Skan parameters. 4667169689Skan (__dynamic_cast): Rename parameters. 4668169689Skan * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p, 4669169689Skan type_info::do_catch, type_info::do_upcast): Prepend __. 4670169689Skan (contained_p, public_p, virtual_p, contained_public_p, 4671169689Skan contained_nonpublic_p, contained_nonvirtual_p): Adjust. 4672169689Skan (__class_type_info::do_catch, 4673169689Skan __class_type_info::do_upcast): Prepend __. Adjust. 4674169689Skan (__class_type_info::__upcast_result, 4675169689Skan __class_type_info::__dyncast_result): Move from inc/cxxabi.h. 4676169689Skan Adjust. 4677169689Skan (__class_type_info::find_public_src): Prepend __. Adjust. 4678169689Skan (__class_type_info::do_find_public_src, 4679169689Skan __si_class_type_info::do_find_public_src, 4680169689Skan __vmi_class_type_info::do_find_public_src): Likewise. 4681169689Skan (__class_type_info::do_dyncast, 4682169689Skan __si_class_type_info::do_dyncast, 4683169689Skan __vmi_class_type_info::do_dyncast): Likewise. 4684169689Skan (__class_type_info::do_upcast, 4685169689Skan __si_class_type_info::do_upcast, 4686169689Skan __vmi_class_type_info::do_upcast): Likewise. 4687169689Skan (__dynamic_cast): Adjust. 4688169689Skan * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __. 4689169689Skan (__function_type_info::is_function_p): Likewise. 4690169689Skan (__pointer_type_info::do_catch): Likewise. Adjust. 4691169689Skan (__pointer_to_member_type_info::do_catch): Likewise. Adjust. 4692169689Skan (__throw_type_match_rtti_2): Adjust. 4693169689Skan (__is_pointer): Adjust. 4694169689Skan 4695169689Skan2000-04-08 Mark Mitchell <mark@codesourcery.com> 4696169689Skan 4697169689Skan * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER. 4698169689Skan (complete_ctor_identifier): New macro. 4699169689Skan (special_function_kind): Add sfk_copy_constructor and 4700169689Skan sfk_assignment_operator. 4701169689Skan (LOOKUP_HAS_IN_CHARGE): Remove. 4702169689Skan (cons_up_default_function): Rename to ... 4703169689Skan (implicitly_declare_fn): ... this. 4704169689Skan * call.c (build_new_method_call): Add in-charge parameters for 4705169689Skan constructors here. 4706169689Skan * class.c (add_implicitly_declared_members): Change parameter name 4707169689Skan from cant_have_assignment to cant_have_const_assignment. 4708169689Skan Replace calls to cons_up_default_function to implicitly_declare_fn. 4709169689Skan * cvt.c (ocp_convert): Use complete_ctor_identifier. 4710169689Skan * decl.c (initialize_predefined_identifiers): Initialize it. 4711169689Skan (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of 4712169689Skan complex expression. 4713169689Skan * init.c (expand_default_init): Don't calculate the in-charge 4714169689Skan parameter here. 4715169689Skan (build_new_1): Likewise. 4716169689Skan * lex.c (cons_up_default_function): Move to method.c. 4717169689Skan * method.c (synthesize_method): Use DECL_DESTRUCTOR_P. 4718169689Skan (implicitly_declare_fn): New function. 4719169689Skan * typeck.c (build_static_cast): Use complete_ctor_identifier. 4720169689Skan (build_modify_expr): Likewise. 4721169689Skan * typeck2.c (build_functional_cast): Likewise. 4722169689Skan 4723169689Skan Under the new ABI, constructors don't return `this'. 4724169689Skan * cp-tree.h (warn_reorder): Declare. 4725169689Skan (special_function_kind): New enum. 4726169689Skan (global_base_init_list): Remove declaration. 4727169689Skan (emit_base_init): Don't return a value. 4728169689Skan (check_base_init): Don't declare. 4729169689Skan (is_aggr_typedef): Likewise. 4730169689Skan * decl.c (check_special_function_return_type): New function. 4731169689Skan (return_types): Remove. 4732169689Skan (grokdeclarator): Use check_special_function_return_type. 4733169689Skan (start_function): Don't initialize ctor_label under the new ABI. 4734169689Skan (finish_construtor_body): Don't create a corresponding LABEL_STMT. 4735169689Skan * init.c (begin_init_stmts): Move to top of file. 4736169689Skan (finish_init_stmts): Likewise. 4737169689Skan (warn_reorder): Don't declare. 4738169689Skan (emit_base_init): Don't create a STMT_EXPR here. Don't return a 4739169689Skan value. 4740169689Skan (check_base_init): Remove. 4741169689Skan (is_aggr_typedef): Likewise. 4742169689Skan (build_new_1): Don't use the return value of a constructor. 4743169689Skan * semantics.c (setup_vtbl_ptr): Don't use the return value 4744169689Skan of emit_base_init. 4745169689Skan * typeck.c (check_return_expr): Don't magically convert return 4746169689Skan statements into `return this' in constructors under the new ABI. 4747169689Skan 4748169689Skan * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER, 4749169689Skan CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER. 4750169689Skan (base_ctor_identifier): New macro. 4751169689Skan (base_dtor_identifier): Likewise. 4752169689Skan (deleting_dtor_identifier): Likewise. 4753169689Skan * decl.c: Don't include obstack.h. 4754169689Skan (obstack_chunk_alloc): Don't define. 4755169689Skan (obstack_chunk_free): Likewise. 4756169689Skan (struct predefined_identifier): New type. 4757169689Skan (initialize_predefined_identifiers): New function. 4758169689Skan (init_decl_processing): Use it. 4759169689Skan (debug_temp_inits): Remove. 4760169689Skan (start_method): Don't call preserve_data. 4761169689Skan (hack_incomplete_structures): Update comment. 4762169689Skan * init.c (init_init_processing): Don't initialize 4763169689Skan nelts_identifier. 4764169689Skan (build_offset_rf): Remove dead code. 4765169689Skan (build_delete): Use CLASSTYPE_N_BASECLASSES. 4766169689Skan * search.c (init_search_processing): Don't initialize 4767169689Skan vptr_identifier. 4768169689Skan 4769169689Skan2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4770169689Skan 4771169689Skan * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide 4772169689Skan some sign_compare warnings. 4773169689Skan 4774169689Skan2000-04-07 Nathan Sidwell <nathan@codesourcery.com> 4775169689Skan 4776169689Skan Rename abi::__vmi_class_type_info members. 4777169689Skan * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases, 4778169689Skan base_list, detail_masks members to vmi_flags, vmi_base_count, 4779169689Skan vmi_bases and vmi_flags_masks respectively. 4780169689Skan (__vmi_class_type_info::vmi_flags_masks): Rename 4781169689Skan details_unknown_mask to flags_unknown_mask. 4782169689Skan * tinfo.cc (__class_type_info::do_upcast): Adjust. 4783169689Skan (__vmi_class_type_info::do_find_public_src): Adjust. 4784169689Skan (__vmi_class_type_info::do_dyncast): Adjust. 4785169689Skan (__vmi_class_type_info::do_upcast): Adjust. 4786169689Skan 4787169689Skan2000-04-07 Nathan Sidwell <nathan@codesourcery.com> 4788169689Skan 4789169689Skan * tinfo.cc (convert_to_base): New function. 4790169689Skan (get_vbase_offset): Remove. Move into convert_to_base. 4791169689Skan (__vmi_class_type_info::do_find_public_src): Adjust. 4792169689Skan (__vmi_class_type_info::do_dyncast): Adjust. 4793169689Skan (__vmi_class_type_info::do_upcast): Adjust. 4794169689Skan 4795169689Skan2000-04-06 Jason Merrill <jason@yorick.cygnus.com> 4796169689Skan 4797169689Skan * tinfo.cc (operator=): Use __builtin_strcmp. 4798169689Skan * tinfo2.cc (before): Likewise. 4799169689Skan 4800169689Skan2000-04-06 Mark Mitchell <mark@codesourcery.com> 4801169689Skan 4802169689Skan * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred. 4803169689Skan (DECL_SAVED_INLINE): Rename to ... 4804169689Skan (DECL_DEFERRED_FN): ... this. 4805169689Skan (in_function_p): Remove declaration. 4806169689Skan (mark_inline_for_output): Rename to ... 4807169689Skan (defer_fn): ... this. 4808169689Skan * decl.c (finish_function): Adjust call to mark_inline_for_output. 4809169689Skan (in_function_p): Remove definition. 4810169689Skan * decl2.c (saved_inlines): Rename to ... 4811169689Skan (deferred_fns): ... this. 4812169689Skan (saved_inlines_used): Rename to ... 4813169689Skan (deferred_fns_used): ... this. 4814169689Skan (mark_inline_for_output): Rename to ... 4815169689Skan (defer_fn): ... this. 4816169689Skan (finish_file): Adjust accordingly. 4817169689Skan (init_decl2): Likewise. 4818169689Skan * lex.c (cons_up_default_function): Likewise. 4819169689Skan * pt.c (mark_decl_instantiated): Likewise. 4820169689Skan (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any 4821169689Skan circumstances. 4822169689Skan * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output. 4823169689Skan * semantics.c (expand_body): Defer more functions. 4824169689Skan 4825169689Skan2000-04-06 Nathan Sidwell <nathan@codesourcery.com> 4826169689Skan 4827169689Skan * vec.cc: New file. 4828169689Skan * Make-lang.in (CXX_LIB2FUNCS): Add it. 4829169689Skan (vec.o): Build it. 4830169689Skan * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 4831169689Skan __cxa_vec_delete): Declare. 4832169689Skan 4833169689Skan2000-04-06 Nathan Sidwell <nathan@codesourcery.com> 4834169689Skan 4835169689Skan * rtti.c (dfs_class_hint_mark): New static function. 4836169689Skan (dfs_class_hint_unmark): New static function. 4837169689Skan (class_hint_flags): Use them. 4838169689Skan 4839169689Skan2000-04-05 Benjamin Kosnik <bkoz@cygnus.com> 4840169689Skan 4841169689Skan * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE. 4842169689Skan 4843169689Skan2000-04-05 Mark Mitchell <mark@codesourcery.com> 4844169689Skan 4845169689Skan * cp-tree.h (instantiate_decl): Change prototype. 4846169689Skan * decl2.c (mark_used): Adjust call. 4847169689Skan * optimize.c (inlinable_function_p): Adjust handling of templates. 4848169689Skan * pt.c (do_decl_instantiation): Adjust call to instantiate_decl. 4849169689Skan (do_type_instantiation): Likewise. 4850169689Skan (instantiate_decl): Defer more templates. 4851169689Skan (instantiate_pending_templates): Adjust logic to handle inline 4852169689Skan friend functions. 4853169689Skan 4854169689Skan * Makefile.in (GGC_H): New variable. Use it throughout in place 4855169689Skan of ggc.h. 4856169689Skan 4857169689Skan * call.c: Don't include obstack.h. Include ggc.h. 4858169689Skan (obstack_chunk_alloc): Don't define. 4859169689Skan (obstack_chunk_free): Likewise. 4860169689Skan (add_candidate): Allocate the z_candidate with ggc_alloc_obj. 4861169689Skan * decl.c (push_switch): Use xmalloc to allocate the cp_switch. 4862169689Skan (pop_switch): Free it. 4863169689Skan 4864169689Skan * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs. 4865169689Skan 4866169689Skan * dump.c (dequeue_and_dump): Don't try to print the bit_position 4867169689Skan if we don't have a DECL_FIELD_OFFSET. 4868169689Skan 4869169689SkanWed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz> 4870169689Skan 4871169689Skan * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of 4872169689Skan special_function_p. 4873169689Skan 4874169689Skan2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4875169689Skan 4876169689Skan * cfns.gperf (hash, libc_name_p): Prototype. 4877169689Skan 4878169689Skan * rtti.c (build_dynamic_cast_1): Constification. 4879169689Skan 4880169689Skan * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes. 4881169689Skan 4882169689Skan * semantics.c (deferred_type_access_control): Prototype. 4883169689Skan 4884169689Skan2000-04-04 Mark Mitchell <mark@codesourcery.com> 4885169689Skan 4886169689Skan Correct many new ABI issues regarding vbase and vcall offset 4887169689Skan layout. 4888169689Skan * cp-tree.h (BINFO_VTABLE): Document. 4889169689Skan (struct lang_type): Tweak formatting. 4890169689Skan (BINFO_PRIMARY_BINFO): Add to documentation. 4891169689Skan (CLASSTYPE_VSIZE): Fix typo in comment. 4892169689Skan (CLASSTYPE_VBASECLASSES): Update documentation. 4893169689Skan (BINFO_VBASE_MARKED): Remove. 4894169689Skan (SET_BINFO_VBASE_MARKED): Likewise. 4895169689Skan (CLEAR_BINFO_VBASE_MARKED): Likewise. 4896169689Skan (BINFO_FIELDS_MARKED): Remove. 4897169689Skan (SET_BINFO_FIELDS_MARKED): Likewise. 4898169689Skan (CLEAR_BINFO_FIELDS_MARKED): Likewise. 4899169689Skan (enum access_kind): New enumeration. 4900169689Skan (num_extra_vtbl_entries): Remove declaration. 4901169689Skan (size_extra_vtbl_entries): Likewise. 4902169689Skan (get_vtbl_decl_for_binfo): New function. 4903169689Skan (dfs_vbase_unmark): Remove declaration. 4904169689Skan (mark_primary_bases): Likewise. 4905169689Skan * class.c (SAME_FN): Remove. 4906169689Skan (struct vcall_offset_data_s): Move definition. 4907169689Skan (build_vbase_pointer): Use `build', not `build_binary_op', to 4908169689Skan access the vbase pointer under the new ABI. 4909169689Skan (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo. 4910169689Skan (build_primary_vtable): Likewise. 4911169689Skan (dfs_mark_primary_bases): Move here from search.c. 4912169689Skan (mark_primary_bases): Likewise. 4913169689Skan (determine_primary_bases): Under the new ABI, don't make a base 4914169689Skan class a primary base just because we don't yet have any virtual 4915169689Skan functions. 4916169689Skan (layout_vtable_decl): Use get_vtbl_decl_for_binfo. 4917169689Skan (num_vfun_entries): Remove. 4918169689Skan (dfs_count_virtuals): Likewise. 4919169689Skan (num_extra_vtbl_entries): Likewise. 4920169689Skan (size_extra_vtbl_entries): Likewise. 4921169689Skan (layout_virtual_bases): Iterate in inheritance graph order under 4922169689Skan the new ABI. 4923169689Skan (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to 4924169689Skan indicate that a vfield is present. 4925169689Skan (init_class_processing): Initialize access_public_node, etc., from 4926169689Skan ak_public, etc. 4927169689Skan (get_vtbl_decl_for_binfo): New function. 4928169689Skan (dump_class_hierarchy_r): Likewise. 4929169689Skan (dump_class_hierarchy): Use it. 4930169689Skan (finish_vtbls): Build the vtbls in inheritance graph order. 4931169689Skan (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. 4932169689Skan (initialize_vtable): Use get_vtbl_decl_for_binfo. 4933169689Skan (accumulate_vtbl_inits): Add comments explaining why a pre-order 4934169689Skan walk is required. 4935169689Skan (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location 4936169689Skan where the vptr points, even for primary vtables. 4937169689Skan (build_vtbl_initializer): Adjust handling of vbase and vcall 4938169689Skan offsets. 4939169689Skan (build_vcall_and_vbase_vtable_entries): New function. 4940169689Skan (dfs_build_vbase_offset_vtbl_entries): Remove. 4941169689Skan (build_vbase_offset_vtbl_entries): Reimplement. 4942169689Skan (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that 4943169689Skan were already handled in a primary base class vtable. 4944169689Skan (build_vcall_offset_vtbl_entries): Adjust. 4945169689Skan (build_rtti_vtbl_entries): Adjust. 4946169689Skan * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo. 4947169689Skan * init.c (expand_virtual_init): Simplify. 4948169689Skan * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo. 4949169689Skan * rtti.c (create_pseudo_type_info): Adjust calculation of vptr. 4950169689Skan * search.c (BINFO_ACCESS): New macro. 4951169689Skan (SET_BINFO_ACCESS): Likewise. 4952169689Skan (dfs_access_in_type): Manipulate access_kinds, not access nodes. 4953169689Skan (access_in_type): Likewise. 4954169689Skan (dfs_accessible_p): Likewise. 4955169689Skan (protected_accessible_p): Likewise. 4956169689Skan (lookup_fnfields_1): Adjust documentation. 4957169689Skan (dfs_mark_primary_bases): Move to class.c 4958169689Skan (mark_primary_bases): Likewise. 4959169689Skan (dfs_vbase_unmark): Remove. 4960169689Skan (virtual_context): Use BINFO_FOR_VBASE. 4961169689Skan (dfs_get_vbase_types): Simplify. 4962169689Skan (dfs_build_inheritance_graph_order): New function. 4963169689Skan (get_vbase_types): Use it. 4964169689Skan * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo. 4965169689Skan 4966169689Skan * tinfo.cc (get_vbase_offset): New function. 4967169689Skan (__vmi_class_type_info::do_find_public_src): Use it. 4968169689Skan (__vmi_class_type_info::do_dyncast): Likewise. 4969169689Skan (__vmi_class_type_info::do_upcast): Likewise. 4970169689Skan 4971169689Skan2000-04-03 Zack Weinberg <zack@wolery.cumb.org> 4972169689Skan 4973169689Skan * lang-specs.h: Pass -fno-show-column to the preprocessor. 4974169689Skan 4975169689Skan2000-03-30 Nathan Sidwell <nathan@codesourcery.com> 4976169689Skan 4977169689Skan * rtti.c (class_hint_flags): Rename flags. 4978169689Skan (class_initializer): Remove flags. 4979169689Skan (synthesize_tinfo_var): Combine offset and flags. Add flags 4980169689Skan for __vmi_class_type_info. 4981169689Skan (create_tinfo_types): Remove flags from __class_type_info and 4982169689Skan __si_class_type_info. Merge flags and offset from 4983169689Skan base_class_type_info. 4984169689Skan * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags. 4985169689Skan (__base_class_info::is_virtual_p): Adjust. 4986169689Skan (__base_class_info::is_public_p): Adjust. 4987169689Skan (__base_class_info::offset): New accessor. 4988169689Skan (__class_type_info::details): Remove member. 4989169689Skan (__class_type_info::__class_type_info): Lose details. 4990169689Skan (__class_type_info::detail_masks): Remove. 4991169689Skan (__si_class_type_info::__si_class_type_info): Lose details. 4992169689Skan (__vmi_class_type_info::details): New member. 4993169689Skan (__vmi_class_type_info::__vmi_class_type_info): Adjust. 4994169689Skan (__vmi_class_type_info::detail_masks): New member. 4995169689Skan * tinfo.cc (__class_type_info::do_upcast): Initialize result 4996169689Skan with unknown_details_mask. 4997169689Skan (__vmi_class_type_info::do_find_public_src): Adjust 4998169689Skan (__vmi_class_type_info::do_dyncast): Adjust. 4999169689Skan (__vmi_class_type_info::do_upcast): Set result details, if 5000169689Skan needed. Adjust. 5001169689Skan (__dynamic_cast): Temporarily #if out optimization. 5002169689Skan 5003169689Skan2000-03-29 Nathan Sidwell <nathan@codesourcery.com> 5004169689Skan 5005169689Skan * rtti.c (get_tinfo_decl): Mark used. 5006169689Skan (emit_tinfo_decl): Don't optimize polymorphic type_info. Only 5007169689Skan mark as dealt with, if we output it. 5008169689Skan 5009169689Skan2000-03-28 Mark Mitchell <mark@codesourcery.com> 5010169689Skan 5011169689Skan * class.c: Reorganize to put virtual function table initialization 5012169689Skan machinery at the end of the file. 5013169689Skan 5014169689Skan2000-03-28 Jason Merrill <jason@casey.cygnus.com> 5015169689Skan 5016169689Skan * class.c (finish_struct): Use bitsize_zero_node. 5017169689Skan * pt.c (instantiate_class_template): Likewise. 5018169689Skan 5019169689Skan2000-03-28 Mark Mitchell <mark@codesourcery.com> 5020169689Skan 5021169689Skan Put RTTI entries at negative offsets in new ABI. 5022169689Skan * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first 5023169689Skan vbase offset at index -3, not -1. 5024169689Skan (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not 5025169689Skan dfs_vtable_path_unmarked_real_bases_queue_p to walk bases. 5026169689Skan (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff. 5027169689Skan (build_rtti_vtbl_entries): New function. 5028169689Skan (set_rtti_entry): Remove. 5029169689Skan (build_primary_vtable): Don't use it. 5030169689Skan (build_secondary_vtable): Likewise. 5031169689Skan (start_vtable): Remove. 5032169689Skan (first_vfun_index): New function. 5033169689Skan (set_vindex): Likewise. 5034169689Skan (add_virtual_function): Don't call start_vtable. Do call 5035169689Skan set_vindex. 5036169689Skan (set_primary_base): Rename parameter. 5037169689Skan (determine_primary_base): Likewise. 5038169689Skan (num_vfun_entries): Don't use skip_rtti_stuff. 5039169689Skan (num_extra_vtbl_entries): Include RTTI information. 5040169689Skan (build_vtbl_initializer): Use build_rtti_vtbl_entries. 5041169689Skan (skip_rtti_stuff): Remove. 5042169689Skan (dfs_modify_vtables): Don't use it. 5043169689Skan (modify_all_vtables): Don't use start_vtable. Do use set_vindex. 5044169689Skan (layout_nonempty_base_or_field): Update size handling. 5045169689Skan (create_vtable_ptr): Tweak. 5046169689Skan (layout_class_type): Adjust parameter names. 5047169689Skan (finish_struct_1): Simplify. 5048169689Skan * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation. 5049169689Skan (skip_rtti_stuff): Remove. 5050169689Skan (first_vfun_index): New function. 5051169689Skan (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. 5052169689Skan (dfs_vtable_path_marked_real_bases_queue_p): Remove. 5053169689Skan (marked_vtable_pathp): Declare. 5054169689Skan (unmarked_vtable_pathp): Likewise. 5055169689Skan * error.c (dump_expr): Use first_vfun_index to calculate vtable 5056169689Skan offsets. 5057169689Skan * rtti.c (build_headof): Look for RTTI at negative offsets. 5058169689Skan (get_tinfo_decl_dynamic): Likewise. 5059169689Skan (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL 5060169689Skan here. 5061169689Skan (create_pseudo_type_info): Do it here instead. Adjust so that 5062169689Skan vptr points at first virtual function. 5063169689Skan * search.c (marked_vtable_pathp): Make it global. 5064169689Skan (unmarked_vtable_pathp): Likewise. 5065169689Skan (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. 5066169689Skan (dfs_vtable_path_marked_real_bases_queue_p): Likewise. 5067169689Skan (dfs_get_pure_virtuals): Don't use skip_rtti_stuff. 5068169689Skan (get_pure_virtuals): Likewise. 5069169689Skan (expand_upcast_fixups): Likewise. 5070169689Skan * tree.c (debug_binfo): Likewise. 5071169689Skan * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate 5072169689Skan negative offset. 5073169689Skan 5074169689Skan2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5075169689Skan 5076169689Skan * class.c (check_field_decl): Fix typo. 5077169689Skan (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS. 5078169689Skan (check_methods): Likewise. 5079169689Skan (check_field_decls): Likewise. 5080169689Skan Use DECL_CONTEXT, not DECL_FIELD_CONTEXT. 5081169689Skan * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT): 5082169689Skan Use DECL_RESULT_FLD, not DECL_RESULT. 5083169689Skan * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT. 5084169689Skan * lex.c (identifier_type): Likewise. 5085169689Skan * pt.c (determine_specialization, lookup_template_class): Likewise. 5086169689Skan (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise. 5087169689Skan (resolve_overloaded_unification, more_specialized): Likewise. 5088169689Skan * semantics.c (finish_member_declaration): Likewise. 5089169689Skan * typeck.c (build_x_function_call): Likewise. 5090169689Skan 5091169689Skan2000-03-26 Mark Mitchell <mark@codesourcery.com> 5092169689Skan 5093169689Skan * class.c (layout_empty_base): Handle empty bases with non-byte 5094169689Skan alignment. 5095169689Skan (build_base_field): Likewise. 5096169689Skan (layout_virtual_bases): Likewise. 5097169689Skan 5098169689Skan * class.c (finish_struct_1): Fix typo in this change: 5099169689Skan 5100169689Skan Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5101169689Skan 5102169689Skan2000-03-25 Mark Mitchell <mark@codesourcery.com> 5103169689Skan 5104169689Skan * decl.c (grokdeclarator): Count partial specializations when 5105169689Skan keeping track of how many template classes have been seen. 5106169689Skan 5107169689Skan * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT. 5108169689Skan 5109169689Skan2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5110169689Skan 5111169689Skan * class.c (build_vbase_pointer_fields): layout_field now place_field. 5112169689Skan (get_vfield_offset): Use byte_position. 5113169689Skan (set_rtti_entry): Set OFFSET to ssizetype zero. 5114169689Skan (get_binfo_offset_as_int): Deleted. 5115169689Skan (dfs_record_base_offsets): Use tree_low_cst. 5116169689Skan (dfs_search_base_offsets): Likewise. 5117169689Skan (layout_nonempty_base_or_field): Reflect changes in RLI format 5118169689Skan and call byte_position. 5119169689Skan (layout_empty_base): Convert offset to ssizetype. 5120169689Skan (build_base_field): use rli_size_unit_so_far. 5121169689Skan (dfs_propagate_binfo_offsets): Do computation in proper type. 5122169689Skan (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. 5123169689Skan (layout_class_type): Reflect changes in RLI names and fields. 5124169689Skan (finish_struct_1): Set DECL_FIELD_OFFSET. 5125169689Skan * dump.c (dequeue_and_dump): Call bit_position. 5126169689Skan * expr.c (cplus_expand_constant): Use byte_position. 5127169689Skan * rtti.c (expand_class_desc): Use bitsize_one_node. 5128169689Skan * typeck.c (build_component_addr): Use byte_position and don't 5129169689Skan special case for zero offset. 5130169689Skan 5131169689Skan2000-03-24 Nathan Sidwell <nathan@codesourcery.com> 5132169689Skan 5133169689Skan * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P. 5134169689Skan 5135169689Skan * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi 5136169689Skan tinfo object. 5137169689Skan (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting 5138169689Skan vtable. 5139169689Skan 5140169689Skan2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 5141169689Skan 5142169689Skan * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and 5143169689Skan DECL_P macros. 5144169689Skan * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name, 5145169689Skan make_typename_type, check_initializer, cp_finish_decl, 5146169689Skan xref_tag): Likewise. 5147169689Skan * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree, 5148169689Skan decl_namespace, arg_assoc_template_arg, arg_assoc, 5149169689Skan validate_nonmember_using_decl, do_class_using_decl): Likewise. 5150169689Skan * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of, 5151169689Skan args_to_string): Likewise. 5152169689Skan * friend.c (is_friend): Likewise. 5153169689Skan * lex.c (note_got_semicolon, note_list_got_semicolon, 5154169689Skan is_global): Likewise. 5155169689Skan * method.c (build_overload_nested_name, build_overload_value, 5156169689Skan build_qualified_name, build_qualified_name, hack_identifier): Likewise. 5157169689Skan * parse.y (typename_sub, typename_sub1): Likewise. 5158169689Skan * pt.c (push_inline_template_parms_recursive, check_template_shadow, 5159169689Skan process_partial_specialization, convert_template_argument, 5160169689Skan template_args_equal, add_pending_template, lookup_template_class, 5161169689Skan for_each_template_parm_r, maybe_fold_nontype_arg, 5162169689Skan tsubst, instantiate_template, type_unification_real, unify, 5163169689Skan instantiate_pending_templates, set_mangled_name_for_template_decl): 5164169689Skan Likewise. 5165169689Skan * repo.c (repo_get_id, repo_template_used): Likewise. 5166169689Skan * search.c (lookup_field_1): Likewise. 5167169689Skan * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise. 5168169689Skan * xref.c (classname): Likewise. 5169169689Skan 5170169689Skan2000-03-22 Mark Mitchell <mark@codesourcery.com> 5171169689Skan 5172169689Skan * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation. 5173169689Skan (CANONICAL_BINFO): New macro. 5174169689Skan (BINFO_NEW_VTABLE_MARKED): Use it. 5175169689Skan (SET_BINFO_NEW_VTABLE_MARKED): Likewise. 5176169689Skan (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise. 5177169689Skan * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE, 5178169689Skan not TREE_TYPE. 5179169689Skan (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED. 5180169689Skan (build_secondary_vtable): Likewise. 5181169689Skan (dfs_finish_vtbls): Likewise. 5182169689Skan (dfs_accumulate_vtbl_inits): Likewise. 5183169689Skan (accumulate_vtbl_inits): New function. 5184169689Skan (finish_vtbls): Make sure that virtual bases come after 5185169689Skan non-virtual bases in the vtable group. 5186169689Skan (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL. 5187169689Skan (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED. 5188169689Skan * search.c (struct vbase_info): Move definition. 5189169689Skan (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED. 5190169689Skan (unmarked_new_vtable_p): Likewise. 5191169689Skan (dfs_mark_vtable_path): Remove. 5192169689Skan (dfs_mark_new_vtable): Remove. 5193169689Skan (dfs_unmark_new_vtable): Likewise. 5194169689Skan (dfs_clear_search_slot): Likewise. 5195169689Skan (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED. 5196169689Skan (dfs_clear_vbase_slots): Likewise. 5197169689Skan (init_vbase_pointers): LIkewise. 5198169689Skan 5199169689Skan2000-03-22 Jason Merrill <jason@casey.cygnus.com> 5200169689Skan 5201169689Skan * typeck.c (type_after_usual_arithmetic_conversions): Prefer a 5202169689Skan SIZETYPE to a non-SIZETYPE. 5203169689Skan 5204169689Skan2000-03-21 Mark Mitchell <mark@codesourcery.com> 5205169689Skan 5206169689Skan * class.c (layout_virtual_bases): Adjust names in conditionally 5207169689Skan compiled code. 5208169689Skan 5209169689Skan * class.c (record_base_offsets): New function. 5210169689Skan (layout_conflict_p): Likewise. 5211169689Skan (layout_nonempty_base_or_field): Use it. 5212169689Skan (layout_empty_base): New function. 5213169689Skan (build_base_field): Use it. 5214169689Skan (build_base_fields): Update comment. 5215169689Skan (layout_virtual_bases): Fold in a little code form 5216169689Skan layout_basetypes. Use layout_empty_base. 5217169689Skan (layout_basetypes): Remove. 5218169689Skan (end_of_class): New function. 5219169689Skan (layout_class_type): Use it. Adjust. 5220169689Skan 5221169689Skan * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment. 5222169689Skan (fntype_p): Remove. 5223169689Skan * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in 5224169689Skan comment. 5225169689Skan (dfs_skip_nonprimary_vbases_markedp): Likewise. 5226169689Skan * typeck.c (fntype_p): Remove. 5227169689Skan 5228169689Skan * cp-tree.h (TI_SPEC_INFO): Remove. 5229169689Skan (CLASSTYPE_TI_SPEC_INFO): Likewise. 5230169689Skan * pt.c (process_partial_specialization): Likewise. 5231169689Skan 5232169689Skan * class.c (build_base_field): Fix thinko in computation of binfo 5233169689Skan offsets. 5234169689Skan 5235169689Skan * tree.c (mark_local_for_remap_p): Mark variables declared in 5236169689Skan TARGET_EXPRs as well. 5237169689Skan 5238169689Skan2000-03-21 Nathan Sidwell <nathan@codesourcery.com> 5239169689Skan 5240169689Skan * typeck.c (require_complete_type, complete_type, 5241169689Skan complete_type_or_else, c_sizeof, c_sizeof_nowarn, 5242169689Skan build_array_ref, convert_arguments, pointer_diff, 5243169689Skan build_x_unary_op, build_unary_op, build_c_cast, 5244169689Skan build_modify_expr): Use COMPLETE_TYPE_P etc. 5245169689Skan * call.c (is_complete, convert_like_real, 5246169689Skan build_new_method_call): Likewise. 5247169689Skan * class.c (build_vbase_pointer_fields, check_bases, 5248169689Skan build_base_field, finish_struct_1, pushclass): Likewise. 5249169689Skan * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise. 5250169689Skan * decl.c (maybe_process_template_type_declaration, pushtag, 5251169689Skan pushdecl, redeclaration_error_message, start_decl, start_decl_1, 5252169689Skan layout_var_decl, check_initializer, cp_finish_decl, 5253169689Skan grokdeclarator, require_complete_types_for_parms, 5254169689Skan grok_op_properties, xref_tag, xref_basetypes, 5255169689Skan check_function_type): Likewise. 5256169689Skan * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise. 5257169689Skan * friend.c (do_friend): Likewise. 5258169689Skan * init.c (build_offset_ref): Likewise. 5259169689Skan * parse.y (structsp): Likewise. 5260169689Skan * pt.c (maybe_process_partial_specialization, 5261169689Skan tsubst_friend_function, instantiate_class_template, tsubst, 5262169689Skan do_type_instantiation, instantiate_pending_templates): Likewise. 5263169689Skan * repo.c (repo_get_id): Likewise. 5264169689Skan * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1, 5265169689Skan synthesize_tinfo_var, emit_support_tinfos): Likewise. 5266169689Skan * search.c (lookup_fnfields_1, lookup_conversions): Likewise. 5267169689Skan * semantics.c (begin_class_definition): Likewise. 5268169689Skan * tree.c (build_cplus_method_type): Likewise. 5269169689Skan * typeck2.c (digest_init, build_functional_cast, 5270169689Skan add_exception_specifier): Likewise. 5271169689Skan * parse.h, parse.c: Regenerated. 5272169689Skan 5273169689Skan2000-03-21 Nathan Sidwell <nathan@codesourcery.com> 5274169689Skan 5275169689Skan * inc/cxxabi.h: New header file. Define new-abi entry points. 5276169689Skan (__pointer_type_info::target): Rename member to ... 5277169689Skan (__pointer_type_info::type): ... here. 5278169689Skan (__base_class_info::type): Rename member to ... 5279169689Skan (__base_class_info::base): ... here. 5280169689Skan * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h 5281169689Skan * cp-tree.h (CPTI_ABI): New global tree enumeration. 5282169689Skan (abi_node): New global tree node. 5283169689Skan * decl.c (abi_node): Document. 5284169689Skan (init_decl_processing): Initialize abi_node. 5285169689Skan * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi. 5286169689Skan (get_vmi_pseudo_type_info): Likewise. 5287169689Skan (create_tinfo_types): Likewise. 5288169689Skan (emit_support_tinfos): Likewise. 5289169689Skan * tinfo.h (cxxabi.h): Include for new-abi. 5290169689Skan Move rtti class definitions to new header file. 5291169689Skan * tinfo.cc (abi): Use the namespace. 5292169689Skan (std): Move new abi rtti classes from here ... 5293169689Skan (__cxxabiv1): ... to here. 5294169689Skan * tinfo2.cc (cxxabi.h): Include for new-abi. 5295169689Skan Move rtti class definitions to new header file. 5296169689Skan (std): Move new abi rtti classes from here ... 5297169689Skan (__cxxabiv1): ... to here. 5298169689Skan * inc/typeinfo (__class_type_info): Move into __cxxabiv1 5299169689Skan namespace. 5300169689Skan 5301169689Skan2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu> 5302169689Skan Jason Merrill <jason@casey.cygnus.com> 5303169689Skan 5304169689Skan * method.c (build_overload_int): Use host_integerp. 5305169689Skan 5306169689Skan2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 5307169689Skan 5308169689Skan * init.c (build_offset_ref): Handle the case of a templated member 5309169689Skan function. 5310169689Skan 5311169689Skan2000-03-19 Martin v. L�wis <loewis@informatik.hu-berlin.de> 5312169689Skan 5313169689Skan * except.c (expand_exception_blocks): Clear catch_clauses_last. 5314169689Skan 5315169689Skan2000-03-18 Mark Mitchell <mark@codesourcery.com> 5316169689Skan 5317169689Skan * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro. 5318169689Skan * class.c (check_bitfield_decl): Turn illegal bitfields into 5319169689Skan non-bitfields. 5320169689Skan (dfs_propagate_binfo_offsets): Adjust for new size_binop 5321169689Skan semantics. 5322169689Skan (dfs_offset_for_unshared_vbases): Likewise. 5323169689Skan * cvt.c (cp_convert_to_pointer): Convert NULL to a 5324169689Skan pointer-to-member correctly under the new ABI. 5325169689Skan * expr.c (cplus_expand_constant): Don't use cp_convert when 5326169689Skan turning an offset into a pointer-to-member. 5327169689Skan * init.c (resolve_offset_ref): Don't adjust pointers-to-members 5328169689Skan when dereferencing them under the new ABI. 5329169689Skan * typeck.c (get_member_function_from_ptrfunc): Tweak calculation 5330169689Skan of pointers-to-members under the new ABI. 5331169689Skan 5332169689Skan * class.c (check_bitfield_decl): Remove restriction on really long 5333169689Skan bitfields. 5334169689Skan (layout_class_type): Implement new ABI handling of bitfields 5335169689Skan longer than their types. 5336169689Skan 5337169689Skan2000-03-18 Martin v. L�wis <loewis@informatik.hu-berlin.de> 5338169689Skan 5339169689Skan * parse.y (extdefs): Call ggc_collect. 5340169689Skan * parse.c: Regenerated. 5341169689Skan 5342169689Skan2000-03-18 Nathan Sidwell <nathan@codesourcery.com> 5343169689Skan 5344169689Skan * class.c (build_base_field): Use TYPE_ALIGN to examine a type. 5345169689Skan (note_name_declared_in_class): Use OVL_CURRENT to get at a 5346169689Skan potential overload. 5347169689Skan 5348169689Skan2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5349169689Skan 5350169689Skan * class.c (build_vbase_path): Use integer_zerop. 5351169689Skan (build_vtable_entry): Use tree_low_cst. 5352169689Skan (get_vfield_offset): Use bit_position. 5353169689Skan (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT. 5354169689Skan Use tree_low_cst. 5355169689Skan (check_bitfield_decl): Set DECL_SIZE using convert. 5356169689Skan (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop. 5357169689Skan (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT. 5358169689Skan Use tree_low_cst. 5359169689Skan (finish_struct_1): Use bit_position. 5360169689Skan (dump_class_hierarchy): Use tree_low_cst. 5361169689Skan * cp-tree.h (min_precision): Add declaration. 5362169689Skan * decl.c (xref_tag, xref_basetypes): Use tree_low_cst. 5363169689Skan * error.c (dump_type_suffix): Use host_integerp and tree_low_cst. 5364169689Skan (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst. 5365169689Skan * expr.c (cplus_expand_constant): Use bit_position. 5366169689Skan * init.c (build_vec_init): Use host_integerp and tree_low_cst. 5367169689Skan * rtti.c (get_base_offset): Use bit_position. 5368169689Skan * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int, 5369169689Skan host_integerp, and tree_low_cst. 5370169689Skan (pointer_int_sum): Use integer_zerop. 5371169689Skan (build_component_addr): Use bit_position. 5372169689Skan 5373169689Skan2000-03-17 Nathan Sidwell <nathan@codesourcery.com> 5374169689Skan 5375169689Skan * typeck.c (require_complete_type): Don't assume size_zero_node. 5376169689Skan (complete_type_or_else): Likewise. 5377169689Skan 5378169689Skan2000-03-16 Steven Grady <grady@digitaldeck.com> 5379169689Skan Jason Merrill <jason@casey.cygnus.com> 5380169689Skan 5381169689Skan * rtti.c (build_dynamic_cast_1): Improve diagnostics. 5382169689Skan 5383169689Skan2000-03-16 Nathan Sidwell <nathan@codesourcery.com> 5384169689Skan 5385169689Skan * decl2.c (grokfield): Bail out if type is error_mark_node. 5386169689Skan 5387169689Skan2000-03-15 Nathan Sidwell <nathan@codesourcery.com> 5388169689Skan 5389169689Skan * tinfo2.cc (__ptr_to_member_data): Rename to ... 5390169689Skan (__pointer_to_member_data): ... here. Adjust. 5391169689Skan * rtti.c (create_tinfo_types): Adjust. 5392169689Skan 5393169689Skan2000-03-15 Nathan Sidwell <nathan@codesourcery.com> 5394169689Skan 5395169689Skan * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove. 5396169689Skan * decl.c (ref_desc_type_node): Undocument. 5397169689Skan * rtti.c (ptr_ref_initializer): Rename to ... 5398169689Skan (ptr_initializer): ... here. Adjust comments. 5399169689Skan (ptmd_initializer): Fix comment thinko. 5400169689Skan (synthesize_tinfo_var): Remove REFERENCE_TYPE case. 5401169689Skan (create_tinfo_types): Remove ref_desc_type_node init. 5402169689Skan * tinfo2.cc (__reference_type_info): Remove. 5403169689Skan 5404169689Skan2000-03-15 Nathan Sidwell <nathan@codesourcery.com> 5405169689Skan 5406169689Skan * decl.c (cp_finish_decl): Remove obsolete comment. 5407169689Skan 5408169689Skan * typeck.c (build_ptrmemfunc1): Kill uninitialized warning. 5409169689Skan 5410169689Skan2000-03-14 Mark Mitchell <mark@codesourcery.com> 5411169689Skan 5412169689Skan * cp-tree.h: Tweak documentation. 5413169689Skan * class.c (build_vbase_pointer_fields): Layout the fields, too. 5414169689Skan (avoid_overlap): Remove. 5415169689Skan (get_binfo_offset_as_int): New function. 5416169689Skan (dfs_serach_base_offsets): Likewise. 5417169689Skan (layout_nonempty_base_or_field): Likewise. 5418169689Skan (build_base_field): Layout fields here. Avoid placing two objects 5419169689Skan of the same type at the same address, under the new ABI. 5420169689Skan (build_base_fields): Adjust accordingly. 5421169689Skan (create_vtable_ptr): Return the new field, but don't attach it to 5422169689Skan TYPE_FIELDS. 5423169689Skan (remove_base_field): Remove. 5424169689Skan (remove_base_fields): Remove. 5425169689Skan (layout_basetypes): Adjust accordingly. 5426169689Skan (layout_class_type): Call layout_field for each field, rather than 5427169689Skan just making a wholesale call to layout_type. 5428169689Skan 5429169689Skan2000-03-14 Jeff Sturm <jsturm@sigma6.com> 5430169689Skan 5431169689Skan * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw. 5432169689Skan 5433169689Skan2000-03-13 Jason Merrill <jason@casey.cygnus.com> 5434169689Skan 5435169689Skan * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P. 5436169689Skan 5437169689Skan * except.c (dtor_nothrow): New fn. 5438169689Skan (do_pop_exception): Use it. Take type parm. 5439169689Skan (push_eh_cleanup): Take type parm. 5440169689Skan (expand_start_catch_block): Pass it. 5441169689Skan (build_eh_type_type_ref): Accept null type. 5442169689Skan 5443169689Skan2000-03-12 Mark Mitchell <mark@codesourcery.com> 5444169689Skan 5445169689Skan * cp-tree.h (revert_static_member_fn): Change prototype. 5446169689Skan * decl.c (grokfndecl): Adjust call to revert_static_member_fn. 5447169689Skan (grok_op_properties): Likewise. 5448169689Skan (start_function): Likewise. 5449169689Skan (revert_static_member_fn): Simplify. 5450169689Skan * pt.c (check_explicit_specialization): Adjust call to 5451169689Skan revert_static_member_fn. 5452169689Skan 5453169689Skan2000-03-11 Mark Mitchell <mark@codesourcery.com> 5454169689Skan 5455169689Skan * cp-tree.h (scope_kind): New type. 5456169689Skan (tmpl_spec_kind): Likewise. 5457169689Skan (declare_pseudo_global_level): Remove. 5458169689Skan (pseudo_global_level_p): Rename to template_parm_scope_p. 5459169689Skan (pushlevel): Remove declaration. 5460169689Skan (begin_scope): New function. 5461169689Skan (finish_scope): Likewise. 5462169689Skan (current_tmpl_spec_kind): Likewise. 5463169689Skan * decl.c (struct binding_level): Shorten parm_flag to 2 bits. 5464169689Skan Shorten keep to 2 bits. Rename pseudo_global to template_parms_p. 5465169689Skan Add template_spec_p. 5466169689Skan (toplevel_bindings_p): Adjust. 5467169689Skan (declare_pseudo_global_level): Remove. 5468169689Skan (pseudo_global_level_p): Rename to template_parm_scope_p. 5469169689Skan (current_tmpl_spec_kind): New function. 5470169689Skan (begin_scope): Likewise. 5471169689Skan (finish_scope): Likewise. 5472169689Skan (maybe_push_to_top_level): Adjust. 5473169689Skan (maybe_process_template_type_declaration): Likewise. 5474169689Skan (pushtag): Likewise. 5475169689Skan (pushdecl_nonclass_level): Likewise. 5476169689Skan (lookup_tag): Likewise. 5477169689Skan (grokfndecl): Handle member template specializations. Share 5478169689Skan constructor and non-constructor code. 5479169689Skan * decl2.c (check_classfn): Handle member template specializations. 5480169689Skan * pt.c (begin_template_parm_list): Use begin_scope. 5481169689Skan (begin_specialization): Likewise. 5482169689Skan (end_specialization): Likewise. 5483169689Skan (check_explicit_specialization): Use current_tmpl_spec_kind. 5484169689Skan Handle member template specializations. 5485169689Skan (end_template_decl): Use finish_scope. Remove call to 5486169689Skan get_pending_sizes. 5487169689Skan (push_template_decl_real): Remove bogus error message. 5488169689Skan (tsubst_decl): Fix typo in code contained in comment. 5489169689Skan (instantiate_template): Handle member template specializations. 5490169689Skan (most_general_template): Likewise. 5491169689Skan 5492169689Skan2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com> 5493169689Skan 5494169689Skan * lex.c (whitespace_cr): Compress consecutive calls to warning(). 5495169689Skan (do_identifier): Ditto for error(). 5496169689Skan 5497169689Skan * pt.c (convert_nontype_argument): Ditto for cp_error(). 5498169689Skan (convert_template_argument): Ditto for cp_pedwarn(). 5499169689Skan 5500169689Skan2000-03-11 Jason Merrill <jason@casey.cygnus.com> 5501169689Skan 5502169689Skan * exception.cc (__check_null_eh_spec): New fn. 5503169689Skan * except.c (expand_end_eh_spec): Call it if the spec is throw(). 5504169689Skan 5505169689Skan2000-03-10 Jason Merrill <jason@casey.cygnus.com> 5506169689Skan 5507169689Skan * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE. 5508169689Skan * except.c (expand_end_eh_spec): Add the return type. 5509169689Skan * rtti.c (throw_bad_cast): Add the parmtypes. 5510169689Skan (throw_bad_typeid): Likewise. 5511169689Skan 5512169689Skan * semantics.c (expand_stmt): Only leave out rtl for unused 5513169689Skan artificials, and set DECL_IGNORED_P on them as well. 5514169689Skan * decl.c (wrapup_globals_for_namespace): Likewise. 5515169689Skan 5516169689Skan2000-03-09 Nathan Sidwell <nathan@codesourcery.com> 5517169689Skan 5518169689Skan * decl.c (maybe_commonize_var): Skip all artificial decls. 5519169689Skan * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN. 5520169689Skan 5521169689Skan2000-03-10 Jason Merrill <jason@casey.cygnus.com> 5522169689Skan 5523169689Skan * lang-options.h, decl2.c: Add -fno-enforce-eh-specs. 5524169689Skan * cp-tree.h: Declare flag_enforce_eh_specs. 5525169689Skan * decl.c (store_parm_decls, finish_function): Check it. 5526169689Skan 5527169689Skan C library functions don't throw. 5528169689Skan * Makefile.in (cfns.h): New target. 5529169689Skan (except.o): Depend on it. 5530169689Skan * Make-lang.in (cc1plus): Depend on cfns.gperf. 5531169689Skan * cfns.gperf: New file. 5532169689Skan * cfns.h: Generated. 5533169689Skan * except.c: Include it. 5534169689Skan (nothrow_libfn_p): New fn. 5535169689Skan * decl.c (grokfndecl): Use it. 5536169689Skan * cp-tree.h: Declare it. 5537169689Skan 5538169689Skan * decl.c (push_overloaded_decl_1, auto_function, 5539169689Skan define_function): Lose. 5540169689Skan (build_library_fn_1): New static fn. 5541169689Skan (builtin_function): Use it. 5542169689Skan (get_atexit_node): Use build_library_fn_ptr. 5543169689Skan (build_library_fn, build_cp_library_fn, build_library_fn_ptr, 5544169689Skan build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn, 5545169689Skan push_void_library_fn, push_throw_library_fn): New fns. 5546169689Skan * cp-tree.h: Declare them. 5547169689Skan (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID. 5548169689Skan (throw_bad_cast_node, throw_bad_typeid_node): Lose. 5549169689Skan * except.c (init_exception_processing, call_eh_info, do_pop_exception, 5550169689Skan (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns. 5551169689Skan * rtti.c (build_runtime_decl): Lose. 5552169689Skan (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 5553169689Skan build_dynamic_cast_1, expand_si_desc, expand_class_desc, 5554169689Skan expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns. 5555169689Skan 5556169689Skan * call.c (build_call): Remove result_type parm. 5557169689Skan Call mark_used on unused artificial fns. 5558169689Skan * init.c, method.c, typeck.c, except.c, rtti.c: Adjust. 5559169689Skan 5560169689Skan2000-03-09 Jason Merrill <jason@casey.cygnus.com> 5561169689Skan 5562169689Skan * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as 5563169689Skan appropriate. 5564169689Skan * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL. 5565169689Skan * except.c (call_eh_info, alloc_eh_object, expand_throw): Set 5566169689Skan TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate. 5567169689Skan * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1, 5568169689Skan expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, 5569169689Skan expand_generic_desc): Likewise. 5570169689Skan 5571169689Skan2000-03-08 Nathan Sidwell <nathan@codesourcery.com> 5572169689Skan 5573169689Skan * exception.cc (__cp_pop_exception): Cleanup the original object. 5574169689Skan 5575169689Skan2000-03-08 Nathan Sidwell <nathan@codesourcery.com> 5576169689Skan 5577169689Skan * decl.c (grok_op_properties): Merge conversion to void warning 5578169689Skan with other silly op warnings. 5579169689Skan 5580169689Skan2000-03-08 Jason Merrill <jason@casey.cygnus.com> 5581169689Skan 5582169689Skan * typeck2.c (process_init_constructor): Set TREE_PURPOSE of 5583169689Skan array CONSTRUCTOR elements. Don't use expr_tree_cons. 5584169689Skan 5585169689Skan2000-03-08 Nathan Sidwell <nathan@codesourcery.com> 5586169689Skan 5587169689Skan * decl.c (cp_make_fname_decl): New function. 5588169689Skan (wrapup_globals_for_namespace): Don't emit unused static vars. 5589169689Skan (init_decl_processing): Remove comment about use of 5590169689Skan array_domain_type. Set make_fname_decl. 5591169689Skan (cp_finish_decl): Remove __FUNCTION__ nadgering. 5592169689Skan * semantics.c (begin_compound_stmt): Remove 5593169689Skan current_function_name_declared flagging. 5594169689Skan (expand_stmt): Don't emit unused local statics. 5595169689Skan * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls 5596169689Skan specially. 5597169689Skan 5598169689Skan2000-03-08 Nathan Sidwell <nathan@codesourcery.com> 5599169689Skan 5600169689Skan * typeck.c (convert_for_assignment): Don't look at array 5601169689Skan initializer. 5602169689Skan * call.c (convert_like_real): Likewise. 5603169689Skan 5604169689Skan2000-03-07 Jason Merrill <jason@casey.cygnus.com> 5605169689Skan 5606169689Skan Add initial support for '\uNNNN' specifier. 5607169689Skan * lex.c (read_ucs): New fn. 5608169689Skan (readescape, skip_white_space): Call it. 5609169689Skan (is_extended_char, is_extended_char_1): New fns. 5610169689Skan (utf8_extend_token): New fn, #if 0'd out. 5611169689Skan (real_yylex): Treat extended chars like letters. 5612169689Skan 5613169689Skan * search.c (note_debug_info_needed): Walk the bases even if we 5614169689Skan weren't deferring the type itself. 5615169689Skan 5616169689Skan2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5617169689Skan 5618169689Skan * decl2.c (finish_objects): Constify a char*. 5619169689Skan 5620169689Skan * method.c (emit_thunk): Likewise. 5621169689Skan 5622169689Skan2000-03-06 Nathan Sidwell <nathan@codesourcery.com> 5623169689Skan 5624169689Skan * typeck.c (dubious_conversion_warnings): Look through 5625169689Skan REFERENCE_TYPE. 5626169689Skan 5627169689Skan2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5628169689Skan 5629169689Skan * class.c (dfs_modify_vtables): I is now unsigned. 5630169689Skan (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int. 5631169689Skan (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT. 5632169689Skan * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned. 5633169689Skan * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. 5634169689Skan * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned. 5635169689Skan * typeck.c (build_binary_op, case TRUNC_DIV_EXPR): 5636169689Skan Call integer_all_onesp. 5637169689Skan * typeck2.c (process_init_constructor): Use compare_tree_int. 5638169689Skan 5639169689Skan * lang-specs.h (as): Don't call if -syntax-only. 5640169689Skan 5641169689Skan2000-03-06 Mark Mitchell <mark@codesourcery.com> 5642169689Skan 5643169689Skan * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set 5644169689Skan RTL_EXPR_HAS_NO_SCOPE after all. 5645169689Skan 5646169689Skan2000-03-05 Mark Mitchell <mark@codesourcery.com> 5647169689Skan 5648169689Skan * expr.c (cplus_expand_expr, case STMT_EXPR): Use 5649169689Skan expand_start_stmt_expr and expand_end_stmt_expr directly. Set 5650169689Skan RTL_EXPR_HAS_NO_SCOPE. 5651169689Skan 5652169689Skan * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little 5653169689Skan later. 5654169689Skan 5655169689Skan * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P. 5656169689Skan 5657169689Skan2000-03-05 Nathan Sidwell <nathan@codesourcery.com> 5658169689Skan 5659169689Skan * call.c (convert_like): Macrofy. 5660169689Skan (convert_like_with_context): New macro. 5661169689Skan (convert_like_real): Renamed from convert_like. Add calling 5662169689Skan context parameters, for diagnostics. Add recursive flag. Call 5663169689Skan dubious_conversion_warnings for outer conversion. 5664169689Skan (build_user_type_conversion): Use convert_like_with_context. 5665169689Skan (build_over_call): Likewise. Don't warn about dubious 5666169689Skan conversions here. Adjust convert_default_arg calls. 5667169689Skan (convert_default_arg): Add context parameters for diagnostics. 5668169689Skan Pass through to convert_like_with_context. 5669169689Skan * cp-tree.h (convert_default_arg): Add context parameters. 5670169689Skan (dubious_conversion_warnings): Prototype new function. 5671169689Skan * typeck.c (convert_arguments): Adjust convert_default_arg call. 5672169689Skan (dubious_conversion_warnings): New function, broken 5673169689Skan out of convert_for_assignment. 5674169689Skan (convert_for_assignment): Adjust. 5675169689Skan 5676169689Skan2000-03-03 Jason Merrill <jason@casey.cygnus.com> 5677169689Skan 5678169689Skan * decl2.c (key_method): Break out from... 5679169689Skan (import_export_vtable, import_export_class): ...here. 5680169689Skan 5681169689Skan * decl.c (finish_function): Don't mess with flag_keep_inline_functions. 5682169689Skan * decl2.c (finish_vtable_vardecl): Don't check decl_function_context. 5683169689Skan 5684169689Skan * search.c (note_debug_info_needed, dfs_debug_mark, 5685169689Skan dfs_debug_unmarkedp): Uncomment. Adjust for new scheme. 5686169689Skan * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed. 5687169689Skan 5688169689Skan2000-03-03 Nathan Sidwell <nathan@codesourcery.com> 5689169689Skan 5690169689Skan * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix 5691169689Skan typos. 5692169689Skan 5693169689Skan2000-03-02 Mark Mitchell <mark@codesourcery.com> 5694169689Skan 5695169689Skan * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ... 5696169689Skan (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this. 5697169689Skan (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro. 5698169689Skan (lang_type): Split gets_new into has_new and has_array_new. 5699169689Skan (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 5700169689Skan (TYPE_GETS_NEW): Split into ... 5701169689Skan (TYPE_HAS_NEW_OPERATOR): ... this, and ... 5702169689Skan (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this. 5703169689Skan (DECL_ARRAY_DELETE_OPERATOR_P): New macro 5704169689Skan (build_op_new_call): Don't declare. 5705169689Skan (build_new_1): Likewise. 5706169689Skan * call.c (build_op_new_call): Remove. 5707169689Skan * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR 5708169689Skan instead of TYPE_NEEDS_DESTRUCTOR. 5709169689Skan (finish_struct_bits): Likewise. 5710169689Skan (add_implicitly_declared_members): Likewise. 5711169689Skan (check_field_decl): Likewise. 5712169689Skan (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it 5713169689Skan correctly under the new ABI. 5714169689Skan * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR 5715169689Skan instead of TYPE_NEEDS_DESTRUCTOR. 5716169689Skan (initialize_local_var): Likewise. 5717169689Skan (destroy_local_var): Likewise. 5718169689Skan (cp_finish_decl): Likewise. 5719169689Skan (register_dtor_fn): Likewise. 5720169689Skan (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and 5721169689Skan TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set 5722169689Skan TYPE_VEC_DELETE_TAKES_SIZE here. 5723169689Skan (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and 5724169689Skan TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. 5725169689Skan (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 5726169689Skan (finish_destructor_body): Likewise. 5727169689Skan (maybe_build_cleanup_1): Likewise. 5728169689Skan * decl2.c (do_static_destruction): Likewise. 5729169689Skan * init.c (build_new_1): Make it static. 5730169689Skan (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 5731169689Skan (expand_cleanup_for_base): Likewise. 5732169689Skan (get_cookie_size): New function. 5733169689Skan (build_new_1): Handle array-new cookies correctly under the new 5734169689Skan ABI. 5735169689Skan (build_vec_delete_1): Likewise. 5736169689Skan (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 5737169689Skan (build_delete): Likewise. 5738169689Skan (build_vec_delete): Handle array-new cookies correctly under the new 5739169689Skan ABI. 5740169689Skan * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 5741169689Skan * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and 5742169689Skan TYPE_HAS_ARRAY_NEW_OPERATOR. 5743169689Skan * ptree.c (print_lang_type): Check them. 5744169689Skan * search.c (context_for_name_lookup): Fix typo in comment. 5745169689Skan (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 5746169689Skan * tree.c (break_out_cleanups): Likewise. 5747169689Skan (build_cplus_array_test_1): Likewise. 5748169689Skan (cp_build_qualified_type_real): Likewise. 5749169689Skan * typeck.c (complete_type): Likewise. 5750169689Skan 5751169689Skan * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of 5752169689Skan the command-line, not the end. 5753169689Skan 5754169689Skan2000-03-01 Jason Merrill <jason@casey.cygnus.com> 5755169689Skan 5756169689Skan * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG. 5757169689Skan 5758169689Skan2000-03-02 Tom Tromey <tromey@cygnus.com> 5759169689Skan 5760169689Skan * cp-tree.h (build_java_class_ref): Declare. 5761169689Skan * init.c (build_java_class_ref): No longer static. 5762169689Skan * except.c (expand_throw): Generate a Java-style `throw' if the 5763169689Skan thrown object is a "Java" object. 5764169689Skan (initialize_handler_parm): Generate a Java-style lookup of 5765169689Skan exception info if the caught object is a "Java" object. 5766169689Skan (catch_language, catch_language_init): New globals. 5767169689Skan (decl_is_java_type): New function. 5768169689Skan (expand_start_catch_block): Don't call push_eh_info() or 5769169689Skan push_eh_cleanup() when handling a Java-style "catch". Pass Java 5770169689Skan class reference to build_catch_block. 5771169689Skan 5772169689Skan2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5773169689Skan 5774169689Skan * typeck.c (comptypes): Treat sizetype like its language equivalent. 5775169689Skan 5776169689Skan2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk> 5777169689Skan 5778169689Skan * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize 5779169689Skan to merge reference/pointer code and fix incorrect warnings. 5780169689Skan 5781169689Skan2000-02-29 Jason Merrill <jason@casey.cygnus.com> 5782169689Skan 5783169689Skan * search.c (protected_accessible_p): Use context_for_name_lookup. 5784169689Skan 5785169689Skan * init.c (construct_virtual_bases): Fix thinko. 5786169689Skan * typeck.c (expand_ptrmemfunc_cst): Fix thinko. 5787169689Skan 5788169689Skan2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de> 5789169689Skan 5790169689Skan * decl.c (current_function_decl): Move to toplev.c. 5791169689Skan 5792169689Skan2000-02-29 Nathan Sidwell <nathan@codesourcery.com> 5793169689Skan 5794169689Skan * pt.c (fn_type_unification): Unify return type, whenever 5795169689Skan provided. 5796169689Skan (get_bindings_real): Only pass return type when necessary. 5797169689Skan Remove explicit return type check. 5798169689Skan * class.c (resolve_address_of_overloaded_function): Pass desired 5799169689Skan return type to fn_type_unification. 5800169689Skan 5801169689Skan2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5802169689Skan 5803169689Skan * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear 5804169689Skan DECL_FIELD_SIZE. 5805169689Skan (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not 5806169689Skan DECL_FIELD_SIZE. 5807169689Skan * rtti.c (expand_class_desc): Likewise. 5808169689Skan * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. 5809169689Skan (THUNK_VCALL_OFFSET): Likewise. 5810169689Skan (THUNK_DELTA): Reflect changes in ../tree.h. 5811169689Skan 5812169689Skan2000-02-28 Jason Merrill <jason@casey.cygnus.com> 5813169689Skan 5814169689Skan * search.c (protected_accessible_p): Also allow the access if 5815169689Skan the member is public in DERIVED. Lose TYPE parm. 5816169689Skan (friend_accessible_p): Lose TYPE parm. 5817169689Skan (accessible_p): Adjust. 5818169689Skan 5819169689Skan2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5820169689Skan 5821169689Skan * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop 5822169689Skan on things that are not sizes; ssize_binop deleted. 5823169689Skan Call size_diffop when appropriate. 5824169689Skan (dfs_build_vcall_offset_vtbl_entries): Likewise. 5825169689Skan (build_primary_vtable, build_secondary_vtable): Likewise. 5826169689Skan (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise. 5827169689Skan Variable I is HOST_WIDE_INT. 5828169689Skan (get_vfield_offset): Pass proper types to size_binop. 5829169689Skan (size_extra_vtbl_entries, layout_virtual_bases): Likewise. 5830169689Skan (finish_struct_1): Likewise. 5831169689Skan (skip_rtti_stuff): Arg N is now pointer to signed. 5832169689Skan (layout_class_type): Use size_zero_node. 5833169689Skan * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed. 5834169689Skan * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop. 5835169689Skan * decl.c (complete_arry_type): Pass proper types to size_binop. 5836169689Skan (xref_basetypes): BINFO_OFFSET is sizetype. 5837169689Skan * error.c (dump_expr): Don't use size_binop non-sizes. 5838169689Skan * expr.c (cplus_expand_constant): Pass proper types to size_binop. 5839169689Skan * init.c (construct_virtual_bases): Fix type error. 5840169689Skan (build_vec_delete_1): Pass proper type to size_binop and don't 5841169689Skan fold result. 5842169689Skan * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype. 5843169689Skan * rtti.c (get_base_offset): Pass proper type to size_binop. 5844169689Skan * search.c (dfs_find_vbases): Fix type error. 5845169689Skan (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed. 5846169689Skan (dfs_get_vbase_types): BINFO_OFFSET is sizetype. 5847169689Skan * tree.c (debug_binfo): Variable N is signed. 5848169689Skan Use HOST_WIDE_INT_PRINT_DEC. 5849169689Skan * typeck.c (comptypes): sizetype is same as equivalent integer type. 5850169689Skan (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT, 5851169689Skan size_one_node and size_zero_node. 5852169689Skan (c_alignof): Use size_one_node. 5853169689Skan (build_component_addr): Pass proper types to size_binop. 5854169689Skan (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes. 5855169689Skan 5856169689Skan2000-02-26 Jason Merrill <jason@casey.cygnus.com> 5857169689Skan 5858169689Skan Implement class scope using-declarations for functions. 5859169689Skan * class.c (handle_using_decl): Call add_method for used functions. 5860169689Skan Use IDENTIFIER_CLASS_VALUE to check for conflicts. 5861169689Skan (add_method): Used functions are hidden by local functions. 5862169689Skan (check_bases_and_members): Handle using-decls before finalizing 5863169689Skan CLASSTYPE_METHOD_VEC. 5864169689Skan * call.c (add_function_candidate): Add ctype parm; if nonzero, 5865169689Skan override the type of 'this' accordingly. 5866169689Skan (add_template_candidate, add_template_candidate_real): Add ctype parm. 5867169689Skan (convert_class_to_reference, build_user_type_conversion_1, 5868169689Skan build_new_function_call, build_object_call, build_new_op, 5869169689Skan build_new_method_call): Pass ctype parm. 5870169689Skan 5871169689Skan * search.c (lookup_member): Put rval_binfo, not basetype_path, in 5872169689Skan the baselink. 5873169689Skan * call.c (convert_class_to_reference, build_user_type_conversion_1, 5874169689Skan build_new_function_call, build_object_call, build_new_op, 5875169689Skan build_new_method_call, build_op_delete_call): Don't get basetype_path 5876169689Skan from a baselink. 5877169689Skan * typeck.c (build_component_ref): Likewise. 5878169689Skan * init.c (build_offset_ref): Likewise. 5879169689Skan (resolve_offset_ref): Don't call enforce_access. 5880169689Skan Call build_scoped_ref. 5881169689Skan * typeck2.c (build_scoped_ref): Simplify. Do nothing if it 5882169689Skan would cause an error or if -pedantic. 5883169689Skan * class.c (alter_access): Lose binfo parm. 5884169689Skan 5885169689Skan2000-02-26 Mark Mitchell <mark@codesourcery.com> 5886169689Skan 5887169689Skan * semantics.c (simplify_aggr_init_exprs_p): Don't walk into 5888169689Skan types. 5889169689Skan 5890169689Skan2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at> 5891169689Skan 5892169689Skan * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info 5893169689Skan pseudo_type_info creation into the std namespace 5894169689Skan 5895169689Skan2000-02-26 Mark Mitchell <mark@codesourcery.com> 5896169689Skan 5897169689Skan * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF. 5898169689Skan (import_export_class): Remove declaration. 5899169689Skan * decl2.c (import_export_class): Make it static. 5900169689Skan * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR, 5901169689Skan PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, 5902169689Skan EXPR_WITH_FILE_LOCATION. 5903169689Skan * lex.c (check_newline): Tweak filename/lineno setting. 5904169689Skan * semantics.c (begin_while_stmt): Fix typo in comment. 5905169689Skan 5906169689Skan2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5907169689Skan 5908169689Skan * lang-options.h (-fmessage-length=): Add missing option. 5909169689Skan 5910169689Skan * Make-lang.in (CXX_SRCS): Add .h files and sort list. 5911169689Skan 5912169689Skan2000-02-26 Zack Weinberg <zack@wolery.cumb.org> 5913169689Skan 5914169689Skan * Make-lang.in: Delete refs to LIBGCC2_DEPS. 5915169689Skan 5916169689Skan2000-02-25 Jim Wilson <wilson@cygnus.com> 5917169689Skan 5918169689Skan * optimize.c (expand_call_inline): Emit the return label before 5919169689Skan evaluating the return value. 5920169689Skan 5921169689Skan2000-02-24 Mark Mitchell <mark@codesourcery.com> 5922169689Skan 5923169689Skan * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather 5924169689Skan than duplicating functionality here. 5925169689Skan * optimize.c: Include input.h. 5926169689Skan (expand_call_inline): Use push_srcloc and pop_srcloc. 5927169689Skan * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note. 5928169689Skan * parse.c: Regenerated. 5929169689Skan * Makefile.in (lex.o): Depend on input.h. 5930169689Skan (optimize.o): Likewise. 5931169689Skan 5932169689Skan2000-02-24 Nathan Sidwell <nathan@codesourcery.com> 5933169689Skan 5934169689Skan * decl.c (grokdeclarator): Diagnose qualifiers on non-member 5935169689Skan function type, rather than ICE. 5936169689Skan 5937169689Skan2000-02-23 Jason Merrill <jason@casey.cygnus.com> 5938169689Skan 5939169689Skan * decl.c (grokdeclarator): Call decl_type_access_control. 5940169689Skan * parse.y (parse_end_decl): Don't call decl_type_access_control if 5941169689Skan decl is null. 5942169689Skan 5943169689Skan2000-02-23 Nathan Sidwell <nathan@codesourcery.com> 5944169689Skan 5945169689Skan * decl.c (decls_match): Remove obsolete static member nadgering. 5946169689Skan 5947169689Skan2000-02-21 Martin v. L�wis <loewis@informatik.hu-berlin.de> 5948169689Skan 5949169689Skan * decl.c (grokdeclarator): Change ANSI to ISO. 5950169689Skan * lex.c (consume_string, readescape, do_identifier): Likewise. 5951169689Skan (parse_float, real_yylex): Likewise. 5952169689Skan * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise. 5953169689Skan (unary_expr, new_initializer, cast_expr, primary, primary_no_id, 5954169689Skan new_type_id, maybe_label_decls, simple_stmt, 5955169689Skan for.init.statement): Likewise. 5956169689Skan * pt.c (do_decl_instantiation, do_type_instantiation): Likewise. 5957169689Skan * semantics.c (finish_named_return_value): Likewise. 5958169689Skan * parse.c: Regenerate. 5959169689Skan 5960169689Skan2000-02-21 Mark Mitchell <mark@codesourcery.com> 5961169689Skan 5962169689Skan * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro. 5963169689Skan (CPTI_CLASS_STAR_TYPE): Remove. 5964169689Skan (vtable_index_type): Likewise. 5965169689Skan (class_star_type_node): Remove. 5966169689Skan (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI. 5967169689Skan (build_binary_op_nodefault): Remove. 5968169689Skan * call.c (build_new_op): Use build_binary_op instead of 5969169689Skan build_binary_op_nodefault. 5970169689Skan * decl.c (init_decl_processing): Remove class_star_type_node 5971169689Skan initialization. Make delta_type_node ptrdiff_type_node under the 5972169689Skan new ABI. Initialize vtable_index_type. 5973169689Skan (build_ptrmemfunc_type): Build different structures for the new 5974169689Skan ABI. 5975169689Skan (build_enumerator): Use build_binary_op instead of 5976169689Skan build_binary_op_nodefault. 5977169689Skan * method.c (build_overload_value): Mangle pointers-to-members 5978169689Skan appropriately under the new ABI. 5979169689Skan * typeck.c (build_array_ref): Use build_binary_op instead of 5980169689Skan build_binary_op_nodefault. 5981169689Skan (get_member_function_from_ptrfunc): Adjust for the new ABI. 5982169689Skan (build_binary_op_nodefault): Rename to ... 5983169689Skan (build_binary_op): ... this. Remove old version. Adjust for 5984169689Skan pointer-to-member comparisons under the new ABI. 5985169689Skan (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI. 5986169689Skan (build_ptrmemfunc): Adjust for the new ABI. 5987169689Skan (expand_ptrmemfunc_cst): Likewise. 5988169689Skan (delta2_from_ptrmemfunc): Assert that we're not using the new ABI. 5989169689Skan (pfn_from_ptrmemfunc): Adjust for the new ABI. 5990169689Skan 5991169689Skan2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com> 5992169689Skan 5993169689Skan * call.c (build_object_call): Compress consecutive calls to 5994169689Skan cp_error. 5995169689Skan (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'. 5996169689Skan (build_op_delete_call): Adjust message formatting. 5997169689Skan 5998169689Skan * class.c (check_bases): Compress consecutive calls to 5999169689Skan cp_pedwarn. 6000169689Skan (finish_struct_anon): Say 'ISO C++'. 6001169689Skan 6002169689Skan * decl.c (start_decl): Same here. 6003169689Skan (grok_reference_init): Likewise. 6004169689Skan (grokfndecl): Correct message formatting. 6005169689Skan (grokfndecl): Improve diagnostic. 6006169689Skan (check_static_variable_definition): Likewise. Say 'ISO C++' 6007169689Skan (compute_array_index_type): Say 'ISO C++' 6008169689Skan (create_array_type_for_decl): Compress consecutive calls to 6009169689Skan cp_error. 6010169689Skan (grokdeclarator): Say 'ISO C++' 6011169689Skan (grok_op_properties): Likewise. 6012169689Skan 6013169689Skan * decl2.c (delete_sanity): Clairify diagnostic. 6014169689Skan (check_member_template): Same here. 6015169689Skan (grok_function_init): Use consistent terminology. 6016169689Skan 6017169689Skan * expr.c (do_case): Say 'ISO C++' 6018169689Skan 6019169689Skan * friend.c (do_friend): Compress consecutive calls to warning. 6020169689Skan 6021169689Skan2000-02-20 Mark Mitchell <mark@codesourcery.com> 6022169689Skan 6023169689Skan * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro. 6024169689Skan * class.c (build_secondary_vtable): Reorganize. Don't create a 6025169689Skan new vtable under the new ABI. 6026169689Skan (layout_vtable_decl): Don't add num_extra_vtbl_entries when 6027169689Skan computing the size. 6028169689Skan (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return 6029169689Skan the initializing elements. 6030169689Skan (initialize_vtable): New function. 6031169689Skan (dfs_finish_vtbls): Use it. 6032169689Skan (dfs_accumulate_vtbl_inits): New function. 6033169689Skan (finish_vtbls): Merge primary and secondary vtables under the new 6034169689Skan ABI. 6035169689Skan (finish_struct_1): Remove redundant call to layout_vtable_decl. 6036169689Skan * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that 6037169689Skan aren't VAR_DECLs. 6038169689Skan 6039169689Skan * class.c (build_vtable): New function, split out from ... 6040169689Skan (get_vtable_decl): ... here, and ... 6041169689Skan (build_secondary_vtable): ... here. 6042169689Skan 6043169689Skan * pt.c (tsubst_decl): Fix formatting. 6044169689Skan 6045169689Skan2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 6046169689Skan 6047169689Skan * class.c (build_primary_vtable, layout_vtable_decl): Likewise. 6048169689Skan (avoid_overlap, build_base_field): Likewise. 6049169689Skan (build_base_field, build_base_fields, is_empty_class): 6050169689Skan Test DECL_SIZE with integer_zero. 6051169689Skan (layout_class_type): Set CLASSTYPE_SIZE_UNIT. 6052169689Skan * cp-tree.h (struct lang_type): New field size_unit. 6053169689Skan (CLASSTYPE_SIZE_UNIT): New macro. 6054169689Skan * decl.c (init_decl_processing): Set DECL_SIZE_UNIT. 6055169689Skan (cp_finish_decl): Delete -Wlarger-than processing. 6056169689Skan * optimize.c (remap_decl): Walk DECL_SIZE_UNIT. 6057169689Skan * pt.c (tsubst_decl): Set DECL_SIZE_UNIT. 6058169689Skan * tree.c (make_binfo): binfo vector is one entry longer. 6059169689Skan (walk_tree): Walk DECL_SIZE_UNIT. 6060169689Skan 6061169689Skan2000-02-19 Mark Mitchell <mark@codesourcery.com> 6062169689Skan 6063169689Skan * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in 6064169689Skan comment. 6065169689Skan (build_vtable_entry): Don't assume all vtable entries are 6066169689Skan functions. 6067169689Skan (build_vtbl_initializer): Adjust accordingly. 6068169689Skan (get_vtable_decl): Fix formatting. 6069169689Skan 6070169689Skan2000-02-18 Jason Merrill <jason@casey.cygnus.com> 6071169689Skan 6072169689Skan * semantics.c (deferred_type_access_control): Walk the entire 6073169689Skan type_lookups list. 6074169689Skan (save_type_access_control): Rename from 6075169689Skan initial_deferred_type_access_control. Just remember the value. 6076169689Skan (decl_type_access_control): New fn. 6077169689Skan (begin_function_definition): Use deferred_type_access_control, after 6078169689Skan we've started the function. Set type_lookups to error_mark_node. 6079169689Skan * parse.y (frob_specs, fn.def1): Adjust. 6080169689Skan (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns. 6081169689Skan (parse_end_decl, parse_bitfield0, parse_method): New fns. 6082169689Skan (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them. 6083169689Skan (after_type_component_declarator0): Likewise. 6084169689Skan (after_type_component_declarator): Likewise. 6085169689Skan (notype_component_declarator): Likewise. 6086169689Skan * cp-tree.h: Adjust. 6087169689Skan 6088169689Skan * decl.c (redeclaration_error_message): Allow redeclaration of 6089169689Skan namespace-scope decls. 6090169689Skan 6091169689Skan2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de> 6092169689Skan 6093169689Skan * typeck2.c (my_friendly_abort): Use GCCBUGURL. 6094169689Skan 6095169689Skan2000-02-17 Mark Mitchell <mark@codesourcery.com> 6096169689Skan 6097169689Skan * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT. 6098169689Skan * decl2.c (grokclassfn): Likewise. 6099169689Skan 6100169689Skan * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS. 6101169689Skan 6102169689Skan * decl2.c (lang_decode_option): Don't set default message length 6103169689Skan here. 6104169689Skan * lex.c (lang_init_options): Set it here. 6105169689Skan 6106169689Skan2000-02-16 Mark Mitchell <mark@codesourcery.com> 6107169689Skan 6108169689Skan Make DECL_CONTEXT mean the class in which a member function was 6109169689Skan declared, even for a virtual function. 6110169689Skan * cp-tree.h (DECL_CLASS_CONTEXT): Adjust. 6111169689Skan (DECL_FRIEND_CONTEXT): New macro. 6112169689Skan (DECL_REAL_CONTEXT): Remove. 6113169689Skan (SET_DECL_FRIEND_CONTEXT): Likewise. 6114169689Skan (DECL_VIRTUAL_CONTEXT): Adjust. 6115169689Skan (DECL_CLASS_SCOPE_P): Use TYPE_P. 6116169689Skan (add_friends): Remove. 6117169689Skan (hack_decl_function_context): Likewise. 6118169689Skan * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with 6119169689Skan CP_DECL_CONTEXT. 6120169689Skan (build_over_call): Fix indentation. Use DECL_CONTEXT 6121169689Skan instead of DECL_CLASS_CONTEXT. 6122169689Skan * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise. 6123169689Skan (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. 6124169689Skan (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 6125169689Skan (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT. 6126169689Skan (build_base_field): Likewise. 6127169689Skan (finish_struct_1): Likewise. 6128169689Skan (build_self_reference): Likewise. 6129169689Skan * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not 6130169689Skan DECL_REAL_CONTEXT. 6131169689Skan (pushtag): Use decl_function_context, not 6132169689Skan hack_decl_function_context. 6133169689Skan (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 6134169689Skan (duplicate_decls): Use DECL_VIRTUAL_CONTEXT. 6135169689Skan (pushdecl): Remove bogus code. 6136169689Skan (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT. 6137169689Skan (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 6138169689Skan (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 6139169689Skan Use decl_function_context, nothack_decl_function_context. 6140169689Skan (grokvardecl): Don't set DECL_CLASS_CONTEXT. 6141169689Skan (grokdeclarator): Likewise. Use decl_function_context, not 6142169689Skan hack_decl_function_context. 6143169689Skan (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT. 6144169689Skan (start_function): Use DECL_FRIEND_CONTEXT, not 6145169689Skan DECL_CLASS_CONTEXT. Use decl_function_context, not 6146169689Skan hack_decl_function_context. 6147169689Skan (finish_function): Use decl_function_context, not 6148169689Skan hack_decl_function_context. 6149169689Skan (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not 6150169689Skan DECL_CLASS_CONTEXT. 6151169689Skan (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT. 6152169689Skan (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT. 6153169689Skan (grokfield): Likewise. 6154169689Skan (finish_builtin_type): Likewise. 6155169689Skan (finish_vtable_vardec): Use decl_function_context, not 6156169689Skan hack_decl_function_context. 6157169689Skan (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 6158169689Skan (start_static_initialization_or_destruction): Likewise. 6159169689Skan (finish_static_initialization_or_destruction): Likewise. 6160169689Skan (mark_used): Adjust logic for deciding when to synthesize methods. 6161169689Skan * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not 6162169689Skan DECL_REAL_CONTEXT. 6163169689Skan * error.c (dump_function_decl): Use DECL_CONTEXT, not 6164169689Skan DECL_CLASS_CONTEXT. 6165169689Skan * friend.c (is_friend): Likewise. 6166169689Skan (add_friends): Remove. 6167169689Skan (do_friend): Use SET_DECL_FRIEND_CONTEXT. 6168169689Skan * lex.c (begin_definition_of_inclass_inline): Use 6169169689Skan decl_function_context, not hack_decl_function_context. 6170169689Skan (process_next_inline): Likewise. 6171169689Skan (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 6172169689Skan * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not 6173169689Skan DECL_CLASSS_CONTEXT. 6174169689Skan (hack_identifier): Likewise. 6175169689Skan (synthesize_method): Use decl_function_context, not 6176169689Skan hack_decl_function_context. 6177169689Skan * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not 6178169689Skan DECL_REAL_CONTEXT. 6179169689Skan (is_member_template): Use decl_function_context, not 6180169689Skan hack_decl_function_context. Use DECL_CONTEXT, not 6181169689Skan DECL_CLASS_CONTEXT. 6182169689Skan (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 6183169689Skan DECL_CLASS_CONTEXT. 6184169689Skan (check_default_tmpl_args): Use CP_DECL_CONTEXT, not 6185169689Skan DECL_REAL_CONTEXT. 6186169689Skan (push_template_decl_real): Likewise. 6187169689Skan (instantiate_class_template): Don't call add_friends. 6188169689Skan (tsubst_default_argument): Use DECL_CONTEXT, not 6189169689Skan DECL_REAL_CONTEXT. 6190169689Skan (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. 6191169689Skan Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 6192169689Skan (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not 6193169689Skan DECL_CLASS_CONTEXT. 6194169689Skan * repo.c (repo_inline_used): Likewise. 6195169689Skan * search.c (current_scope): Adjust for new _CONTEXT macros. 6196169689Skan (context_for_name_lookup): Use CP_DECL_CONTEXT, not 6197169689Skan DECL_REAL_CONTEXT. 6198169689Skan (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 6199169689Skan (lookup_fnfields_here):Likewise. 6200169689Skan (check_final_overrider): Likewise. 6201169689Skan (init_vbase_pointers): Likewise. 6202169689Skan (virtual_context): Likewise. 6203169689Skan * semantics.c (finish_member_declaration): Just set DECL_CONTEXT. 6204169689Skan (expand_body): Use decl_function_context, not 6205169689Skan hack_decl_function_context. 6206169689Skan * tree.c (hack_decl_function_context): Remove. 6207169689Skan * typeck.c (build_x_function_call): Use DECL_CONTEXT, not 6208169689Skan DECL_CLASS_CONTEXT. 6209169689Skan * typeck2.c (error_not_base_type): Likewise. 6210169689Skan 6211169689Skan2000-02-15 Jason Merrill <jason@casey.cygnus.com> 6212169689Skan 6213169689Skan * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE. 6214169689Skan 6215169689Skan2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6216169689Skan 6217169689Skan * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h. 6218169689Skan 6219169689Skan2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk> 6220169689Skan 6221169689Skan * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec. 6222169689Skan 6223169689Skan2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com> 6224169689Skan 6225169689Skan * decl2.c (lang_decode_option): Enable automatic line wrapping. 6226169689Skan 6227169689Skan2000-02-13 Jason Merrill <jason@casey.cygnus.com> 6228169689Skan 6229169689Skan * parse.y (frob_specs): Split out... 6230169689Skan (parse_decl): From here. 6231169689Skan (fn.def2): Call initial_deferred_type_access_control. 6232169689Skan (after_type_component_declarator0): Call frob_specs. 6233169689Skan (notype_component_declarator0): Likewise. 6234169689Skan * search.c (friend_accessible_p): Nested classes are friends of their 6235169689Skan enclosing classes. 6236169689Skan 6237169689Skan2000-02-10 Mark Mitchell <mark@codesourcery.com> 6238169689Skan 6239169689Skan * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be 6240169689Skan used to create an implicit temporary. 6241169689Skan 6242169689Skan * class.c (dfs_modify_vtables): Tweak calculation of functions to 6243169689Skan override. 6244169689Skan 6245169689Skan2000-02-08 Nathan Sidwell <nathan@acm.org> 6246169689Skan 6247169689Skan * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to 6248169689Skan strip array element qualifiers too. 6249169689Skan 6250169689Skan2000-02-07 Mark Mitchell <mark@codesourcery.com> 6251169689Skan 6252169689Skan * decl.c (store_parm_decls): Don't build cleanups for parameters 6253169689Skan while processing_template_decl. 6254169689Skan 6255169689Skan2000-02-07 Jason Merrill <jason@casey.cygnus.com> 6256169689Skan 6257169689Skan * cp-tree.h (struct saved_scope): Add incomplete field. 6258169689Skan (namespace_scope_incomplete): New macro. 6259169689Skan * decl.c (pushdecl): Use it. 6260169689Skan (hack_incomplete_structures): Use it. See through artificial 6261169689Skan binding levels. 6262169689Skan (mark_saved_scope): Mark it. 6263169689Skan 6264169689Skan Implement access control for nested types. 6265169689Skan * search.c (type_access_control): New fn. 6266169689Skan (accessible_p): Now we do perform access control for types. 6267169689Skan * semantics.c (deferred_type_access_control): New fn. 6268169689Skan (initial_deferred_type_access_control): New fn. 6269169689Skan (begin_function_definition): Call it. Add lookups parm. 6270169689Skan * decl.c (struct binding_level): Add this_class field. 6271169689Skan (pushlevel_class): Set it. 6272169689Skan (mark_binding_level): Mark it. 6273169689Skan (lookup_name_real): Use it. Call type_access_control. 6274169689Skan (mark_saved_scope): Mark lookups field. 6275169689Skan * cp-tree.h (flagged_type_tree): Add lookups field. 6276169689Skan (struct saved_scope): Add lookups field. 6277169689Skan (type_lookups): New macro. 6278169689Skan * parse.y (declmods): Now <ftype>. 6279169689Skan (parse_decl): Add lookups parm. Call 6280169689Skan initial_deferred_type_access_control. 6281169689Skan (lang_extdef): Clear type_lookups. 6282169689Skan (typed_declspecs, declmods, typespec): Set lookups field. 6283169689Skan (initdcl): Call deferred_type_access_control. 6284169689Skan (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0, 6285169689Skan component_decl_1, named_parm): Adjust. 6286169689Skan * friend.c (is_friend): Nested classes are friends of their 6287169689Skan enclosing classes. 6288169689Skan 6289169689Skan * class.c (currently_open_derived_class): New fn. 6290169689Skan * method.c (hack_identifier): Use it. 6291169689Skan 6292169689Skan * lex.c (do_identifier): Remove obsolete code. 6293169689Skan 6294169689Skan * parse.y (typed_typespecs): Propagate new_type_flag properly. 6295169689Skan 6296169689Skan2000-02-05 Zack Weinberg <zack@wolery.cumb.org> 6297169689Skan 6298169689Skan * tinfo.h: Remove apostrophes from C++ comment (xgettext 6299169689Skan thinks this file is plain C). 6300169689Skan 6301169689Skan2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6302169689Skan 6303169689Skan * Makefile.in (call.o): Depend on $(EXPR_H). 6304169689Skan 6305169689Skan * call.c: Include "expr.h". 6306169689Skan 6307169689Skan * class.c (dump_class_hierarchy): Add prototype. 6308169689Skan 6309169689Skan * search.c (dfs_get_pure_virtuals): Likewise. 6310169689Skan 6311169689Skan2000-02-1 Ulrich Drepper <drepper@redhat.com> 6312169689Skan 6313169689Skan * parse.y (simple_stmt): Allow :: token in asm parameter list. 6314169689Skan * parse.c: Rebuilt. 6315169689Skan 6316169689Skan2000-01-31 Jim Wilson <wilson@cygnus.com> 6317169689Skan 6318169689Skan * class.c (build_vtbl_or_vbase_field): New parameter fcontext. 6319169689Skan Store it in DECL_FCONTEXT. 6320169689Skan (build_vbase_pointer_fields, create_vtable_ptr): Fix callers. 6321169689Skan 6322169689Skan2000-01-31 Jason Merrill <jason@casey.cygnus.com> 6323169689Skan 6324169689Skan * tinfo.h (old abi): #include "tconfig.h". 6325169689Skan * tinfo.cc (convert_to_base): Move into old abi section. 6326169689Skan 6327169689Skan2000-01-31 Mark Mitchell <mark@codesourcery.com> 6328169689Skan 6329169689Skan * cp-tree.h (BINFO_VIRTUALS): Tweak documentation. 6330169689Skan (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO. 6331169689Skan (BINFO_PRIMARY_BINFO): New macro. 6332169689Skan (BF_DELTA): Rename to ... 6333169689Skan (BV_DELTA): ... this. 6334169689Skan (BF_VCALL_INDEX): Rename to ... 6335169689Skan (BV_VCALL_INDEX): ... this. 6336169689Skan (BF_FN): Rename to ... 6337169689Skan (BV_FN): ... this. 6338169689Skan * class.c (build_vbase_path): Adjust for changes to reverse_path. 6339169689Skan (set_rtti_entry): Rename BF_ macros to BV_ variants. 6340169689Skan (modify_vtable_entry): Simplify. 6341169689Skan (add_virtual_function): Rename BF_ macros to BV_ variants. 6342169689Skan (build_vtable_initializer): Likewise. 6343169689Skan (get_class_offset_1): Remove. 6344169689Skan (dfs_get_class_offset): Likewise. 6345169689Skan (get_class_offset): Likewise. 6346169689Skan (dfs_find_final_overrider): New function. 6347169689Skan (find_final_overrider): Likewise. 6348169689Skan (modify_one_vtable): Remove. 6349169689Skan (dfs_find_base): New function. 6350169689Skan (dfs_modify_vtables): Fold modify_one_vtable in here. Use 6351169689Skan find_final_overrider. 6352169689Skan (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new 6353169689Skan virtuals. 6354169689Skan (dfs_fixup_vtable_deltas): Remove. 6355169689Skan (override_one_vtable): Remove. 6356169689Skan (merge_overrides): Likewise. 6357169689Skan (layout_virtual_bases): Make sure BINFO_OFFSET is set right for 6358169689Skan unreal chilren of virtual bases. 6359169689Skan (finish_struct_1): Don't use merge_overrides. Don't use 6360169689Skan dfs_fixup_vtable_deltas. 6361169689Skan * tree.c (reverse_path): Return a TREE_LIST, not a chain of 6362169689Skan BINFOs. 6363169689Skan 6364169689Skan2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> 6365169689Skan Jason Merrill <jason@yorick.cygnus.com> 6366169689Skan 6367169689Skan * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT. 6368169689Skan 6369169689Skan2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at> 6370169689Skan 6371169689Skan * exception.cc (__throw_bad_typeid): Add missing std::. 6372169689Skan 6373169689Skan2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6374169689Skan 6375169689Skan * cp-tree.h (make_thunk): PROTO -> PARAMS. 6376169689Skan 6377169689Skan2000-01-31 Nathan Sidwell <sidwell@codesourcery.com> 6378169689Skan 6379169689Skan * cp-tree.h (new_abi_rtti_p): Use flag_new_abi. 6380169689Skan 6381169689Skan Runtime support for new-abi rtti. 6382169689Skan * inc/typeinfo (type_info::operator!=): Define in class. 6383169689Skan (type_info::before, type_info::name, type_info::operator==, 6384169689Skan type_info::operator!=): Define new ABI implementations. 6385169689Skan (type_info::is_pointer_p, type_info::is_function_p): Declare 6386169689Skan new virtual functions. 6387169689Skan (type_info::do_catch, type_info::do_upcast): Likewise. 6388169689Skan 6389169689Skan * tinfo.h (__base_class_info): Define new class. 6390169689Skan (__class_type_info): Likewise. 6391169689Skan (__si_class_type_info): Likewise. 6392169689Skan (__vmi_class_type_info): Likewise. 6393169689Skan (__dynamic_cast): Prototype. 6394169689Skan 6395169689Skan * tinfo.cc: Conditionalize old and new rtti mechanisms. 6396169689Skan (type_info::is_pointer_p): Define new function. 6397169689Skan (type_info::is_function_p): Likewise. 6398169689Skan (type_info::do_catch): Likewise. 6399169689Skan (type_info::do_upcast): Likewise. 6400169689Skan (vtable_prefix): New structure for vtable access. 6401169689Skan (adjust_pointer): Define new template function. 6402169689Skan (contained_p, public_p, virtual_p, contained_public_p, 6403169689Skan contained_nonpublic_p, contained_nonvirtual_p): Define new 6404169689Skan functions. 6405169689Skan (nonvirtual_base_type): New local variable. 6406169689Skan (__class_type_info::~__class_type_info): Define. 6407169689Skan (__si_class_type_info::~__si_class_type_info): Likewise. 6408169689Skan (__vmi_class_type_info::~__vmi_class_type_info): Likewise. 6409169689Skan (__class_type_info::do_catch): Define new function. 6410169689Skan (__class_type_info::do_upcast): Likewise. 6411169689Skan (__class_type_info::find_public_src): Likewise. 6412169689Skan (__class_type_info::do_find_public_src): Likewise. 6413169689Skan (__si_class_type_info::do_find_public_src): Likewise. 6414169689Skan (__vmi_class_type_info::do_find_public_src): Likewise. 6415169689Skan (__class_type_info::do_dyncast): Likewise. 6416169689Skan (__si_class_type_info::do_dyncast): Likewise. 6417169689Skan (__vmi_class_type_info::do_dyncast): Likewise. 6418169689Skan (__class_type_info::do_upcast): Likewise. 6419169689Skan (__si_class_type_info::do_upcast): Likewise. 6420169689Skan (__vmi_class_type_info::do_upcast): Likewise. 6421169689Skan (__dynamic_cast): Likewise. 6422169689Skan 6423169689Skan * tinfo2.cc (__fundamental_type_info): Define new class. 6424169689Skan (__pointer_type_info): Likewise. 6425169689Skan (__reference_type_info): Likewise. 6426169689Skan (__array_type_info): Likewise. 6427169689Skan (__function_type_info): Likewise. 6428169689Skan (__enum_type_info): Likewise. 6429169689Skan (__ptr_to_member_type_info): Likewise. 6430169689Skan (__fundamental_type_info::~__fundamental_type_info): Define. 6431169689Skan (__pointer_type_info::~__pointer_type_info): Likewise. 6432169689Skan (__reference_type_info::~__reference_type_info): Likewise. 6433169689Skan (__array_type_info::~__array_type_info): Likewise. 6434169689Skan (__function_type_info::~__function_type_info): Likewise. 6435169689Skan (__enum_type_info::~__enum_type_info): Likewise. 6436169689Skan (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise. 6437169689Skan (__pointer_type_info::do_catch): Define new function. 6438169689Skan (__ptr_to_member_type_info::do_catch): Define new function. 6439169689Skan 6440169689Skan (__throw_type_match_rtti_2): Use new ABI interface, if enabled. 6441169689Skan (__is_pointer): Likewise. 6442169689Skan 6443169689Skan * exception.cc (__cplus_type_matcher): Deal with new-abi rtti. 6444169689Skan 6445169689Skan2000-01-30 Mark Mitchell <mark@codesourcery.com> 6446169689Skan 6447169689Skan * cp/class.c (build_vtable): Rename to build_primary_vtable. 6448169689Skan (prepare_fresh_vtable): Rename to build_secondary_vtable. 6449169689Skan (make_new_vtable): New function. 6450169689Skan (modify_vtable_entry): Handle generation of new vtables correctly. 6451169689Skan (modify_one_vtable): Remove unused parameter. 6452169689Skan (dfs_fixup_vtable_deltas): Likewise. 6453169689Skan (override_one_vtable): Use build_secondary_vtable. 6454169689Skan (finish_struct_1): Use build_primary_vtable and 6455169689Skan build_secondary_vtable. 6456169689Skan 6457169689Skan2000-01-28 Ulrich Drepper <drepper@redhat.com> 6458169689Skan 6459169689Skan * cp/decl.c: Adjust variable names, comments, help strings. 6460169689Skan 6461169689Skan2000-01-29 Nathan Sidwell <nathan@acm.org> 6462169689Skan 6463169689Skan * new2.cc (operator delete[]): Use operator delete, don't assume 6464169689Skan implementation. 6465169689Skan 6466169689Skan2000-01-29 Nathan Sidwell <sidwell@codesourcery.com> 6467169689Skan 6468169689Skan * class.c (build_vtbl_initializer): Add argument to 6469169689Skan build_vtable_entry call. 6470169689Skan 6471169689Skan2000-01-27 Mark Mitchell <mark@codesourcery.com> 6472169689Skan 6473169689Skan * cp-tree.def (THUNK_DECL): Discuss vcall indices. 6474169689Skan * cp-tree.h (BINFO_VIRTUALS): Update documentation. 6475169689Skan (BF_DELTA): New macro. 6476169689Skan (BF_VCALL_INDEX): Likewise. 6477169689Skan (BF_FN): Likewise. 6478169689Skan (THUNK_VCALL_OFFSET): Likewise. 6479169689Skan (make_thunk): Change prototype. 6480169689Skan * class.c (build_vtable_entry): Integrate 6481169689Skan build_vtable_entry_for_fn. Handle vcall indices. 6482169689Skan (build_vtable_entry_for_fn): Remove. 6483169689Skan (set_rtti_entry): Handle vcall indices. Use BF_DELTA, 6484169689Skan BF_VCALL_INDEX, BF_FN. 6485169689Skan (modify_vtable_entry): Integrate common code from 6486169689Skan modify_one_vtable and dfs_fixup_vtable_deltas. 6487169689Skan (add_virtual_function): Set BF_VCALL_INDEX. 6488169689Skan (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX, 6489169689Skan and BF_FN. 6490169689Skan (modify_one_vtable): Simplify. 6491169689Skan (dfs_fixup_vtable_deltas): Likewise. 6492169689Skan (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 6493169689Skan * method.c (make_thunk): Handle vcall indices. 6494169689Skan 6495169689Skan2000-01-28 Nathan Sidwell <sidwell@codesourcery.com> 6496169689Skan 6497169689Skan Compiler side new abi rtti (not enabled). 6498169689Skan * cp-tree.h (new_abi_rtti_p): New macro. 6499169689Skan (emit_support_tinfos): Prototype new function. 6500169689Skan (tinfo_decl_p): Likewise. 6501169689Skan (emit_tinfo_decl): Likwise. 6502169689Skan * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor 6503169689Skan macros. 6504169689Skan (doing_runtime): New local static. 6505169689Skan (init_rtti_processing): Add new-abi initializer. 6506169689Skan (get_tinfo_decl): Add new-abi logic. 6507169689Skan (tinfo_from_decl): Likewise. 6508169689Skan (build_dynamic_cast_1): Likewise. 6509169689Skan (qualifier_flags): New static function. 6510169689Skan (tinfo_base_init): Likewise. 6511169689Skan (generic_initializer): Likewise. 6512169689Skan (ptr_ref_initializer): Likewise. 6513169689Skan (ptmd_initializer): Likewise. 6514169689Skan (class_hint_flags): Likewise. 6515169689Skan (class_initializer): Likewise. 6516169689Skan (synthesize_tinfo_var): Likewise. 6517169689Skan (create_real_tinfo_var): Likewise. 6518169689Skan (create_pseudo_type_info): Likewise. 6519169689Skan (get_vmi_pseudo_type_info): Likewise. 6520169689Skan (create_tinfo_types): Likewise. 6521169689Skan (emit_support_tinfos): New global function. 6522169689Skan (tinfo_decl_p): New global predicate. 6523169689Skan (emit_tinfo_decl): New global function. 6524169689Skan * class.c (set_rtti_entry): Generalize for old and new rtti. 6525169689Skan (build_vtbl_initializer): Likewise. 6526169689Skan * decl2.c (finish_file): Likewise. 6527169689Skan 6528169689Skan2000-01-27 Jim Wilson <wilson@cygnus.com> 6529169689Skan 6530169689Skan * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t) 6531169689Skan and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))). 6532169689Skan 6533169689Skan2000-01-27 Mike Stump <mrs@wrs.com> 6534169689Skan 6535169689Skan * decl.c (pushdecl): Fix up shadow warnings with respect to implicit 6536169689Skan for scopes. 6537169689Skan 6538169689Skan2000-01-26 Jason Merrill <jason@casey.cygnus.com> 6539169689Skan 6540169689Skan * pt.c (unify): Use fold, not maybe_fold_nontype_arg. 6541169689Skan 6542169689Skan2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk> 6543169689Skan 6544169689Skan * optimize.c (calls_setjmp_r): Supply new argument 6545169689Skan to special_function_p. 6546169689Skan 6547169689Skan2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6548169689Skan 6549169689Skan * call.c: PROTO -> PARAMS. 6550169689Skan * class.c: Likewise. 6551169689Skan * cp-tree.h: Likewise. 6552169689Skan * cvt.c: Likewise. 6553169689Skan * decl.c: Likewise. 6554169689Skan * decl.h: Likewise. 6555169689Skan * decl2.c: Likewise. 6556169689Skan * dump.c: Likewise. 6557169689Skan * errfn.c: Likewise. 6558169689Skan * error.c: Likewise. 6559169689Skan * except.c: Likewise. 6560169689Skan * expr.c: Likewise. 6561169689Skan * init.c: Likewise. 6562169689Skan * input.c: Likewise. 6563169689Skan * lex.c: Likewise. 6564169689Skan * lex.h: Likewise. 6565169689Skan * method.c: Likewise. 6566169689Skan * optimize.c: Likewise. 6567169689Skan * parse.y: Likewise. 6568169689Skan * pt.c: Likewise. 6569169689Skan * repo.c: Likewise. 6570169689Skan * rtti.c: Likewise. 6571169689Skan * search.c: Likewise. 6572169689Skan * semantics.c: Likewise. 6573169689Skan * spew.c: Likewise. 6574169689Skan * tree.c: Likewise. 6575169689Skan * typeck.c: Likewise. 6576169689Skan * typeck2.c: Likewise. 6577169689Skan * xref.c: Likewise. 6578169689Skan 6579169689Skan2000-01-25 Richard Henderson <rth@cygnus.com> 6580169689Skan 6581169689Skan * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR. 6582169689Skan 6583169689Skan2000-01-25 Mark Mitchell <mark@codesourcery.com> 6584169689Skan 6585169689Skan * cp-tree.h (vcall_offset_in_vtable_p): New macro. 6586169689Skan * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment. 6587169689Skan (struct vcall_offset_data_s): New type. 6588169689Skan (dfs_vcall_offset_queue_p): New function. 6589169689Skan (dfs_build_vcall_offset_vtbl_entries): Likewise. 6590169689Skan (build_vcall_offset_vtbl_entries): Likewise. 6591169689Skan (layout_vtable_decl): Likewise. 6592169689Skan (num_vfun_entries): Likewise. 6593169689Skan (num_extra_vtbl_entries): Add the entries for vcall offsets. 6594169689Skan (build_vtbl_initializer): Likewise. 6595169689Skan (dfs_finish_vtabls): Use layout_vtable_decl. 6596169689Skan (modify_one_vtables): Always duplicate vtables under the new ABI. 6597169689Skan (finish_struct_1): Use layout_vtable_decl. 6598169689Skan 6599169689Skan2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6600169689Skan 6601169689Skan * decl.c (member_function_or_else): Change third arg from a format 6602169689Skan specifier to an `enum overload_flags'. Callers changed. 6603169689Skan 6604169689Skan2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com> 6605169689Skan 6606169689Skan * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof, 6607169689Skan build_binary_op_nodefault, build_unary_op, build_reinterpret_cast, 6608169689Skan build_const_cast, get_delta_difference, check_return_expr): Avoid 6609169689Skan ANSI string concatenation usage. 6610169689Skan 6611169689Skan2000-01-24 Mark Mitchell <mark@codesourcery.com> 6612169689Skan 6613169689Skan * class.c (layout_class_type): Put the fields required to make a 6614169689Skan class non-empty at the end, not the beginning, of the TYPE_FIELDs 6615169689Skan list. 6616169689Skan 6617169689Skan2000-01-24 Jason Merrill <jason@casey.cygnus.com> 6618169689Skan 6619169689Skan * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a 6620169689Skan template. 6621169689Skan 6622169689Skan * decl2.c (mark_used): Do instantiate inlines that have been 6623169689Skan explicitly instantiated. 6624169689Skan 6625169689Skan2000-01-24 Richard Henderson <rth@cygnus.com> 6626169689Skan 6627169689Skan * call.c (build_over_call): Use expand_tree_builtin. 6628169689Skan * typeck.c (build_function_call_real): Likewise. 6629169689Skan (build_binary_op_nodefault): Handle unordered compares. 6630169689Skan 6631169689Skan2000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 6632169689Skan 6633169689Skan * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New 6634169689Skan cp_tree_index values. 6635169689Skan (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node): 6636169689Skan New global node #defines for them. 6637169689Skan * rtti.c (call_void_fn): Replace with ... 6638169689Skan (build_runtime_decl): ... new static function. 6639169689Skan (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl. 6640169689Skan (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl. 6641169689Skan (build_dynamic_cast_1): Always produce correctly typed result. 6642169689Skan Explicitly produce type_info addresses. Use dynamic_cast_node. 6643169689Skan * exception.cc (__throw_bad_cast): Return `void *'. 6644169689Skan (__throw_bad_typeid): Return `const type_info &'. 6645169689Skan 6646169689Skan2000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 6647169689Skan 6648169689Skan * cp-tree.h (get_vtable_decl): Prototype new function. 6649169689Skan * class.c (get_vtable_decl): New function. Broken out from ... 6650169689Skan (build_vtable): ... here. Use it. 6651169689Skan * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created 6652169689Skan by get_vtable_decl. 6653169689Skan 6654169689Skan2000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 6655169689Skan 6656169689Skan * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE, 6657169689Skan CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE, 6658169689Skan CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations. 6659169689Skan (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE, 6660169689Skan CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE, 6661169689Skan CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations. 6662169689Skan (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ... 6663169689Skan (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here. 6664169689Skan (CPTI_TINFO_VAR_ID): New enumeration. 6665169689Skan (__tp_desc_type_node, __access_mode_type_node, 6666169689Skan __bltn_desc_type_node, __user_desc_type_node, 6667169689Skan __class_desc_type_node, __ptr_desc_type_node, 6668169689Skan __attr_desc_type_node, __func_desc_type_node, 6669169689Skan __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines. 6670169689Skan (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node, 6671169689Skan ref_desc_type_node, ary_desc_type_node, func_desc_type_node, 6672169689Skan enum_desc_type_node, class_desc_type_node, 6673169689Skan si_class_desc_type_node, vmi_class_desc_type_node, 6674169689Skan ptmd_desc_type_node, base_desc_type_node): New #defines. 6675169689Skan (tinfo_fn_id, tinfo_fn_type): Rename to ... 6676169689Skan (tinfo_decl_id, tinfo_decl_type): ... here. Adjust. 6677169689Skan (tinfo_var_id): New enumeration. 6678169689Skan (DECL_TINFO_FN_P): Augment comment. 6679169689Skan * decl.c (cp_global_trees): Adjust documentation. 6680169689Skan * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id, 6681169689Skan tinfo_decl_type and tinfo_var_id. 6682169689Skan (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type. 6683169689Skan (build_typeid): Remove unused variable. 6684169689Skan (get_tinfo_var): Use tinfo_var_id. 6685169689Skan (tinfo_name): New static function. 6686169689Skan (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type. 6687169689Skan (tinfo_from_decl): Likewise. 6688169689Skan (get_base_offset): New static function, broken out of 6689169689Skan expand_class_desc. 6690169689Skan (expand_si_desc): Use tinfo_name. 6691169689Skan (expand_class_desc): Likewise. Lose local static variable. 6692169689Skan Use base_desc_type_node. Use get_base_offset. 6693169689Skan (expand_ptr_desc): Use tinfo_name. 6694169689Skan (expand_attr_desc): Likewise. 6695169689Skan (expand_generic_desc): Likewise. 6696169689Skan 6697169689Skan * tinfo.cc (__GXX_ABI_VERSION): Test value and existence. 6698169689Skan * tinfo.h (__GXX_ABI_VERSION): Test value and existence. 6699169689Skan 6700169689Skan2000-01-23 Mark Mitchell <mark@codesourcery.com> 6701169689Skan 6702169689Skan * cp-tree.h (__eprintf): Remove declaration. 6703169689Skan * tree.c (__eprintf): Remove definition. 6704169689Skan 6705169689Skan2000-01-23 Zack Weinberg <zack@rabi.columbia.edu> 6706169689Skan Mark Mitchell <mark@codesourcery.com> 6707169689Skan 6708169689Skan * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N, 6709169689Skan CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings. 6710169689Skan 6711169689Skan2000-01-23 Brad Lucier <lucier@math.purdue.edu> 6712169689Skan 6713169689Skan * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly. 6714169689Skan 6715169689Skan2000-01-23 Mark Mitchell <mark@codesourcery.com> 6716169689Skan 6717169689Skan * cp-tree.h (register_dtor_fn): New function. 6718169689Skan * decl.c (destroy_local_static): Rename to ... 6719169689Skan (register_dtor_fn): ... this. Give it external linkage. 6720169689Skan (expand_static_init): Use it. 6721169689Skan * decl2.c (do_static_initialization): Likewise, if using 6722169689Skan __cxa_atexit. 6723169689Skan (do_static_destruction): Check that __cxa_atexit is not in use. 6724169689Skan (finish_file): Don't call do_static_destruction if using 6725169689Skan __cxa_atexit. 6726169689Skan 6727169689Skan * typeck.c (convert_arguments): Restore two-message error 6728169689Skan reporting. 6729169689Skan 6730169689Skan2000-01-20 Nathan Sidwell <sidwell@codesourcery.com> 6731169689Skan 6732169689Skan Remap dynamic cast hint values to be consistent across ABIs. 6733169689Skan * search.c (dynamic_cast_base_recurse): Remap generated value. 6734169689Skan (get_dynamic_cast_base_type): Adjust documentation. 6735169689Skan * tinfo.h (__user_type_info::dyncast): Likewise. 6736169689Skan (__user_type_info::find_public_subobj): Remap BOFF meaning. 6737169689Skan * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning. 6738169689Skan (__class_type_info::do_dyncast): Likewise. 6739169689Skan (__class_type_info::do_find_public_subobj): Likewise. 6740169689Skan * tinfo2.cc (__dynamic_cast): Remap BOFF parameter. 6741169689Skan 6742169689Skan2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com> 6743169689Skan 6744169689Skan * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn. 6745169689Skan 6746169689Skan * typeck2.c (incomplete_type_error): Restore previous 6747169689Skan cp_error and cp_error_at call sequence. 6748169689Skan 6749169689Skan2000-01-20 Brad Lucier <lucier@math.purdue.edu> 6750169689Skan 6751169689Skan * class.c (dump_class_hierarchy): Make format agree with argument; 6752169689Skan cast pointer to unsigned long and print with %lx. 6753169689Skan 6754169689Skan2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com> 6755169689Skan 6756169689Skan * decl2.c (lang_decode_option): Set default line-wrap length to 72. 6757169689Skan 6758169689Skan * typeck.c (composite_pointer_type, common_type, 6759169689Skan comp_target_parms, c_sizeof, expr_sizeof, build_array_ref, 6760169689Skan build_function_call_real, convert_arguments, 6761169689Skan build_binary_op_nodefault, pointer_int_sum, pointer_diff, 6762169689Skan build_unary_op, mark_addressable, build_compound_expr, 6763169689Skan build_static_cast, build_reinterpret_cast, build_const_cast, 6764169689Skan build_c_cast, build_modify_expr, get_delta_difference, 6765169689Skan build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 6766169689Skan 'ISO C++'. Fusion consecutive calls to diagnostic message routines 6767169689Skan into a single one. 6768169689Skan * typeck2.c (readonly_error, abstract_virtuals_error, 6769169689Skan process_init_constructor, check_for_new_type): Likewise. 6770169689Skan 6771169689Skan2000-01-19 Mark Mitchell <mark@codesourcery.com> 6772169689Skan 6773169689Skan * tree.c (bot_manip): Set DECL_CONTEXT for newly created 6774169689Skan VAR_DECLs. 6775169689Skan 6776169689Skan2000-01-18 Nathan Sidwell <sidwell@codesourcery.com> 6777169689Skan 6778169689Skan * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype. 6779169689Skan (build_x_typeid): Likewise. 6780169689Skan (get_tinfo_fn): Likewise. 6781169689Skan (get_tinfo_fn_unused): Rename to ... 6782169689Skan (get_tinfo_decl): ... here. 6783169689Skan * rtti.c (build_headof): Replace logic error with assertion. 6784169689Skan (get_tinfo_fn_dynamic): Rename to ... 6785169689Skan (get_tinfo_decl_dynamic): ... here. Make static. Use 6786169689Skan complete_type_or_else. 6787169689Skan (build_x_typeid): Move into ... 6788169689Skan (build_typeid): ... here. Adjust call to 6789169689Skan get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify 6790169689Skan throw_bad_typeid expression. 6791169689Skan (get_tinfo_fn_unused): Rename to ... 6792169689Skan (get_tinfo_decl): ... here. Adjust comment. 6793169689Skan (get_tinfo_fn): Delete. 6794169689Skan (tinfo_from_decl): New static function. 6795169689Skan (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl. 6796169689Skan (get_typeid): Use complete_type_or_else. 6797169689Skan (build_dynamic_cast_1): Adjust calls to 6798169689Skan get_tinfo_decl_dynamic. Simplify throw_bad_cast expression. 6799169689Skan * parse.y (primary): Adjust call to build_typeid. 6800169689Skan * except.c (build_eh_type_type_ref): Adjust call to 6801169689Skan get_tinfo_decl. Mark as used. 6802169689Skan * class.c (set_rtti_entry): Adjust call to get_tinfo_decl. 6803169689Skan * decl2.c (build_expr_from_tree): Adjust call to build_typeid. 6804169689Skan * parse.c: Regenerated. 6805169689Skan 6806169689Skan2000-01-17 Mark Mitchell <mark@codesourcery.com> 6807169689Skan 6808169689Skan * class.c (fixed_type_or_null): Don't clear NONNULL. Document 6809169689Skan calling convention. 6810169689Skan (resolves_to_fixed_type_p): Document calling convention. 6811169689Skan * rtti.c (build_x_typeid): Initialize NONNULL. 6812169689Skan 6813169689Skan * cp-tree.h (build_shared_int_cst): New function. 6814169689Skan * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity. 6815169689Skan * class.c (modify_vtable_entry): Likewise. 6816169689Skan (add_virtual_function): Split out code to generated shared 6817169689Skan INTEGER_CSTs to build_share_int_cst. 6818169689Skan (modify_all_vtables): Handle all the overridden functions here. 6819169689Skan Add overridden functions from non-primary virtual bases to the 6820169689Skan primary vtable. 6821169689Skan (finish_struct_1): Adjust call to modify_all_vtables. Add 6822169689Skan overridden functions from non-primary bases to the vtable. 6823169689Skan * tree.c (build_shared_int_cst): New function. 6824169689Skan 6825169689Skan * cp-tree.h (scratchalloc): Remove. 6826169689Skan (build_scratch_list): Likewise. 6827169689Skan * call.c (convert_class_to_reference): Replace build_scratch_list 6828169689Skan and build_expr_list with build_tree_list. 6829169689Skan (add_candidate): Replace scratchalloc with expralloc. Note memory 6830169689Skan leak. 6831169689Skan (build_user_type_conversion_1): Replace build_scratch_list 6832169689Skan and build_expr_list with build_tree_list. 6833169689Skan (build_new_op): Likewise. 6834169689Skan (build_op_delete_call): Likewise. 6835169689Skan (convert_like): Likewise. 6836169689Skan * cvt.c (ocp_convert): Likewise. 6837169689Skan * decl.c (start_decl): Likewise. 6838169689Skan (start_function): Likewise. 6839169689Skan (finish_destructor_body): Likewise. 6840169689Skan (maybe_build_cleanup_1): Likewise. 6841169689Skan * decl2.c (reparse_decl_as_expr): Likewise. 6842169689Skan * init.c (perform_member_init): Likewise. 6843169689Skan (expand_cleanup_for_base): Likewise. 6844169689Skan (build_builtin_delete_call): Likewise. 6845169689Skan (build_new_1): Likewise. 6846169689Skan (build_delete): Likewise. 6847169689Skan * method.c (do_build_assign_ref): Likewise. 6848169689Skan * parse.y (already_scoped_stmt): Likewise. 6849169689Skan (nontrivial_exprlist): Likewise. 6850169689Skan (net_initializer): Likewise. 6851169689Skan (initlist): Likewise. 6852169689Skan * parse.c: Regenerated. 6853169689Skan * rtti.c (build_x_typeid): Likewise. 6854169689Skan (build_dynamic_cast_1): Likewise. 6855169689Skan * typeck.c (build_x_compound_expr): Likewise. 6856169689Skan (build_static_cast): Likewise. 6857169689Skan (build_modify_expr): Likewise. 6858169689Skan 6859169689Skan * cp-tree.h (DECL_VINDEX): Add documentation. 6860169689Skan * class.c (build_vtable_entry): Likewise. 6861169689Skan (start_vtable): Add comment. 6862169689Skan (add_virtual_function): Replace pending_hard_virtuals with 6863169689Skan overridden_virtuals and pending_virtuals with new_virtuals. 6864169689Skan Replace redundant assignments with assertions. 6865169689Skan (check_for_override): Add comment. 6866169689Skan (check_bases_and_members): Replace pending_hard_virtuals with 6867169689Skan overridden_virtuals and pending_virtuals with new_virtuals. 6868169689Skan (create_vtbl_ptr): Likewise. 6869169689Skan (layout_class_type): Likewise. 6870169689Skan (finish_struct_1): Likewise. Add comments. 6871169689Skan 6872169689Skan2000-01-16 Mark Mitchell <mark@codesourcery.com> 6873169689Skan 6874169689Skan * class.c (finish_struct_1): Replace redundant code with 6875169689Skan assertions. 6876169689Skan 6877169689Skan * cp-tree.h (flag_new_abi): Move. 6878169689Skan (flag_use_cxa_atexit): Likewise. 6879169689Skan (flag_honor_std): Likewise. 6880169689Skan (flag_rtti): Likewise. 6881169689Skan (vbase_offsets_in_vtable_p): Define. 6882169689Skan (vptrs_present_everywhere_p): Likewise. 6883169689Skan (TYPE_CONTAINS_VPTR_P): Likewise. 6884169689Skan (dfs_walk_real): Declare. 6885169689Skan * class.c (build_vbase_pointer_fields): Check 6886169689Skan vbase_offsets_in_vtable_p. 6887169689Skan (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in 6888169689Skan BINFO_VPTR_FIELD. 6889169689Skan (build_vbase_offset_vtbl_entries): Simplify. 6890169689Skan (build_vbase_offset_vtbl_entries): Adjust. 6891169689Skan (build_vbase_pointer): Add ability to look up vbase offsets in 6892169689Skan vtable. 6893169689Skan (start_vtable): New function. 6894169689Skan (add_virtual_function): Use it. 6895169689Skan (determine_primary_base): Use TYPE_CONTAINS_VPTR_P. 6896169689Skan (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p. 6897169689Skan (build_vtbl_initializer): Take the type of the complete object as 6898169689Skan input. Use it to correctly calculate vbase offsets. 6899169689Skan (dfs_finish_vtbls): Pass the complete type to 6900169689Skan build_vtbl_initializer. 6901169689Skan (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P. 6902169689Skan (create_vtable_ptr): Create a vtable even if there are no 6903169689Skan new virtual functions, under the new ABI. 6904169689Skan (finish_struct_1): Likewise. 6905169689Skan (get_vfield_name): Use TYPE_CONTAINS_VPTR_P. 6906169689Skan * decl.c (exapnd_static_init): Remove call to 6907169689Skan preserve_initializer. 6908169689Skan * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in 6909169689Skan vtables. 6910169689Skan * init.c (initialize_vtbl_ptrs): Initialize them in pre-order. 6911169689Skan (expand_virtual_init): Use vbase_offsets_in_vtable_p. 6912169689Skan (construct_virtual_bases): Don't initialize virtual base pointers 6913169689Skan under the new ABI. 6914169689Skan (build_aggr_init): Clean up comment. 6915169689Skan (expand_aggr_init_1): Likewise. 6916169689Skan * rtti.c (expand_class_desc): Store the virtual function table 6917169689Skan index where the vbase offset lives in the offset field. 6918169689Skan * search.c (dfs_walk_real): Make it global. 6919169689Skan (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P. 6920169689Skan * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD. 6921169689Skan 6922169689Skan * tinfo.h (USItype): Make it signed under the new ABI. 6923169689Skan * tinfo.cc (convert_to_base): New function. Encapsulate base 6924169689Skan conversion logic here. 6925169689Skan (__class_type_info::do_upcast): Use it. 6926169689Skan (__class_type_info::do_dyncast): Likewise. 6927169689Skan (__class_type_info::do_find_public_subobj): Likewise. 6928169689Skan 6929169689Skan * init.c (construct_virtual_bases): Don't look up the addresses of 6930169689Skan virtual bases at run-time. 6931169689Skan 6932169689Skan * class.c (build_vbase_pointer): Relocate. 6933169689Skan (build_vbase_pointer_fields): Likewise. 6934169689Skan (dfs_build_vbase_offset_vtbl_entries): Likewise. 6935169689Skan (build_vbase_offset_vtbl_entries): Likewise. 6936169689Skan 6937169689Skan * decl.c (init_decl_processing): Complain if -fnew-abi 6938169689Skan -fno-vtable-thunks is used. 6939169689Skan 6940169689Skan * decl2.c (lang_decode_option): Don't couple flag_honor_std to 6941169689Skan flag_new_abi. 6942169689Skan 6943169689Skan2000-01-15 Mark Mitchell <mark@codesourcery.com> 6944169689Skan 6945169689Skan * cp-tree.h (num_extra_vtbl_entries): New function. 6946169689Skan (size_extra_vtbl_entries): Likewise. 6947169689Skan (dfs_vtable_path_unmark): Likewise. 6948169689Skan (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise. 6949169689Skan (dfs_vtable_path_marked_real_bases_queue_p): Likewise. 6950169689Skan * class.c (num_extra_vtbl_entries): New function. 6951169689Skan (size_extra_vtbl_entries): Likewise. 6952169689Skan (dfs_build_vbase_offset_vtbl_entries): New function. 6953169689Skan (build_vbase_offset_vtbl_entries): Likewise. 6954169689Skan (build_vtbl_initializer): Use it. 6955169689Skan (finish_struct_1): Adjust vtable sizes (using 6956169689Skan num_extra_vtbl_entries). 6957169689Skan * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a 6958169689Skan THUNK_DECL is non-NULL before expanding it. 6959169689Skan * init.c (expand_virtual_init): Adjust the vtable pointer by 6960169689Skan size_extra_vtbl_entries before storing it. 6961169689Skan * search.c (get_shared_vase_if_not_primary): Adjust prototype. 6962169689Skan Handle TREE_LIST parameters here, not in the dfs_* functions. 6963169689Skan (dfs_unmarked_real_bases_queue_p): Adjust. 6964169689Skan (dfs_marked_real_bases_queue_p): Likewise. 6965169689Skan (dfs_vtable_path_unmarked_real_bases_queue_p): New function. 6966169689Skan (dfs_vtable_path_marked_real_bases_queue_p): New function. 6967169689Skan (dfs_vtable_path_unmark): Likewise. 6968169689Skan 6969169689Skan2000-01-14 Mark Mitchell <mark@codesourcery.com> 6970169689Skan 6971169689Skan * optimize.c (copy_body_r): Clear the operand three of a 6972169689Skan TARGET_EXPR when copying it. 6973169689Skan 6974169689Skan2000-01-14 Martin v. L�wis <loewis@informatik.hu-berlin.de> 6975169689Skan 6976169689Skan * method.c (build_decl_overload_real): Check whether we are in :: 6977169689Skan before returning __builtin_new/delete. 6978169689Skan 6979169689Skan2000-01-13 Mark Mitchell <mark@codesourcery.com> 6980169689Skan 6981169689Skan * pt.c (tsubst_friend_function): Improve comment. 6982169689Skan (instantiate_decl): Avoid crashing when a "nested" function is 6983169689Skan instantiated from the top level. 6984169689Skan 6985169689Skan * dump.c (dqeueue_and_dump): Dump 6986169689Skan DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION. 6987169689Skan 6988169689Skan2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6989169689Skan 6990169689Skan * call.c: If GATHER_STATISTICS, declare `n_build_method_call'. 6991169689Skan 6992169689Skan2000-01-13 Nathan Sidwell <sidwell@codesourcery.com> 6993169689Skan 6994169689Skan * g++spec.c (lang_specific_driver): Add -fnew-abi if 6995169689Skan ENABLE_NEW_GXX_ABI defined. 6996169689Skan * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o, 6997169689Skan opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o, 6998169689Skan opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch. 6999169689Skan 7000169689Skan2000-01-12 Mark Mitchell <mark@codesourcery.com> 7001169689Skan 7002169689Skan * decl.c (start_cleanup_fn): Call pushdecl. 7003169689Skan 7004169689Skan * call.c (convert_class_to_reference): Fix typos. 7005169689Skan (build_conditional_expr): Handle errors gracefully. 7006169689Skan * class.c (push_nested_class): Likewise. 7007169689Skan * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro. 7008169689Skan (DECL_THIS_EXTERN): Use it. 7009169689Skan (DECL_THIS_STATIC): Likewise. 7010169689Skan * cvt.c (convert_to_void): Handle errors gracefully. 7011169689Skan (build_expr_type_conversion): Likewise. 7012169689Skan * decl.c (maybe_push_decl): Likewise. 7013169689Skan (start_decl_1): Likewise. 7014169689Skan (require_complete_types_for_parms): Likewise. 7015169689Skan * parse.y (structsp): Likewise. 7016169689Skan (base_class): Likewise. 7017169689Skan * parse.c: Regenerated. 7018169689Skan * pt.c (finish_member_template_decl): Likewise. 7019169689Skan * typeck.c (decay_conversion): Likewise. 7020169689Skan 7021169689Skan * cp-tree.h (dfs_skip_vbases): New function. 7022169689Skan (find_vbase_instance): Likewise. 7023169689Skan * class.c (determine_primary_base): Allow a nearly empty base to 7024169689Skan serve as a primary base class under the new ABI. 7025169689Skan (get_class_offset_1): Rename to ... 7026169689Skan (dfs_get_class_offset): ... this. Simplify. Don't issue error 7027169689Skan messages here. 7028169689Skan (get_class_offset): Use it. Issue error messages here. 7029169689Skan (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to 7030169689Skan find the right copies of virtual bases. 7031169689Skan (fixup_vtable_deltas1): Rename to ... 7032169689Skan (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual 7033169689Skan bases as primary bases. 7034169689Skan (fixup_vtable_deltas): Remove. 7035169689Skan (override_one_vtable): Handle virtual bases as primary bases. 7036169689Skan (merge_overrides): Likewise. 7037169689Skan (finish_struct_1): Likewise. 7038169689Skan (dump_class_hierarchy): Dump primary-ness of bases as well. 7039169689Skan * search.c (mark_primary_bases): Use a pre-order traversal to 7040169689Skan handle primary virtual bases. 7041169689Skan (dfs_skip_vbases): New fiunction. 7042169689Skan (expand_upcast_fixups): Adjust to handle primary virtual bases. 7043169689Skan (fixup_virtual_upcast_offsets): Likewise. 7044169689Skan (fixup_all_virtual_upcast_offsets): Likewise. 7045169689Skan (dfs_find_vbase_instances): New function. 7046169689Skan (find_vbase_instance): Likewise. 7047169689Skan 7048169689Skan2000-01-11 Mumit Khan <khan@xraylith.wisc.edu> 7049169689Skan 7050169689Skan * lex.c (DIR_SEPARATOR): Delete macro. 7051169689Skan 7052169689Skan2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com> 7053169689Skan 7054169689Skan * decl2.c (lang_decode_option): Handle automatic line wrapping 7055169689Skan option. 7056169689Skan 7057169689Skan2000-01-11 Mark Mitchell <mark@codesourcery.com> 7058169689Skan 7059169689Skan * friend.c (do_friend): Don't resolve scopes when processing 7060169689Skan template declarations, even if the qualifying scope doesn't 7061169689Skan involve template parameters. 7062169689Skan 7063169689Skan2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com> 7064169689Skan 7065169689Skan * class.c (dfs_modify_vtables_queue_p): Remove. 7066169689Skan (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p 7067169689Skan and dfs_marked_real_bases_queue_p instead of 7068169689Skan dfs_modify_vtables_queue_p. 7069169689Skan 7070169689Skan * class.c (build_vbase_path): Simplify. 7071169689Skan (dfs_propagate_binfo_offsets): New function. 7072169689Skan (propagate_binfo_offsets): Use it. 7073169689Skan (remove_base_field): Simplify. 7074169689Skan (dfs_set_offset_for_vbases): Remove. 7075169689Skan (dfs_set_offset_for_shared_vbases): New function. 7076169689Skan (dfs_set_offset_for_unshared_vbases): Likewise. 7077169689Skan (layout_virtual_bases): Use them. 7078169689Skan (layout_basetypes): Don't call propagate_binfo_offsets. 7079169689Skan * search.c (dfs_get_vbase_types): Clone completely fresh binfos 7080169689Skan for the vbases. 7081169689Skan 7082169689Skan * class.c (build_base_field): New function, split out from ... 7083169689Skan (build_base_fields): ... here. Use it. Allocate primary bases 7084169689Skan first, under the new ABI. 7085169689Skan (get_vtable_entry): Remove. 7086169689Skan (remove_base_field): New function, split out from ... 7087169689Skan (remove_base_fields): ... here. Adjust since primary bases come 7088169689Skan first under the new ABI. 7089169689Skan 7090169689Skan * cp-tree.h (expand_direct_vtbls_init): Remove declaration. 7091169689Skan (initialize_vtbl_ptrs): New function. 7092169689Skan (expand_indirect_vtbls_init): Change prototype. 7093169689Skan (convert_pointer_to_vbase): Declare. 7094169689Skan * init.c (expand_direct_vtbls_init): Remove. 7095169689Skan (dfs_initialize_vtbl_ptrs): New function. 7096169689Skan (initialize_vtbl_ptrs): Likewise. 7097169689Skan (emit_base_init): Use initialize_vtbl_ptrs. 7098169689Skan * search.c (convert_pointer_to_vbase): Make it global. 7099169689Skan (expand_indirect_vtbls_init): Remove vtable initialization code. 7100169689Skan * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs. 7101169689Skan 7102169689Skan * class.c (dfs_finish_vtbls): New function. 7103169689Skan (finish_vtbls): Use it. 7104169689Skan (dump_class_hierarchy): New function. 7105169689Skan 7106169689Skan * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition. 7107169689Skan (BINFO_VBASE_PRIMARY_P): New macro. 7108169689Skan (BINFO_VIRTUALS): Add to documentation. 7109169689Skan (SET_BINFO_PRIMARY_MARKED_P): Remove. 7110169689Skan (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 7111169689Skan (dfs_mark_primary_bases_queue_p): Likewise. 7112169689Skan (dfs_unmarked_real_bases_queue_p): New function. 7113169689Skan (dfs_marked_real_bases_queue_p): Likewise. 7114169689Skan * search.c (dfs_mark_primary_bases): Adjust. 7115169689Skan (mark_primary_bases): Likewise. 7116169689Skan (get_shared_vbase_if_not_primary): New function. 7117169689Skan (dfs_unmarked_real_bases_queue_p): Likewise. 7118169689Skan (dfs_marked_real_bases_queue_p): Likewise. 7119169689Skan (dfs_get_pure_virtuals): Simplify. 7120169689Skan (get_pure_virtuals): Likewise. 7121169689Skan 7122169689Skan2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7123169689Skan 7124169689Skan * lex.c: Include tm_p.h. 7125169689Skan 7126169689Skan2000-01-07 Nathan Sidwell <sidwell@codesourcery.com> 7127169689Skan 7128169689Skan * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro. 7129169689Skan 7130169689Skan2000-01-06 Jason Merrill <jason@casey.cygnus.com> 7131169689Skan 7132169689Skan * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT. 7133169689Skan * pt.c (instantiate_decl): Defer comdat templates that might not be 7134169689Skan needed. 7135169689Skan 7136169689Skan * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT. 7137169689Skan * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT. 7138169689Skan (finish_file): Likewise. 7139169689Skan 7140169689Skan * decl2.c (import_export_class): Undo 12/14 change. 7141169689Skan 7142169689Skan * error.c (dump_decl): operator new, not operatornew. 7143169689Skan 7144169689Skan * class.c (field_decl_cmp): A nontype is "greater" than a type. 7145169689Skan * search.c (lookup_field_1): Look for the last field with the 7146169689Skan desired name. 7147169689Skan 7148169689Skan2000-01-05 Nathan Sidwell <nathan@acm.org> 7149169689Skan 7150169689Skan * decl2.c (lookup_arg_dependent): Deal with FNS not being a 7151169689Skan FUNCTION_DECL. 7152169689Skan 7153169689Skan2000-01-05 Nathan Sidwell <nathan@acm.org> 7154169689Skan 7155169689Skan * typeck.c (build_static_cast): Don't strip target qualifiers 7156169689Skan when casting from a class. 7157169689Skan 7158169689Skan2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7159169689Skan 7160169689Skan * class.c (warn_hidden): Initialize variable `fndecl'. 7161169689Skan 7162169689Skan2000-01-03 Ulrich Drepper <drepper@cygnus.com> 7163169689Skan 7164169689Skan * decl.c (flag_isoc9x): New variable to be able to use code in 7165169689Skan c-common.c. For now always zero. 7166169689Skan 7167169689Skan2000-01-03 Mark Mitchell <mark@codesourcery.com> 7168169689Skan 7169169689Skan * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. 7170169689Skan * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN 7171169689Skan or unshare_base_binfos for virtual bases here. 7172169689Skan * search.c (dfs_get_vbase_types): Do it here. 7173169689Skan (get_vbase_types): Adjust. 7174169689Skan 7175169689Skan2000-01-02 Mark Mitchell <mark@codesourcery.com> 7176169689Skan 7177169689Skan * cp-tree.h (CLASSTYPE_VFIELDS): Move definition. 7178169689Skan (BINFO_PRIMARY_MARKED_P): Use flag 5. 7179169689Skan (SET_BINFO_PRIMARY_MARKED_P): Likewise. 7180169689Skan (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 7181169689Skan (unmark_primary_bases): Remove declaration. 7182169689Skan (unmarkedp): Declare. 7183169689Skan (dfs_vbase_unmark): Likewise. 7184169689Skan * class.c (determine_primary_base): Return immediately if there 7185169689Skan are no base classes. Call mark_primary_bases here. 7186169689Skan (modify_all_direct_vtables): Remove. 7187169689Skan (modify_all_indirect_vtables): Remove. 7188169689Skan (dfs_modify_vtables_queue_p): New function. 7189169689Skan (dfs_modify_vtables): New function. 7190169689Skan (modify_all_vtables): Use them. 7191169689Skan (build_base_fields): Build FIELD_DECLs for primary virtual base 7192169689Skan classes. 7193169689Skan (create_vtable_ptr): Don't call determine_primary_base here. 7194169689Skan (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ... 7195169689Skan (dfs_set_offset_for_vbases): ... this. 7196169689Skan (layout_virtual_bases): Use it. 7197169689Skan (layout_class_type): Call determine_primary_base here. 7198169689Skan * search.c (unmarkedp): Make it global. 7199169689Skan (shared_marked_p): Simplify. 7200169689Skan (shared_unmarked_p): Likewise. 7201169689Skan (dfs_primary_bases_queue_p): Remove. 7202169689Skan (dfs_unmark_primary_bases): Likewise. 7203169689Skan (unmark_primary_bases): Likewise. 7204169689Skan (mark_primary_bases): Simplify. 7205169689Skan (get_pure_virtuals): Don't call mark_primary_bases here. 7206169689Skan (dfs_vbase_unmark): New function. 7207169689Skan (get_vbase_types): Simplify. 7208169689Skan 7209169689Skan * class.c (struct base_info): Remove. 7210169689Skan (determine_primary_base): Take has_virtual_p rather than a 7211169689Skan base_info as input. Don't calculate max_has_virtual. 7212169689Skan (finish_struct_bits): Remove max_has_virtual argument. 7213169689Skan (create_vtable_ptr): Remove max_has_virtual_p argument. 7214169689Skan (layout_virtual_bases): Remove max argument. 7215169689Skan (layout_basetypes): Likewise. 7216169689Skan (layout_class_type): Remove max_has_virtual_p argument. 7217169689Skan (finish_struct_1): Remove max_has_virtual. 7218169689Skan 7219169689Skan * cp-tree.h (dfs_mark_primary_bases_queue_p): New function. 7220169689Skan (layout_basetypes): Remove. 7221169689Skan * class.c (propagate_binfo_offsets): Moved here from tree.c. 7222169689Skan Update to handle primary virtual bases. 7223169689Skan (remove_base_fields): New function, split out from 7224169689Skan layout_basetypes. 7225169689Skan (dfs_mark_primary_bases_and_set_vbase_offsets): New function. 7226169689Skan (layout_virtual_bases): New function, split out from 7227169689Skan layout_basetypes. Update to handle primary virtual bases. 7228169689Skan (layout_basetypes): Moved here from tree.c. Use 7229169689Skan remove_base_fields and layout_virtual_bases. 7230169689Skan * search.c (dfs_mark_primary_bases_queue_p): New function. 7231169689Skan (mark_primary_bases): Use it. 7232169689Skan * tree.c (CEIL): Remove. 7233169689Skan (propagate_binfo_offsets): Remove. 7234169689Skan (layout_basetypes): Remove. 7235169689Skan 7236169689Skan2000-01-01 Mark Mitchell <mark@codesourcery.com> 7237169689Skan 7238169689Skan * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES. 7239169689Skan (BINFO_PRIMARY_MARKED_P): New macro. 7240169689Skan (SET_BINFO_PRIMARY_MARKED_P): Likewise. 7241169689Skan (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 7242169689Skan (mark_primary_bases): New function. 7243169689Skan (unmark_primary_bases): Likewise. 7244169689Skan * search.c (get_abstract_virtuals_1): Remove. 7245169689Skan (dfs_mark_primary_bases): New function. 7246169689Skan (mark_primary_bases): Likewise. 7247169689Skan (dfs_unmark_primary_bases): Likewise. 7248169689Skan (unmark_primary_bases): Likewise. 7249169689Skan (dfs_get_pure_virtuals): Likewise. 7250169689Skan 7251169689Skan2000-01-01 Mark Mitchell <mark@codesourcery.com> 7252169689Skan 7253169689Skan * cp-tree.h (skip_rtti_stuff): Adjust prototype. 7254169689Skan * class.c (skip_rtti_stuff): Reorganize parameters and return value. 7255169689Skan (modify_one_vtable): Adjust. 7256169689Skan (fixup_vtable_deltas1): Likewise. 7257169689Skan (override_one_vtable): Likewise. 7258169689Skan * search.c (get_abstract_virtuals_1): Likewise. 7259169689Skan (get_pure_virtuals): Likewise. 7260169689Skan (expand_upcast_fixups): Likewise. 7261169689Skan * tree.c (debug_binfo): Likewise. 7262169689Skan 7263169689Skan * class.c (build_vtable): Don't return a value. Don't rebuild 7264169689Skan vtables for bases that have already been handled. 7265169689Skan (prepare_fresh_vtable): Don't rebuild vtables for bases that have 7266169689Skan already been handled. 7267169689Skan (modify_one_vtable): Adjust accordingly. 7268169689Skan (fixup_vtable_deltas1): Likewise. 7269169689Skan (finish_struct_1): Likewise. 7270169689Skan 7271169689Skan2000-01-01 Martin v. L�wis <loewis@informatik.hu-berlin.de> 7272169689Skan 7273169689Skan * call.c (build_new_method_call): Also check destructors. 7274169689Skan 7275