1224524Smm2007-09-29 Jason Merrill <jason@redhat.com> 2224524Smm 3224524Smm PR c++/33094 4224524Smm * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member 5224524Smm constant to not have DECL_EXTERNAL if it's file-local. 6224524Smm 7220150Smm2007-08-24 Jakub Jelinek <jakub@redhat.com> 8220150Smm 9220150Smm PR c++/31941 10220150Smm * error.c (resolve_virtual_fun_from_obj_type_ref): Handle 11220150Smm TARGET_VTABLE_USES_DESCRIPTORS targets properly. 12220150Smm 13220150Smm PR c++/32898 14220150Smm * name-lookup.c (set_decl_namespace): lookup_qualified_name failure 15220150Smm is error_mark_node rather than NULL_TREE. 16220150Smm * pt.c (check_explicit_specialization): Likewise. 17220150Smm 18220150Smm2007-08-22 Jason Merrill <jason@redhat.com> 19220150Smm 20220150Smm PR c++/29365 21220150Smm * pt.c (outermost_tinst_level): New function. 22220150Smm * lex.c (in_main_input_context): New function. 23220150Smm * cp-tree.h: Declare it. 24220150Smm * decl2.c (constrain_class_visibility): Use it to avoid warning 25220150Smm about uses of the anonymous namespace in the main input file. 26220150Smm 27220150Smm2007-08-20 Jakub Jelinek <jakub@redhat.com> 28220150Smm 29220150Smm PR c++/32992 30220150Smm * typeck.c (check_return_expr): Don't NRV optimize vars in 31220150Smm anonymous unions. 32220150Smm * decl.c (finish_function): Comment fix. 33220150Smm 34220150Smm2007-08-18 Paolo Carlini <pcarlini@suse.de> 35220150Smm 36220150Smm PR c++/32112 37220150Smm * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE. 38220150Smm * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise. 39220150Smm 40220150Smm2007-08-10 Paolo Carlini <pcarlini@suse.de> 41220150Smm 42220150Smm PR c++/17763 43220150Smm * error.c (dump_expr): Consistently use the *_cxx_* 44220150Smm variants of the pretty-print functions. 45220150Smm 46220150Smm2007-07-30 Paolo Carlini <pcarlini@suse.de> 47220150Smm 48220150Smm PR c++/32108 49220150Smm * semantics.c (finish_label_stmt): Reject the __label__ 50220150Smm extension outside function scopes. 51220150Smm 52220150Smm2007-07-28 Simon Martin <simartin@users.sourceforge.net> 53220150Smm Mark Mitchell <mark@codesourcery.com> 54220150Smm 55220150Smm PR c++/30917 56220150Smm * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be 57220150Smm hidden due to friend declarations in local classes. 58220150Smm 59220150Smm2007-07-27 Mark Mitchell <mark@codesourcery.com> 60220150Smm 61220150Smm PR c++/32346 62220150Smm * call.c (convert_for_arg_passing): Only widen bitfields to their 63220150Smm declared types if necessary. 64220150Smm 65220150Smm2007-07-24 Paolo Carlini <pcarlini@suse.de> 66220150Smm 67220150Smm PR c++/30535 68220150Smm * pt.c (unify): Never pass error_mark_node to template_decl_level. 69220150Smm 70171825Skan2007-07-19 Release Manager 71171825Skan 72171825Skan * GCC 4.2.1 released. 73171825Skan 74171825Skan2007-07-07 Mark Mitchell <mark@codesourcery.com> 75171825Skan 76171825Skan PR c++/32232 77171825Skan * pt.c (resolve_overloaded_unification): Robustify. Return a 78171825Skan bool, not an int. 79171825Skan (type_unification_real): Adjust accordingly. 80171825Skan 81171825Skan2007-07-06 Mark Mitchell <mark@codesourcery.com> 82171825Skan 83171825Skan PR c++/32245 84171825Skan * init.c (build_zero_init): Always build an initializer for 85171825Skan non-static storage. 86171825Skan * typeck2.c (build_functional_cast): Use build_zero_init. 87171825Skan 88171825Skan PR c++/32251 89171825Skan * init.c (build_new_1): Always pass the allocation function to 90171825Skan build_op_delete_call. 91171825Skan * call.c (build_op_delete_call): Handle operator delete with a 92171825Skan variable-argument list. Do not issue an error when no matching 93171825Skan deallocation function is available for a new operator. 94171825Skan 95171825Skan PR c++/31992 96171825Skan * cp-tree.h (any_value_dependent_elements_p): Declare it. 97171825Skan * decl.c (value_dependent_init_p): New function. 98171825Skan (cp_finish_decl): Use it. 99171825Skan * pt.c (value_dependent_expression_p): Use 100171825Skan any_value_dependent_elements_p. 101171825Skan * parser.c (cp_parser_primary_expression): Add comment about 102171825Skan treating dependent qualified names as integral 103171825Skan constant-expressions. 104171825Skan 105171825Skan2007-07-03 Mark Mitchell <mark@codesourcery.com> 106171825Skan 107171825Skan PR c++/31338 108171825Skan * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE. 109171825Skan * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as 110171825Skan COMPLEX_TYPE is now an ARITHMETIC_TYPE. 111171825Skan * init.c (build_zero_init): Adjust, as 112171825Skan COMPLEX_TYPE is now a SCALAR_TYPE. 113171825Skan * typeck2.c (digest_init): Allow brace-enclosed initializers for 114171825Skan COMPLEX_TYPE, even though that is now a SCALAR_TYPE. 115171825Skan 116171825Skan2007-07-03 Richard Guenther <rguenther@suse.de> 117171825Skan 118171825Skan PR c++/32609 119171825Skan * class.c (fixed_type_or_null): Re-lookup the hashtable slot 120171825Skan after recursing. 121171825Skan 122171825Skan2007-07-02 Jakub Jelinek <jakub@redhat.com> 123171825Skan 124171825Skan PR c++/31748 125171825Skan * semantics.c (finish_omp_clauses): Use %qD instead of %qE for 126171825Skan DECL_P in not a variable and appears more than once error messages. 127171825Skan 128171825Skan2007-06-27 Simon Martin <simartin@users.sourceforge.net> 129171825Skan 130171825Skan PR c++/27492 131171825Skan * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for 132171825Skan function decls. 133171825Skan 134171825Skan2007-06-15 Mark Mitchell <mark@codesourcery.com> 135171825Skan 136171825Skan * cp-tree.h (DECL_VAR_MARKED_P): Remove. 137171825Skan (DECL_ANON_UNION_VAR_P): New macro. 138171825Skan * class.c (fixed_type_or_null): Tidy. Use a hash table, rather 139171825Skan than DECL_VAR_MARKED_P, to keep track of which variables we have 140171825Skan seen. 141171825Skan * decl.c (redeclaration_error_message): Complain about redeclaring 142171825Skan anonymous union members at namespace scope. 143171825Skan * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P. 144171825Skan 145171825Skan2007-06-08 Dirk Mueller <dmueller@suse.de> 146171825Skan 147171825Skan PR c++/31809 148171825Skan PR c++/31806 149171825Skan Backport from mainline: 150171825Skan 2007-05-31 Jakub Jelinek <jakub@redhat.com> 151171825Skan 152171825Skan * decl.c (cp_finish_decl): Also clear was_readonly if a static var 153171825Skan needs runtime initialization. 154171825Skan 155171825Skan 2007-05-30 Jakub Jelinek <jakub@redhat.com> 156171825Skan 157171825Skan * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC 158171825Skan variables that need runtime initialization. 159171825Skan 160169689Skan2007-05-13 Release Manager 161161651Skan 162169689Skan * GCC 4.2.0 released. 163161651Skan 164169689Skan2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com> 165161651Skan 166169689Skan PR C++/30221 167169689Skan * decl.c (reshape_init_r): Don't reshape the first element if it 168169689Skan is a pointer to member function. 169169689Skan 170169689Skan2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com> 171169689Skan 172169689Skan PR C++/30016 173169689Skan * typeck.c (build_reinterpret_cast_1): Only allow conversion to 174169689Skan integeral types from vectors types. 175169689Skan 176169689Skan2007-04-26 Jakub Jelinek <jakub@redhat.com> 177169689Skan 178169689Skan PR c++/31598 179169689Skan * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO 180169689Skan for type dependent OMP_CLAUSE_DECLs. 181169689Skan 182169689Skan2007-04-24 Paolo Carlini <pcarlini@suse.de> 183169689Skan 184169689Skan PR c++/30500 185169689Skan * pt.c (instantiate_decl): Set in_system_header. 186169689Skan 187169689Skan2007-04-17 Simon Martin <simartin@users.sourceforge.net> 188169689Skan 189169689Skan PR c++/31517 190169689Skan * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs. 191169689Skan 192169689Skan2007-04-16 Mark Mitchell <mark@codesourcery.com> 193169689Skan 194169689Skan PR c++/31513 195169689Skan * call.c (convert_for_arg_passing): Convert bitfields to their 196169689Skan declared types. 197169689Skan 198169689Skan2007-04-13 Jason Merrill <jason@redhat.com> 199169689Skan 200169689Skan PR c++/31074 201169689Skan * call.c (reference_binding): Add c_cast_p parm. If true, 202169689Skan add quals to TO as needed to make it reference-compatible. 203169689Skan 204169689Skan2007-04-10 Mike Stump <mrs@apple.com> 205169689Skan 206169689Skan * class.c (dfs_accumulate_vtbl_inits): Slam the vtbl type back to 207169689Skan vtbl_ptr_type_node to ensure the mode is correct. 208169689Skan 209169689Skan2007-04-09 Mark Mitchell <mark@codesourcery.com> 210169689Skan 211169689Skan PR c++/31449 212169689Skan * class.c (build_base_path): Ensure that the converted pointer has 213169689Skan the same cv-qualification as the input. 214169689Skan 215169689Skan2007-04-03 Jakub Jelinek <jakub@redhat.com> 216169689Skan 217169689Skan PR c++/30847 218169689Skan * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void 219169689Skan type issue error and return early. 220169689Skan 221169689Skan2007-03-30 Jason Merrill <jason@redhat.com> 222169689Skan 223169689Skan PR c++/31187 224169689Skan * typeck.c (cp_type_readonly): New fn. 225169689Skan * cp-tree.h: Declare it. 226169689Skan * decl.c (start_decl): Set implicit DECL_THIS_STATIC here. 227169689Skan (cp_finish_decl): Not here. 228169689Skan 229169689Skan2007-03-31 Diego Novillo <dnovillo@redhat.com> 230169689Skan Mark Mitchell <mark@codesourcery.com> 231169689Skan 232169689Skan PR 29585 233169689Skan * class.c (dfs_accumulate_vtbl_inits): Use build_address 234169689Skan to build the vtbl entry. 235169689Skan 236169689Skan2007-03-22 Mark Mitchell <mark@codesourcery.com> 237169689Skan 238169689Skan PR c++/30863 239169689Skan * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do 240169689Skan not consume tokens when failing. 241169689Skan 242169689Skan2007-03-22 Jim Wilson <wilson@specifix.com> 243169689Skan Mark Mitchell <mark@codesourcery.com> 244169689Skan 245169689Skan PR c++/31273 246169689Skan * call.c (standard_conversion): Use type_decays_to. Keep FCODE 247169689Skan consistent with FROM. 248169689Skan 249169689Skan2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com> 250169689Skan 251169689Skan PR c++/31165 252169689Skan * call.c (convert_default_arg): Instead of copying the node, 253169689Skan unshare it. 254169689Skan 255169689Skan2007-03-13 Mark Mitchell <mark@codesourcery.com> 256169689Skan 257169689Skan PR bootstrap/30899 258169689Skan * Make-lang.in (doc/g++.1): Use $< to specify the location from 259169689Skan which to copy. 260169689Skan 261169689Skan2007-03-11 Mark Mitchell <mark@codesourcery.com> 262169689Skan 263169689Skan PR c++/31038 264169689Skan * parser.c (cp_parser_postfix_expression): Disallow compound 265169689Skan literals in constant expressions. 266169689Skan 267169689Skan2007-03-11 Ian Lance Taylor <iant@google.com> 268169689Skan 269169689Skan Backported -fstrict-overflow/-Wstrict-overflow from mainline: 270169689Skan 2007-01-17 Ian Lance Taylor <iant@google.com> 271169689Skan 272169689Skan * class.c (add_method): Call VEC_reserve_exact rather than passing 273169689Skan a negative size to VEC_reserve. 274169689Skan 275169689Skan2007-03-11 Mark Mitchell <mark@codesourcery.com> 276169689Skan 277169689Skan PR c++/31038 278169689Skan * parser.c (cp_parser_postfix_expression): Disallow compound 279169689Skan literals in constant expressions. 280169689Skan 281169689Skan PR c++/30328 282169689Skan * semantics.c (finish_typeof): Use unlowered_expr_type. 283169689Skan 284169689Skan2007-03-10 Mark Mitchell <mark@codesourcery.com> 285169689Skan 286169689Skan PR c++/30274 287169689Skan * cp-tree.h (unlowered_expr_type): New function. 288169689Skan * typeck.c (is_bitfield_expr_with_lowered_type): Handle 289169689Skan COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR. 290169689Skan (unlowered_expr_type): New function. 291169689Skan (build_unary_op): Disallow predecrements of bool bitfields. 292169689Skan * call.c (build_conditional_expr): Use unlowered_expr_type. 293169689Skan * pt.c (type_unification_real): Likewise. 294169689Skan 295169689Skan2007-03-08 Andrew Pinski <pinskia@gmail.com> 296169689Skan 297169689Skan PR C++/30168 298169689Skan * optimize.c (update_cloned_parm): Copy DECL_COMPLEX_GIMPLE_REG_P also. 299169689Skan 300169689Skan2007-03-08 Volker Reichelt <reichelt@netcologne.de> 301169689Skan 302169689Skan PR c++/30852 303169689Skan * semantics.c (finish_offsetof): Handle COMPOUND_EXPR. 304169689Skan 305169689Skan2007-03-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org> 306169689Skan 307169689Skan * typeck.c (build_binary_op): Replace -Wstring-literal-comparison 308169689Skan and -Walways-true with -Waddress. 309169689Skan * cvt.c (convert_to_void): Replace unconditional warning with 310169689Skan -Waddress. 311169689Skan 312169689Skan2007-03-05 Simon Martin <simartin@users.sourceforge.net> 313169689Skan 314169689Skan PR c++/30895 315169689Skan * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees. 316169689Skan 317169689Skan2007-02-22 Simon Martin <simartin@users.sourceforge.net> 318169689Skan 319169689Skan PR c++/29475 320169689Skan * cp-tree.h (struct deferred_access_check): New structure to represent a 321169689Skan deferred access check. It replaces the previous representation as a tree. 322169689Skan (get_deferred_access_checks): Return a vector of struct 323169689Skan deferred_access_check instead of a tree list. 324169689Skan (perform_access_checks): Take a vector of struct deferred_access_check 325169689Skan instead of a tree list. 326169689Skan (enforce_access, perform_or_defer_access_check): Added an 327169689Skan extra argument that represents the declaration to use to print 328169689Skan potential error messages. 329169689Skan * semantics.c (struct deferred_access): Store the deferred access checks 330169689Skan as a vector of struct deferred_access_check instead of a tree list. 331169689Skan (push_deferring_access_checks): Handle the change in struct 332169689Skan deferred_access. 333169689Skan (get_deferred_access_checks): Likewise. 334169689Skan (pop_to_parent_deferring_access_checks): Likewise. 335169689Skan (perform_or_defer_access_check): Likewise. 336169689Skan (perform_access_checks): Take a vector of struct deferred_access_check 337169689Skan instead of a tree list. 338169689Skan (finish_non_static_data_member, check_accessibility_of_qualified_id, 339169689Skan finish_id_expression): Adjusted the call to perform_or_defer_access_check. 340169689Skan (pop_to_parent_deferring_access_checks, perform_access_checks, 341169689Skan perform_or_defer_access_check): Adjusted the call to enforce_access. 342169689Skan * parser.c (struct tree_check): New structure to store various data 343169689Skan associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token. 344169689Skan (struct cp_token): Changed the value field to be a union with a pointer to 345169689Skan a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID 346169689Skan tokens and a tree field for all other tokens. 347169689Skan (eof_token): Adjusted due to the change in struct cp_token. 348169689Skan (cp_lexer_get_preprocessor_token): Likewise. 349169689Skan (cp_lexer_purge_token): Likewise. 350169689Skan (cp_lexer_purge_tokens_after): Likewise. 351169689Skan (cp_lexer_print_token): Likewise. 352169689Skan (cp_parser_error): Likewise. 353169689Skan (cp_parser_identifier): Likewise. 354169689Skan (cp_parser_string_literal): Likewise. 355169689Skan (cp_parser_primary_expression): Likewise. 356169689Skan (cp_parser_unqualified_id): Likewise. 357169689Skan (cp_parser_parenthesized_expression_list): Likewise. 358169689Skan (cp_parser_storage_class_specifier_opt): Likewise. 359169689Skan (cp_parser_function_specifier_opt): Likewise. 360169689Skan (cp_parser_type_specifier): Likewise. 361169689Skan (cp_parser_simple_type_specifier): Likewise. 362169689Skan (cp_parser_initializer_list): Likewise. 363169689Skan (cp_parser_member_specification_opt): Likewise. 364169689Skan (cp_parser_attribute_list): Likewise. 365169689Skan (cp_parser_objc_expression): Likewise. 366169689Skan (cp_parser_objc_protocol_qualifiers): Likewise. 367169689Skan (cp_parser_objc_selector): Likewise. 368169689Skan (cp_parser_objc_declaration): Likewise. 369169689Skan (cp_parser_objc_statement): Likewise. 370169689Skan (cp_parser_omp_clause_name): Likewise. 371169689Skan (cp_parser_omp_clause_default): Likewise. 372169689Skan (cp_parser_omp_clause_schedule): Likewise. 373169689Skan (cp_parser_omp_parallel): Likewise. 374169689Skan (cp_parser_initial_pragma): Likewise. 375169689Skan (pragma_lex): Likewise. 376169689Skan (cp_parser_pre_parsed_nested_name_specifier): Likewise. 377169689Skan (cp_parser_nested_name_specifier_opt): Likewise. 378169689Skan Use cp_token::u::tree_check_value to save the token's value, the 379169689Skan associated deferred checks and its qualifying scope. 380169689Skan (cp_parser_template_id): Likewise. 381169689Skan (cp_parser_template_declaration_after_export): Adjusted the call to 382169689Skan get_deferred_access_checks. 383169689Skan (cp_parser_init_declarator): Take the access checks as a vector of struct 384169689Skan deferred_access_check instead of a tree list. 385169689Skan (cp_parser_single_declaration): Likewise. 386169689Skan (cp_parser_perform_template_parameter_access_checks): Likewise. 387169689Skan (cp_parser_simple_declaration): Adjusted the call to 388169689Skan cp_parser_init_declarator. 389169689Skan (cp_parser_explicit_specialization): Adjusted the call to 390169689Skan cp_parser_single_declaration. 391169689Skan (cp_parser_template_id, cp_parser_pre_parsed_nested_name_specifier): 392169689Skan Adjusted the call to perform_or_defer_access_check. 393169689Skan * init.c (build_offset_ref): Adjusted the call to 394169689Skan perform_or_defer_access_check. 395169689Skan * class.c (alter_access, resolve_address_of_overloaded_function): 396169689Skan Likewise. 397169689Skan * decl.c (make_typename_type, make_unbound_class_template): Likewise. 398169689Skan * search.c (lookup_member): Likewise. 399169689Skan * friend.c (add_friend): Likewise. 400169689Skan * call.c (enforce_access): Use the new extra argument to build the 401169689Skan error message. 402169689Skan (build_op_delete_call): Adjusted the call to 403169689Skan perform_or_defer_access_check. 404169689Skan (build_over_call): Likewise. 405169689Skan 406169689Skan2007-02-19 Mark Mitchell <mark@codesourcery.com> 407169689Skan 408169689Skan * call.c (build_new_method_call): Ensure that explicit calls of 409169689Skan destructors have type "void". 410169689Skan 411169689Skan2007-02-11 Mark Mitchell <mark@codesourcery.com> 412169689Skan 413169689Skan PR c++/26988 414169689Skan * pt.c (determine_specialization): Use skip_artificial_parms_for. 415169689Skan (fn_type_unificiation): Likewise. 416169689Skan (get_bindings): Likewise. 417169689Skan 418169689Skan2007-02-06 Mark Mitchell <mark@codesourcery.com> 419169689Skan 420169689Skan PR target/29487 421169689Skan * decl.c (finish_function): Use DECL_REPLACEABLE. 422169689Skan * tree.c (cp_cannot_inline_tree_fn): Likewise. 423169689Skan 424169689Skan2007-02-07 Jakub Jelinek <jakub@redhat.com> 425169689Skan 426169689Skan PR c++/30703 427169689Skan * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref 428169689Skan parameters and result decls in omp clauses. 429169689Skan (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs 430169689Skan by reference. 431169689Skan 432169689Skan2007-02-02 Jakub Jelinek <jakub@redhat.com> 433169689Skan 434169689Skan PR c++/30536 435169689Skan * decl.c (grokdeclarator): If __thread is used together with 436169689Skan a storage class other than extern and static, clear thread_p 437169689Skan after issuing diagnostics and fall through to checking the 438169689Skan storage class. 439169689Skan 440169689Skan2007-01-28 Andrew Pinski <pinskia@gmail.com> 441169689Skan 442169689Skan PR C++/28988 443169689Skan * semantics.c (finish_pseudo_destructor_expr): Check the 444169689Skan destrutor name by calling check_dtor_name. 445169689Skan 446169689Skan2007-01-10 Mark Mitchell <mark@codesourcery.com> 447169689Skan 448169689Skan PR c++/28999 449169689Skan * decl.c (make_typename_type): If the qualified name is not a 450169689Skan type, issue an error. 451169689Skan * parser.c (cp_parser_elaborated_type_specifier): Fix comment 452169689Skan formatting. 453169689Skan 454169689Skan2006-12-11 Mark Mitchell <mark@codesourcery.com> 455169689Skan 456169689Skan PR c++/29732 457169689Skan * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations. 458169689Skan (explicit_class_specialization_p): Declare. 459169689Skan * pt.c (explicit_class_specialization_p): New function. 460169689Skan * parser.c (cp_parser_init_declarator): Check correct number of 461169689Skan template parameters for in-class function definitions. 462169689Skan (cp_parser_check_declarator_template_parameters): Stop looking for 463169689Skan template classes when we find an explicit specialization. 464169689Skan 465169689Skan2006-12-07 Lee Millward <lee.millward@codesourcery.com> 466169689Skan 467169689Skan PR c++/29980 468169689Skan * cp_parser_elaborated_type_specifier: Check 469169689Skan the return value of check_elaborated_type_specifier. 470169689Skan 471169689Skan2006-12-06 Mark Mitchell <mark@codesourcery.com> 472169689Skan 473169689Skan PR c++/29730 474169689Skan * parser.c (cp_parser_init_declarator): Reject initialization of 475169689Skan functions. 476169689Skan 477169689Skan2006-12-06 Mark Mitchell <mark@codesourcery.com> 478169689Skan 479169689Skan PR c++/29729 480169689Skan * decl2.c (check_member_template): Move check for member 481169689Skan templates in local classes to ... 482169689Skan * parser.c (cp_parser_template_declaration_after_export): 483169689Skan ... here. 484169689Skan 485169689Skan2006-12-05 Mark Mitchell <mark@codesourcery.com> 486169689Skan 487169689Skan PR c++/29728 488169689Skan * decl.c (check_array_designated_initializer): New function. 489169689Skan (maybe_deduce_size_from_array_init): Use it. 490169689Skan (reshape_init_array): Likewise. 491169689Skan 492169689Skan2006-12-04 Mark Mitchell <mark@codesourcery.com> 493169689Skan 494169689Skan PR c++/29733 495169689Skan * pt.c (tsubst_decl): Disallow variables of function type. 496169689Skan 497169689Skan2006-12-04 Mark Mitchell <mark@codesourcery.com> 498169689Skan 499169689Skan PR c++/29632 500169689Skan * call.c (add_builtin_candidate): Do not permit NULL pointer 501169689Skan constants to be compared with template parameters. 502169689Skan 503169689Skan2006-12-04 Richard Henderson <rth@redhat.com> 504169689Skan Andrew Pinski <pinskia@gmail.com> 505169689Skan 506169689Skan PR C++/14329 507169689Skan * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR. 508169689Skan 509169689Skan2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 510169689Skan 511169689Skan PR c++/30022 512169689Skan * typeck.c (type_after_usual_arithmetic_conversions): 513169689Skan Fix assertion for vector types. 514169689Skan (build_binary_op): Use temporary for inner type of vector types. 515169689Skan 516169689Skan2006-11-29 Lee Millward <lee.millward@codesourcery.com> 517169689Skan 518169689Skan PR c++/29022 519169689Skan * parser.c (cp_parser_class_head): Move processing 520169689Skan of any base classes to... 521169689Skan (cp_parser_class_specifier) ...here. Take an extra 522169689Skan tree* parameter for any base classes. Only process 523169689Skan them if the opening brace was found. 524169689Skan 525169689Skan2006-11-28 Jakub Jelinek <jakub@redhat.com> 526169689Skan 527169689Skan PR c++/29735 528169689Skan * decl.c (grokfndecl): Check main's type after applying 529169689Skan attributes, not before. 530169689Skan 531169689Skan2006-11-26 Mark Mitchell <mark@codesourcery.com> 532169689Skan 533169689Skan PR c++/29886 534169689Skan * parser.c (cp_parser): Add in_function_body. 535169689Skan (cp_parser_new): Initialize it. 536169689Skan (cp_parser_primary_expression): Use parser->in_function_body 537169689Skan instead of at_function_scope_p. 538169689Skan (cp_parser_asm_definition): Likewise. 539169689Skan (cp_parser_direct_declarator): Likewise. 540169689Skan (cp_parser_class_specifier): Clear parser->in_function_body. 541169689Skan (cp_parser_constructor_declarator_p): Use parser->in_function_body 542169689Skan instead of at_function_scope_p. 543169689Skan (cp_parser_function_body_after_declarator): Set 544169689Skan parser->in_function_body. 545169689Skan 546169689Skan2006-11-21 Jakub Jelinek <jakub@redhat.com> 547169689Skan 548169689Skan PR c++/29570 549169689Skan * decl.c (cp_finish_decl): Check for value dependent brace enclosed 550169689Skan scalar initializer. 551169689Skan 552169689Skan PR c++/29734 553169689Skan * cp-tree.h (WANT_VECTOR): Define. 554169689Skan (WANT_ARITH): Add WANT_VECTOR. 555169689Skan * cvt.c (build_expr_type_conversion): Handle vector types. 556169689Skan * typeck.c (build_unary_op): Add WANT_VECTOR to 557169689Skan build_expr_type_conversion flags. 558169689Skan 559169689Skan2006-11-13 Mark Mitchell <mark@codesourcery.com> 560169689Skan 561169689Skan PR c++/29518 562169689Skan * pt.c (coerce_template_parms): Do not skip_evaluation while 563169689Skan substituting template arguments. 564169689Skan 565169689Skan2006-10-22 Nathan Sidwell <nathan@codesourcery.com> 566169689Skan 567169689Skan PR c++/20647 568169689Skan * rtti.c (tinfo_base_init): The type info string is always global. 569169689Skan 570169689Skan2006-10-20 Lee Millward <lee.millward@codesourcery.com> 571169689Skan Mark Mitchell <mark@codesourcery.com> 572169689Skan 573169689Skan PR c++/28053 574169689Skan * decl2.c (grokbitfield): Detect invalid non-integral 575169689Skan types earlier when possible. 576169689Skan 577169689Skan2006-10-18 Mark Shinwell <shinwell@codesourcery.com> 578169689Skan 579169689Skan PR c++/26884 580169689Skan * typeck2.c (digest_init): Raise error upon attempts to 581169689Skan initialize arrays with variables. 582169689Skan 583169689Skan2006-10-17 Lee Millward <lee.millward@codesourcery.com> 584169689Skan 585169689Skan PR c++/27952 586169689Skan * cp-tree.h (xref_basetypes): Return bool instead of void. 587169689Skan * decl.c (xref_basetypes): Adjust definition. Return false 588169689Skan if the class bases are invalid. 589169689Skan * parser.c (cp_parser_class_head): Check the return value 590169689Skan from xref_basetypes. 591169689Skan 592169689Skan2006-10-17 Mark Mitchell <mark@codesourcery.com> 593169689Skan 594169689Skan PR c++/28261 595169689Skan * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add 596169689Skan comment. 597169689Skan 598169689Skan PR c++/28261 599169689Skan * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New 600169689Skan function. 601169689Skan (cp_parser_constructor_declarator_p): Use it. 602169689Skan (cp_parser_check_type_definition): Return a value indicating 603169689Skan whether or not the definition is valid. 604169689Skan (cp_parser_enum_specifier): Skip invalid enum definitions. 605169689Skan 606169689Skan2006-10-17 Mark Mitchell <mark@codesourcery.com> 607169689Skan 608169689Skan PR c++/29039 609169689Skan * typeck2.c (build_functional_cast): Don't zero-initialize 610169689Skan non-PODs; instead, call their constructors. 611169689Skan * method.c (synthesize_method): Always build mem-initializers, if 612169689Skan we're synthesizing the default constructor. 613169689Skan 614169689Skan2006-10-17 Mark Mitchell <mark@codesourcery.com> 615169689Skan 616169689Skan PR c++/27270 617169689Skan * decl.c (reshape_init_class): Move check for designated 618169689Skan to ... 619169689Skan * parser.c (cp_parser_initializer_list): ... here. 620169689Skan * pt.c (tsubst_copy_and_build): Use finish_compound_literal. 621169689Skan 622169689Skan2006-10-16 Mark Mitchell <mark@codesourcery.com> 623169689Skan 624169689Skan PR c++/27270 625169689Skan * typeck2.c (process_init_constructor_array): Reword comment. 626169689Skan * pt.c (tsubst_copy_and_built): Call reshape_init before calling 627169689Skan digest_init. 628169689Skan 629169689Skan PR c++/29408 630169689Skan * parser.c (cp_parser_using_declaration): Stop parsing when 631169689Skan something goes wrong with an access declaration. 632169689Skan 633169689Skan PR c++/29435 634169689Skan * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent 635169689Skan types when their sizes are required. Refine test for VLAs. 636169689Skan 637169689Skan PR c++/28211 638169689Skan * parser.c (cp_parser_template_argument): Don't consider "&var" a 639169689Skan possible constant-expression. 640169689Skan * pt.c (convert_nontype_argument): Refine handling of arguments of 641169689Skan pointer type. 642169689Skan 643169689Skan2006-10-13 Mark Mitchell <mark@codesourcery.com> 644169689Skan 645169689Skan PR c++/28506 646169689Skan * parser.c (function_declarator_p): New function. 647169689Skan (cp_parser_init_declarator): Use it. 648169689Skan (cp_parser_member_declaration): Likewise. 649169689Skan 650169689Skan2006-10-12 Mark Mitchell <mark@codesourcery.com> 651169689Skan 652169689Skan PR c++/29318 653169689Skan * rtti.c (get_tinfo_decl): Refuse to create type info objects for 654169689Skan variably modified types. 655169689Skan 656169689Skan2006-10-12 Lee Millward <lee.millward@codesourcery.com> 657169689Skan 658169689Skan PR c++/27961 659169689Skan * decl.c (start_decl): Return error_mark_node if a 660169689Skan function is initialized like a variable. 661169689Skan (check_var_type): If a variable of field is declared void, 662169689Skan set the type to error_mark_node. 663169689Skan (grokdeclarator): Check the return type of check_var_type. 664169689Skan * class.c (finish_struct_1): Robustify. 665169689Skan 666169689Skan2006-10-11 Mark Mitchell <mark@codesourcery.com> 667169689Skan 668169689Skan PR c++/29175 669169689Skan * decl.c (check_initializer): Issue errors about trying to 670169689Skan initialize arrays whose elements have variable size. 671169689Skan 672169689Skan2006-10-11 Lee Millward <lee.millward@codesourcery.com> 673169689Skan 674169689Skan PR c++/29024 675169689Skan * cp-tree (struct cp_decl_specifier_seq): Rename to 676169689Skan conflicting_specifiers_p 677169689Skan * parser.c (cp_parser_set_storage_class): Set 678169689Skan conflicting_specifiers_p for the input decl specifier 679169689Skan if a typedef specifier is present. Rename uses of 680169689Skan multiple_specifiers_p to conflicting_specifiers_p. 681169689Skan (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage 682169689Skan class specifier has already been set for this declaration, 683169689Skan set conflicting_specifiers_p to true on the decl_specs. 684169689Skan * decl.c (grokdeclarator): Rename uses of 685169689Skan multiple_specifiers_p to conflicting_specifiers_p. 686169689Skan 687169689Skan2006-10-10 Brooks Moses <bmoses@stanford.edu> 688169689Skan 689169689Skan * Make-lang.in: Added "c++.pdf" target support. 690169689Skan 691169689Skan2006-10-10 Richard Guenther <rguenther@suse.de> 692169689Skan 693169689Skan PR rtl-optimization/29323 694169689Skan * decl.c (finish_function): Set TREE_NOTHROW only for 695169689Skan functions that bind local. 696169689Skan 697169689Skan2006-10-09 Richard Henderson <rth@redhat.com> 698169689Skan 699169689Skan Revert emutls patch. 700169689Skan 701169689Skan2006-10-04 Richard Henderson <rth@redhat.com> 702169689Skan Jakub Jelinek <jakub@redhat.com> 703169689Skan 704169689Skan * decl.c (grokvardecl): Don't error if !have_tls. 705169689Skan (grokdeclarator): Likewise. 706169689Skan * parser.c (cp_parser_omp_threadprivate): Likewise. 707169689Skan 708169689Skan2006-10-03 Mark Mitchell <mark@codesourcery.com> 709169689Skan 710169689Skan PR c++/29020 711169689Skan * friend.c (do_friend): Improve comments; add assertion. 712169689Skan * parser.c (cp_parser_nested_name_specifier_opt): Resolve 713169689Skan typenames for qualified names used in declarations, even when 714169689Skan caching qualified name lookup. 715169689Skan 716169689Skan PR c++/29138 717169689Skan * decl2.c (grokfield): Don't handle access declarations here. 718169689Skan * parser.c (cp_parser_using_declaration): Handle access 719169689Skan declarations too. 720169689Skan (cp_parser_block_declaration): Adjust calls to 721169689Skan cp_parser_using_declaration. 722169689Skan (cp_parser_member_declaration): Likewise. Use 723169689Skan cp_parser_using_declaration to look for access_declarations. 724169689Skan 725169689Skan2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 726169689Skan 727169689Skan PR c++/29291 728169689Skan * init.c (build_new): Check for invalid init. 729169689Skan 730169689Skan2006-10-02 Mark Mitchell <mark@codesourcery.com> 731169689Skan 732169689Skan PR c++/29226 733169689Skan * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do 734169689Skan not try to actually evaluate sizeof for a VLA type. 735169689Skan 736169689Skan2006-10-01 Mark Mitchell <mark@codesourcery.com> 737169689Skan 738169689Skan PR c++/29105 739169689Skan * pt.c (tsubst_baselink): Substituteinto the qualifying scope. 740169689Skan * semantics.c (baselink_for_fns): Build a baselink, even when 741169689Skan processing a template. 742169689Skan 743169689Skan PR c++/29080 744169689Skan * parser.c (cp_parser_postfix_dot_deref_expression): Use 745169689Skan BASELINK_ACCESS_BINFO as the qualifying scope when calling 746169689Skan adjust_result_of_qualified_name_lookup. 747169689Skan 748169689Skan2006-09-25 Lee Millward <lee.millward@codesourcery.com> 749169689Skan 750169689Skan PR c++/27329 751169689Skan PR c++/26938 752169689Skan * cp-tree.h (redeclare_class_template): Adjust declaration 753169689Skan to return bool instead of void. 754169689Skan * pt.c (redeclare_class_template): Update definition. 755169689Skan Return false on error. 756169689Skan * decl.c (xref_tag): Return error_mark_node if 757169689Skan redeclare_class_template returned false. 758169689Skan 759169689Skan PR c++/27667 760169689Skan * cp-tree.h (begin_specialization): Return bool 761169689Skan instead of void. 762169689Skan * pt.c (check_specialization_scope): Likwise. 763169689Skan Adjust comment. Return false if a specialization 764169689Skan isn't permitted in the current scope. 765169689Skan (begin_specialization): Use the return value of 766169689Skan check_specialization_scope. 767169689Skan * parser.c (cp_parser_explicit_specialization): If 768169689Skan begin_specialization returned false, skip the rest 769169689Skan of the specialization. 770169689Skan 771169689Skan2006-09-21 Mark Mitchell <mark@codesourcery.com> 772169689Skan 773169689Skan PR c++/29016 774169689Skan * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a 775169689Skan BASELINK. 776169689Skan 777169689Skan2006-09-21 Lee Millward <lee.millward@codesourcery.com> 778169689Skan 779169689Skan PR c++/28861 780169689Skan * decl.c (shadow_tag): Return error_mark_node 781169689Skan if maybe_process_partial_specialization failed. 782169689Skan 783169689Skan PR c++/28303 784169689Skan * decl.c (grokdeclarator): Return error_mark_node on 785169689Skan declaration with two or more data types. 786169689Skan 787169689Skan2006-09-20 Danny Smith <dannysmith@users.sourceforge.net> 788169689Skan 789169689Skan PR target/27650 790169689Skan * class.c (check_for_override): Remove dllimport from virtual 791169689Skan methods. 792169689Skan 793169689Skan2006-09-18 Steven Bosscher <steven@gcc.gnu.org> 794169689Skan 795169689Skan PR c++/29087 796169689Skan * parser.c (cp_parser_labeled_statement): Return nothing. Do 797169689Skan not take in_statement_expr and in_compound as arguments. Rename 798169689Skan to cp_parser_label_for_labeled_statement. Parse only the label, 799169689Skan not the statement. 800169689Skan (cp_parser_statement): Parse the statement of a labeled-statement 801169689Skan from here, using tail recursion. 802169689Skan 803169689Skan2006-09-14 Andrew Pinski <pinskia@physics.uc.edu> 804169689Skan 805169689Skan PR C++/29002 806169689Skan * init.c (build_zero_init): If we have an error mark node for 807169689Skan the array size, return. 808169689Skan 809169689Skan2006-09-10 Mark Mitchell <mark@codesourcery.com> 810169689Skan 811169689Skan PR c++/28991 812169689Skan * cp-objcp-common.c (cxx_staticp): New function. 813169689Skan * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it. 814169689Skan * cp-tree.h (cxx_staticp): New function. 815169689Skan 816169689Skan2006-09-09 Jason Merrill <jason@redhat.com> 817169689Skan 818169689Skan PR c++/28996 819169689Skan * cvt.c (convert_to_void): Strip COMPONENT_REF to functions. 820169689Skan 821169689Skan2006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 822169689Skan 823169689Skan PR c++/28858 824169689Skan * parser.c (cp_parser_skip_until_found): Rename to 825169689Skan cp_parser_skip_to_end_of_template_parameter_list. Remove last two 826169689Skan parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'. 827169689Skan Reorganize. Adjust comment. 828169689Skan (cp_parser_template_declaration_after_export): Adjust call. 829169689Skan (cp_parser_enclosed_template_argument_list): Likewise. 830169689Skan 831169689Skan2006-09-07 Andrew Pinski <pinskia@physics.uc.edu> 832169689Skan 833169689Skan PR C++/28906 834169689Skan * init.c (build_new_1): Build a distinct type copy 835169689Skan for the array type that was returned from 836169689Skan build_cplus_array_type. 837169689Skan 838169689Skan2006-09-07 Jason Merrill <jason@redhat.com> 839169689Skan 840169689Skan PR c++/27371 841169689Skan * cvt.c (convert_to_void): Enable previous change. 842169689Skan 843169689Skan PR c++/26957 844169689Skan * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied 845169689Skan parms. 846169689Skan 847169689Skan2006-09-07 Simon Martin <simartin@users.sourceforge.net> 848169689Skan 849169689Skan PR c++/28284 850169689Skan * pt.c (fold_non_dependent_expr): Make sure expr is not 851169689Skan dereferenced if it is NULL. 852169689Skan 853169689Skan2006-09-06 Zak Kipling <zak@transversal.com> 854169689Skan 855169689Skan PR c++/26195 856169689Skan * decl.c (make_rtl_for_nonlocal_decl), 857169689Skan (start_preparsed_function): Don't use lbasename on 858169689Skan input_filename when calling get_fileinfo. 859169689Skan * semantics.c (begin_class_definition): Likewise. 860169689Skan * lex.c (cxx_make_type): Likewise. 861169689Skan (handle_pragma_interface): Call get_fileinfo on input_filename, 862169689Skan not on the parameter to the directive. 863169689Skan 864169689Skan2006-09-06 Mark Mitchell <mark@codesourcery.com> 865169689Skan 866169689Skan PR c++/28903 867169689Skan * pt.c (tsubst): Use fold_non_dependent_expr to fold array 868169689Skan dimensions. 869169689Skan 870169689Skan PR c++/28886 871169689Skan * pt.c (unify): Avoid unnecessary calls to fold_build2 for array 872169689Skan dimensions. 873169689Skan 874169689Skan2006-09-06 Jason Merrill <jason@redhat.com> 875169689Skan 876169689Skan PR c++/27371 877169689Skan * cvt.c (convert_to_void): Strip useless TARGET_EXPR. 878169689Skan * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro. 879169689Skan * tree.c (build_cplus_new): Set it. 880169689Skan 881169689Skan PR c++/26696 882169689Skan * cvt.c (convert_to_void): Replace a subexpression with no side 883169689Skan effects with void_zero_node. 884169689Skan * tree.c (is_overloaded_fn): Look through COMPONENT_REF. 885169689Skan (get_first_fn): Ditto. 886169689Skan * decl.c (grokdeclarator): No need to look through COMPONENT_REF. 887169689Skan 888169689Skan2006-09-05 Jason Merrill <jason@redhat.com> 889169689Skan 890169689Skan PR c++/26571 891169689Skan * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case 892169689Skan where the name is a type used incorrectly. 893169689Skan 894169689Skan PR c++/26671 895169689Skan * typeck.c (maybe_warn_about_returning_address_of_local): Look 896169689Skan through COMPONENT_REF and ARRAY_REF. 897169689Skan 898169689Skan PR c++/26102 899169689Skan * name-lookup.c (do_class_using_decl): Try to find the base even 900169689Skan if bases_dependent_p. 901169689Skan * pt.c (type_dependent_expression_p): A USING_DECL is dependent. 902169689Skan 903169689Skan PR c++/19809 904169689Skan * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl. 905169689Skan 906169689Skan2006-09-04 Nathan Sidwell <nathan@codesourcery.com> 907169689Skan 908169689Skan PR 23287 Revert my 2006-09-01 patch. 909169689Skan * parser.c: Reverted. 910169689Skan * pt.c: Reverted. 911169689Skan 912169689Skan2006-09-02 Lee Millward <lee.millward@codesourcery.com> 913169689Skan 914169689Skan PR c++/27670 915169689Skan PR c++/27493 916169689Skan PR c++/27494 917169689Skan PR c++/27397 918169689Skan * parser.c (cp_parser_template_parameter_list): Add 919169689Skan invalid template parameters to the parameter list as 920169689Skan error_mark_node. 921169689Skan 922169689Skan2006-09-02 Jakub Jelinek <jakub@redhat.com> 923169689Skan 924169689Skan PR c++/28878 925169689Skan * except.c (build_throw): Only set current_function_returns_abnormally 926169689Skan if cfun is not NULL. 927169689Skan 928169689Skan PR c++/26917 929169689Skan * repo.c (repo_file): Remove. 930169689Skan (open_repo_file, reopen_repo_file_for_write): Return fopened 931169689Skan FILE * instead of setting global repo_file variable. 932169689Skan (init_repo): Adjust caller. 933169689Skan (finish_repo): Likewise. Return instead of goto out before 934169689Skan reopen_repo_file_for_write has been called. 935169689Skan 936169689Skan2006-09-01 Nathan Sidwell <nathan@codesourcery.com> 937169689Skan 938169689Skan PR c++/28705 939169689Skan * semantics.c (finish_call_expr): Add assert. 940169689Skan * name-lookup.c (lookup_arg_dependent): Check we found an overload 941169689Skan or an object. 942169689Skan 943169689Skan PR c++/23287 944169689Skan * parser.c (cp_parser_id_expression): Add member_p 945169689Skan argument. Update all callers. 946169689Skan (cp_parser_unqualified_id): Likewise. Lookup a destructor name in 947169689Skan the object's scope, if valid. 948169689Skan (cp_parser_global_scope_opt): Add object_scope_valid_p. Update 949169689Skan callers. 950169689Skan (cp_parser_postfix_dot_deref_expression): Set object_scope. 951169689Skan * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here. 952169689Skan 953169689Skan2006-08-30 Jason Merrill <jason@redhat.com> 954169689Skan 955169689Skan PR c++/26670 956169689Skan * class.c (check_field_decls): Don't unset TYPE_PACKED until all 957169689Skan the fields have been processed. 958169689Skan 959169689Skan2006-08-29 Andrew Pinski <pinskia@physics.uc.edu> 960169689Skan 961169689Skan PR C++/28349 962169689Skan * call.c (build_x_va_arg): Remove the reference type 963169689Skan from the type before creating the pointer type. 964169689Skan 965169689Skan2006-08-29 J"orn Rennecke <joern.rennecke@st.com> 966169689Skan 967169689Skan PR c++/28139 968169689Skan * except.c (expand_start_catch_block): Use correct types for bitwise 969169689Skan copy. 970169689Skan 971169689Skan2006-08-28 Jason Merrill <jason@redhat.com> 972169689Skan 973169689Skan PR c++/26670 974169689Skan * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the 975169689Skan fields can't be packed. 976169689Skan 977169689Skan PR c++/26577 978169689Skan * cvt.c (convert_to_void): Don't automatically load from volatiles 979169689Skan of TREE_ADDRESSABLE type. 980169689Skan 981169689Skan2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 982169689Skan 983169689Skan PR c++/28860 984169689Skan * cp-tree.h (maybe_process_partial_specialization): Return 985169689Skan tree instead of void. 986169689Skan * parser.c (cp_parser_class_head): Use return value of 987169689Skan maybe_process_partial_specialization. 988169689Skan * pt.c (maybe_process_partial_specialization): Return error_mark_node 989169689Skan for broken specializations, TYPE otherwise. Check for template 990169689Skan template parameters. 991169689Skan 992169689Skan2006-08-27 Mark Mitchell <mark@codesourcery.com> 993169689Skan 994169689Skan PR c++/28058 995169689Skan * pt.c (register_specialization): Return error_mark_node for 996169689Skan specialization-after-instantiation. 997169689Skan * decl2.c (mark_used): Mark the main function used when one of its 998169689Skan clones is used. 999169689Skan 1000169689Skan2006-08-27 Lee Millward <lee.millward@codesourcery.com> 1001169689Skan 1002169689Skan PR c++/26573 1003169689Skan * class.c (check_field_decls): Don't issue error about 1004169689Skan local classes containing static data members. 1005169689Skan 1006169689Skan2006-08-26 Joseph S. Myers <joseph@codesourcery.com> 1007169689Skan 1008169689Skan PR c++/24009 1009169689Skan * parser.c (struct cp_token): Add input_file_stack_index. 1010169689Skan (eof_token): Update. 1011169689Skan (cp_lexer_get_preprocessor_token): Save input_file_stack_tick. 1012169689Skan (cp_lexer_set_source_position_from_token): Restore input file 1013169689Skan stack. 1014169689Skan 1015169689Skan2006-08-26 Lee Millward <lee.millward@codesourcery.com> 1016169689Skan 1017169689Skan PR c++/28736 1018169689Skan PR c++/28737 1019169689Skan PR c++/28738 1020169689Skan * pt.c (process_template_parm): Store invalid template 1021169689Skan parameters as a TREE_LIST with a TREE_VALUE of error_mark_node. 1022169689Skan (push_inline_template_parms_recursive): Check for template 1023169689Skan parameters having a TREE_VALUE of error_mark_node rather than 1024169689Skan check the parameter itself. 1025169689Skan (mangle_class_name_for_template): Likewise. 1026169689Skan (comp_template_parms): When comparing the individual template 1027169689Skan parameters, return 1 if either is error_mark_node. 1028169689Skan (current_template_args): Robustify. 1029169689Skan (redeclare_class_template): Likewise. 1030169689Skan 1031169689Skan2006-08-26 Mark Mitchell <mark@codesourcery.com> 1032169689Skan 1033169689Skan PR c++/28588 1034169689Skan * class.c (resolve_address_of_overloaded_function): Add 1035169689Skan access_path parameter. Perform access checks. 1036169689Skan (instantiate_type): Adjust call to 1037169689Skan resolve_address_of_overloaded_function. Remove unnecessary code. 1038169689Skan * tree.c (is_overloaded_fn): Document. Return 2 when there are 1039169689Skan acutally multiple functions. 1040169689Skan (really_overloaded_fn): Use is_overloaded_fn. 1041169689Skan * mangle.c (write_expression): Handle BASELINKs. 1042169689Skan * cp-tree.h (really_overloaded_fn): Return bool. 1043169689Skan (baselink_for_fns): Declare. 1044169689Skan * search.c (lookup_member): Check access for single static 1045169689Skan functions here. 1046169689Skan * pt.c (convert_nontype_argument_function): Handle BASELINKs. 1047169689Skan (tsubst_copy_and_build): Generate BASELINKs for template-ids. 1048169689Skan * semantics.c (finish_call_expr): Use baselink_for_fns. 1049169689Skan (baselink_for_fns): New function. 1050169689Skan (finish_id_expression): Use it. 1051169689Skan * parser.c (cp_parser_template_argument): Don't strip BASELINKs. 1052169689Skan 1053169689Skan PR c++/28595 1054169689Skan * pt.c (tsubst): Issue errors about attempts to create VLAs at 1055169689Skan template-instantiation time. 1056169689Skan 1057169689Skan2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1058169689Skan 1059169689Skan PR c++/28853 1060169689Skan * typeck2.c (cxx_incomplete_type_diagnostic): Handle template 1061169689Skan template parameters. Improve error message for template type 1062169689Skan parameters. 1063169689Skan 1064169689Skan PR c++/28852 1065169689Skan * cp-tree.h (grok_op_properties): Return bool instead of void. 1066169689Skan * decl.c (grokfndecl): Discard invalid operator declarations. 1067169689Skan (copy_fn_p): Revert change for PR 27547. 1068169689Skan (grok_op_properties): Return error status (true on success). 1069169689Skan * pt.c (tsubst_decl): Discard invalid operator declarations. 1070169689Skan 1071169689Skan2006-08-25 Mark Mitchell <mark@codesourcery.com> 1072169689Skan 1073169689Skan PR c++/28056 1074169689Skan * decl.c (grokdeclarator): Disallow declarations with qualified 1075169689Skan names in local scopes. 1076169689Skan 1077169689Skan2006-08-25 Nathan Sidwell <nathan@codesourcery.com> 1078169689Skan 1079169689Skan PR c++/27787 1080169689Skan * decl.c (make_typename_type): Only try and resolve it when 1081169689Skan context is not dependent. Refactor. 1082169689Skan * decl2.c (check_classfn): Push to class scope before looking for 1083169689Skan the function. 1084169689Skan 1085169689Skan2006-08-24 Danny Smith <dannysmith@users.sourceforge.net> 1086169689Skan 1087169689Skan PR driver/28528 1088169689Skan * g++spec.c (lang_specific_driver): Always check if we need to 1089169689Skan swallow a space-separated arg to '-x'. 1090169689Skan * lang-specs.h: Don't create ouput files for '-xc++-header' 1091169689Skan if -fsyntax-only. 1092169689Skan 1093169689Skan2006-08-23 Jason Merrill <jason@redhat.com> 1094169689Skan 1095169689Skan PR c++/27714 1096169689Skan * pt.c (push_template_decl_real): A friend template with class 1097169689Skan scope isn't primary. 1098169689Skan 1099169689Skan2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us> 1100169689Skan 1101169689Skan PR c++/28687 1102169689Skan * rtti.c (build_dynamic_cast, build_dynamic_cast_1): 1103169689Skan Move -fno-rtti check to be more specific. 1104169689Skan 1105169689Skan2006-08-22 Jason Merrill <jason@redhat.com> 1106169689Skan 1107169689Skan PR c++/23372 1108169689Skan * call.c (build_over_call): Don't make a copy here if build_call 1109169689Skan will make one too. 1110169689Skan 1111169689Skan2006-08-22 Andrew Pinski <pinskia@physics.uc.edu> 1112169689Skan 1113169689Skan PR C++/28450 1114169689Skan * cp/init.c (build_zero_init): Handle VECTOR_TYPE and 1115169689Skan COMPLEX_TYPEs. 1116169689Skan 1117169689Skan2006-08-22 Simon Martin <simartin@users.sourceforge.net> 1118169689Skan 1119169689Skan PR c++/28420 1120169689Skan * parser.c (cp_parser_postfix_expression): Make sure that the 1121169689Skan saved value for parser->type_definition_forbidden_message is 1122169689Skan restored before returning to avoid an invalid free(). 1123169689Skan 1124169689Skan2006-08-22 Jason Merrill <jason@redhat.com> 1125169689Skan 1126169689Skan PR c++/28659 1127169689Skan * typeck.c (merge_types): If either of the types have the right 1128169689Skan attributes, return that one. 1129169689Skan 1130169689Skan * tree.c (cp_build_type_attribute_variant): Make sure we aren't 1131169689Skan doing this to class types. 1132169689Skan * typeck.c (original_type): Deal with type quals properly. 1133169689Skan 1134169689Skan2006-08-21 Jason Merrill <jason@redhat.com> 1135169689Skan 1136169689Skan PR c++/27115 1137169689Skan * semantics.c (finish_stmt_expr_expr): Don't try to voidify here, 1138169689Skan just leave the expression as it is. 1139169689Skan (finish_stmt_expr): If the statement-expression has class type, 1140169689Skan wrap it in a TARGET_EXPR. 1141169689Skan * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with 1142169689Skan CLEANUP_POINT_EXPR. 1143169689Skan * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type. 1144169689Skan 1145169689Skan2006-08-21 Lee Millward <lee.millward@codesourcery.com> 1146169689Skan 1147169689Skan PR c++/26269 1148169689Skan * decl.c (duplicate_decls): Return early if either 1149169689Skan newdecl or olddecl is error_mark_node. 1150169689Skan 1151169689Skan PR c++/28505 1152169689Skan * decl.c (grokdeclarator): Return early after 1153169689Skan issuing diagnostic about an incomplete type. 1154169689Skan 1155169689Skan PR c++/28741 1156169689Skan * tree.c (decl_anon_ns_mem_p): Robustify. 1157169689Skan * decl2.c (determine_visibility): Likewise. 1158169689Skan 1159169689Skan2006-08-20 Mark Mitchell <mark@codesourcery.com> 1160169689Skan 1161169689Skan PR c++/28341 1162169689Skan * tree.c (cast_valid_in_integral_constant_expression_p): New 1163169689Skan function. 1164169689Skan * cp-tree.h (tsubst_copy_and_build): Adjust prototype. 1165169689Skan * pt.c (tsubst_expr): Add integral_constant_expression_p 1166169689Skan parameter. 1167169689Skan (fold_non_dependent_expr): Adjust callers of 1168169689Skan tsubst_{expr,copy_and_build}. 1169169689Skan (tsubst_friend_function): Likewise. 1170169689Skan (tsubst_template_arg): Likewise. 1171169689Skan (tsubst_default_argument): Likewise. 1172169689Skan (tsubst_decl): Likewise. 1173169689Skan (tsubst): Likewise. 1174169689Skan (tsubst_omp_clasuses): Likewise. 1175169689Skan (regenerate_decl_fromp_template): Likewise. 1176169689Skan (instantiate_decl): Likewise. 1177169689Skan (tsubst_initializer_list): Likewise. 1178169689Skan (tsubst_enum): Likewise. 1179169689Skan (tsubst_expr): Use RECUR throughout. 1180169689Skan (tsubst_copy_and_build): Change definition of RECUR. Do not allow 1181169689Skan invalid casts in integral constant expressions. 1182169689Skan * parser.c (cp_parser_postfix_expression): Use 1183169689Skan cast_valid_in_integral_constant_expression_p. 1184169689Skan (cp_parser_cast_expression): Likewise. 1185169689Skan (cp_parser_functional_cast): Likewise. 1186169689Skan 1187169689Skan PR c++/28346 1188169689Skan * pt.c (tsubst_qualified_id): Do not strip references from 1189169689Skan OFFSET_REFs. 1190169689Skan 1191169689Skan2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1192169689Skan 1193169689Skan PR c++/28606 1194169689Skan * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR. 1195169689Skan Fix formatting. 1196169689Skan (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition 1197169689Skan for valid type-names. 1198169689Skan (cp_parser_unqualified_id): Fix error handling for destructors. 1199169689Skan 1200169689Skan PR c++/28710 1201169689Skan * decl.c (xref_tag): Improve error message. Return early on error. 1202169689Skan 1203169689Skan PR c++/28711 1204169689Skan * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify. 1205169689Skan 1206169689Skan2006-08-17 Paolo Bonzini <bonzini@gnu.org> 1207169689Skan 1208169689Skan PR c++/28573 1209169689Skan * semantics.c (finish_offsetof): Add new argument to fold_offsetof. 1210169689Skan 1211169689Skan2006-08-16 Andrew Pinski <pinskia@physics.uc.edu> 1212169689Skan 1213169689Skan PR c++/28302 1214169689Skan * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call 1215169689Skan perform_integral_promotions for non integral type. 1216169689Skan 1217169689Skan2006-08-16 Jason Merrill <jason@redhat.com> 1218169689Skan 1219169689Skan PR c++/28385 1220169689Skan * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template 1221169689Skan if arg is a function. 1222169689Skan 1223169689Skan2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1224169689Skan 1225169689Skan PR c++/28593 1226169689Skan * init.c (build_new): Return early on invalid placement. 1227169689Skan 1228169689Skan2006-08-15 Lee Millward <lee.millward@codesourcery.com> 1229169689Skan 1230169689Skan PR c++/28594 1231169689Skan * pt.c (process_template_parm): Robustify. 1232169689Skan 1233169689Skan2006-08-14 Steve Ellcey <sje@cup.hp.com> 1234169689Skan 1235169689Skan PR c++/28288 1236169689Skan PR c++/14556 1237169689Skan * operators.def: Remove <?, ?>, <?=, and >?= operators. 1238169689Skan * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ. 1239169689Skan (cp_parser_warn_min_max): Remove. 1240169689Skan 1241169689Skan2006-08-11 Jason Merrill <jason@redhat.com> 1242169689Skan 1243169689Skan PR c++/28559 1244169689Skan * parser.c (cp_parser_elaborated_type_specifier): Also ignore 1245169689Skan attributes applied to a TYPENAME_TYPE. 1246169689Skan 1247169689Skan2006-08-09 Lee Millward <lee.millward@codesourcery.com> 1248169689Skan 1249169689Skan PR c++/28637 1250169689Skan * pt.c (coerce_template_parms): Copy across the 1251169689Skan invalid template arguments to the new template inner arguments. 1252169689Skan (retrieve_specialization): Robustify. 1253169689Skan 1254169689Skan PR c++/28638 1255169689Skan * pt.c (coerce_template_template_parms): Robustify. 1256169689Skan 1257169689Skan PR c++/28639 1258169689Skan * error.c (dump_template_parms): Robustify. 1259169689Skan 1260169689Skan PR c++/28640 1261169689Skan * pt.c (redeclare_class_template): Robustify. 1262169689Skan 1263169689Skan PR c++/28641 1264169689Skan * pt.c (type_unification_real): Robustify. 1265169689Skan 1266169689Skan2006-08-03 Lee Millward <lee.millward@codesourcery.com> 1267169689Skan 1268169689Skan PR c++/28347 1269169689Skan * decl.c (start_decl): Return error_mark_node if a 1270169689Skan diagnostic was issed for an invalid typedef initialization. 1271169689Skan 1272169689Skan2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1273169689Skan 1274169689Skan PR c++/27508 1275169689Skan * parser.c (cp_parser_unqualified_id): Check for invalid scopes 1276169689Skan when parsing destructor names. 1277169689Skan 1278169689Skan PR c++/28274 1279169689Skan * decl.c (duplicate_decls): Call check_default_args here. 1280169689Skan (start_preparsed_function): Do not call check_default_args. 1281169689Skan * name-lookup.c (pushdecl_maybe_friend): Only call 1282169689Skan check_default_args if duplicate_decls got bypassed. 1283169689Skan 1284169689Skan2006-08-02 Richard Guenther <rguenther@suse.de> 1285169689Skan 1286169689Skan PR c++/28479 1287169689Skan Revert 1288169689Skan 2006-07-05 Richard Guenther <rguenther@suse.de> 1289169689Skan Andrew Pinski <pinskia@gcc.gnu.org> 1290169689Skan 1291169689Skan PR c++/27084 1292169689Skan * cp-objcp-common.c (cxx_types_compatible_p): Ignore 1293169689Skan top level qualifiers for pointer type comparisons. 1294169689Skan 1295169689Skan2006-08-02 Mark Mitchell <mark@codesourcery.com> 1296169689Skan 1297169689Skan PR c++/28557 1298169689Skan * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE. 1299169689Skan 1300169689Skan2006-07-31 Mark Mitchell <mark@codesourcery.com> 1301169689Skan 1302169689Skan PR c++/28523 1303169689Skan * tree.c (stabilize_expr): Tweak documentation. Add assertion. 1304169689Skan (stabilize_call): Tweak documentation. 1305169689Skan (stabilize_init): Only call stabilize_call for calls. 1306169689Skan 1307169689Skan2006-08-01 Steve Ellcey <sje@cup.hp.com> 1308169689Skan 1309169689Skan PR c++/28432 1310169689Skan * decl2.c (check_classfn): Remove early return. 1311169689Skan * search.c (lookup_member): Return NULL with bad type. 1312169689Skan 1313169689Skan2006-08-01 Steve Ellcey <sje@cup.hp.com> 1314169689Skan 1315169689Skan PR c++/28256 1316169689Skan * decl.c (check_initializer): Check for 1 initializer on scalar types. 1317169689Skan 1318169689Skan2006-08-01 Daniel Jacobowitz <dan@codesourcery.com> 1319169689Skan 1320169689Skan PR debug/23336 1321169689Skan * pt.c (tsubst_copy_and_build): Mark used enum types. 1322169689Skan * semantics.c (finish_id_expression): Likewise. 1323169689Skan 1324169689Skan2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1325169689Skan 1326169689Skan PR c++/6634 1327169689Skan * decl.c (grokdeclarator): Check whether "long" or "short" was 1328169689Skan specified for non-integral types. 1329169689Skan 1330169689Skan2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1331169689Skan 1332169689Skan * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies. 1333169689Skan 1334169689Skan2006-07-28 Lee Millward <lee.millward@codesourcery.com> 1335169689Skan 1336169689Skan PR c++/27668 1337169689Skan PR c++/27962 1338169689Skan * pt.c (process_template_parm) Store invalid template 1339169689Skan parameters as error_mark_node in the paramater list. 1340169689Skan (push_inline_template_parms_recursive): Handle invalid 1341169689Skan template parameters. 1342169689Skan (comp_template_parms): Likewise. 1343169689Skan (check_default_tmpl_arg): Likewise. 1344169689Skan (coerce_template_template_parms): Likewise. 1345169689Skan (mangle_class_name_for_template): Likewise. 1346169689Skan (tsubst_template_parms): Likewise. 1347169689Skan * error.c (dump_template_argument_list): Likewise. 1348169689Skan 1349169689Skan2006-07-28 Kazu Hirata <kazu@codesourcery.com> 1350169689Skan 1351169689Skan * cp-tree.h: Fix a comment typo. 1352169689Skan 1353169689Skan2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1354169689Skan 1355169689Skan PR c++/27572 1356169689Skan * decl.c (grokdeclarator): Return error_mark_node after invalid 1357169689Skan typedef. 1358169689Skan 1359169689Skan2006-07-23 Daniel Jacobowitz <dan@codesourcery.com> 1360169689Skan 1361169689Skan PR c++/28460 1362169689Skan * decl.c (grokvardecl): Use FROB_CONTEXT. 1363169689Skan * pt.c (register_specialization): Likewise. 1364169689Skan 1365169689Skan2006-07-23 Mark Mitchell <mark@codesourcery.com> 1366169689Skan 1367169689Skan PR c++/28025 1368169689Skan * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments. 1369169689Skan * name-lookup.c (unqualified_namespace_lookup): There is no way to 1370169689Skan have a hidden name in non-namespace scopes. 1371169689Skan * pt.c (tsubst_friend_class): Look for hidden names. 1372169689Skan * decl.c (lookup_and_check_tag): Fix typo in comment. 1373169689Skan 1374169689Skan * semantics.c (finish_compound_literal): Fix typo in comment. 1375169689Skan 1376169689Skan2006-07-21 Jason Merrill <jason@redhat.com> 1377169689Skan 1378169689Skan * decl2.c (determine_visibility): Don't propagate visibility from 1379169689Skan type to decl. 1380169689Skan (constrain_class_visibility): Don't warn in system headers. 1381169689Skan Don't warn about pointer fields. 1382169689Skan 1383169689Skan2006-07-20 Mike Stump <mrs@apple.com> 1384169689Skan 1385169689Skan * decl2.c (determine_visibility_from_class): Don't use hidden 1386169689Skan visibility for explicit instantiations. 1387169689Skan 1388169689Skan2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1389169689Skan 1390169689Skan PR c++/28250 1391169689Skan * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to 1392169689Skan valid decls. Cleanup. 1393169689Skan 1394169689Skan PR c++/28363 1395169689Skan * semantics.c (check_template_template_default_arg): Simplify 1396169689Skan error handling. 1397169689Skan 1398169689Skan2006-07-20 Jason Merrill <jason@redhat.com> 1399169689Skan 1400169689Skan PR c++/28407 1401169689Skan * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope 1402169689Skan const variables with implicit internal linkage. 1403169689Skan * tree.c (decl_linkage): Only return lk_external if it's set. 1404169689Skan 1405169689Skan PR c++/28409 1406169689Skan * decl2.c (constrain_visibility): Ignore the anonymous namespace 1407169689Skan for extern "C" decls. 1408169689Skan (VISIBILITY_STATIC): Rename to VISIBILITY_ANON. 1409169689Skan 1410169689Skan * decl2.c (constrain_visibility): Remove specified and reason 1411169689Skan parameters. Don't touch decls that already have explicit visibility. 1412169689Skan (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from 1413169689Skan template. 1414169689Skan (determine_visibility_from_class): Reverse sense of 1415169689Skan DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules. 1416169689Skan (constrain_class_visibility): Only complain about member visibility 1417169689Skan if the member type is another class. Don't change visibility of the 1418169689Skan current class. 1419169689Skan 1420169689Skan2006-07-19 Mark Mitchell <mark@codesourcery.com> 1421169689Skan 1422169689Skan PR c++/28338 1423169689Skan * decl.c (layout_var_decl): Don't call push_local_name here. 1424169689Skan (initialize_artificial_var): Assert artificiality. 1425169689Skan (cp_finish_decl): Call push_local_name here. 1426169689Skan 1427169689Skan2006-07-18 Mark Mitchell <mark@codesourcery.com> 1428169689Skan 1429169689Skan PR c++/28337 1430169689Skan * typeck.c (build_binary_op): Short-circuit pointer arithmetic in 1431169689Skan templates. 1432169689Skan 1433169689Skan2006-07-18 Mark Mitchell <mark@codesourcery.com> 1434169689Skan 1435169689Skan PR c++/28048 1436169689Skan * semantics.c (check_accessibility_of_qualified_id): Robustify. 1437169689Skan 1438169689Skan PR c++/28235 1439169689Skan * pt.c (tsubst_decl): Handling substitutions into a static data 1440169689Skan member from within the scope of the tempalte itself. 1441169689Skan 1442169689Skan2006-07-18 Lee Millward <lee.millward@gmail.com> 1443169689Skan 1444169689Skan PR c++/28258 1445169689Skan * method.c (locate_copy): Check for non_reference 1446169689Skan returning error_mark_node. 1447169689Skan 1448169689Skan PR c++/28260 1449169689Skan * decl.c (duplicate_decls): Return error_mark_node 1450169689Skan on ambiguous declaration. 1451169689Skan 1452169689Skan2006-07-18 Steve Ellcey <sje@cup.hp.com> 1453169689Skan 1454169689Skan PR c++/27495 1455169689Skan * search.c (adjust_result_of_qualified_name_lookup): Change 1456169689Skan assert to part of if statement. 1457169689Skan 1458169689Skan2006-07-17 Steve Ellcey <sje@cup.hp.com> 1459169689Skan 1460169689Skan PR c++/28291 1461169689Skan * decl.c (reshape_init_class): Return error_mark_node on error. 1462169689Skan 1463169689Skan2006-07-17 Steve Ellcey <sje@cup.hp.com> 1464169689Skan 1465169689Skan PR c++/28304 1466169689Skan * decl2.c (check_classfn): Return NULL_TREE on error. 1467169689Skan 1468169689Skan2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1469169689Skan 1470169689Skan PR c++/28250 1471169689Skan * name-lookup.c (pushdecl_maybe_friend): Return early on 1472169689Skan error_mark_node. 1473169689Skan * except.c (expand_start_catch_block): Use error_mark_node instead 1474169689Skan of NULL_TREE for invalid decls. 1475169689Skan * parser.c (cp_parser_exception_declaration): Return error_mark_node 1476169689Skan on invalid catch parameter. Simplify. 1477169689Skan 1478169689Skan2006-07-16 Jakub Jelinek <jakub@redhat.com> 1479169689Skan 1480169689Skan PR c++/28370 1481169689Skan * decl2.c (note_vague_linkage_var): Removed. 1482169689Skan (finish_static_data_member_decl): Add decl to pending_statics vector 1483169689Skan directly. Do it even for non-public decls. 1484169689Skan 1485169689Skan2006-07-15 Lee Millward <lee.millward@gmail.com> 1486169689Skan 1487169689Skan PR c++/28292 1488169689Skan * decl2.c (acceptable_java_type): Robustify. Use 1489169689Skan proper Boolean return type instead of return 1. 1490169689Skan (check_java_method): Don't issue error about 1491169689Skan type not being an acceptable Java parameter if 1492169689Skan it's error_mark_node. 1493169689Skan 1494169689Skan PR c++/28269 1495169689Skan * parser.c (cp_parser_elaborated_type_specifier): 1496169689Skan Return early if an invalid type was detected. 1497169689Skan 1498169689Skan2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1499169689Skan 1500169689Skan PR c++/28249 1501169689Skan * parser.c (cp_parser_check_decl_spec): New function. 1502169689Skan (cp_parser_decl_specifier_seq): Factor out check for repeated 1503169689Skan decl-specifiers into cp_parser_check_decl_spec. Use it. 1504169689Skan (cp_parser_type_specifier_seq): Use it. 1505169689Skan 1506169689Skan PR c++/28294 1507169689Skan * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs 1508169689Skan only. 1509169689Skan 1510169689Skan PR c++/28387 1511169689Skan * decl2.c (cplus_decl_attributes): Check for invalid decls. 1512169689Skan 1513169689Skan2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1514169689Skan 1515169689Skan PR c++/28343 1516169689Skan * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node. 1517169689Skan * decl2.c (grokfield): Likewise. 1518169689Skan 1519169689Skan2006-07-12 Geoffrey Keating <geoffk@apple.com> 1520169689Skan 1521169689Skan * decl2.c (determine_visibility): Don't change visibility of 1522169689Skan function locals because of -fvisibility-inlines-hidden. 1523169689Skan 1524169689Skan2006-07-12 Jason Merrill <jason@redhat.com> 1525169689Skan 1526169689Skan PR c++/28217 1527169689Skan * semantics.c (note_decl_for_pch): Don't premangle templates. 1528169689Skan 1529169689Skan2006-07-12 Martin Michlmayr <tbm@cyrius.com> 1530169689Skan 1531169689Skan * typeck.c (string_conv_p): Remove spurious quotation mark in 1532169689Skan warning. 1533169689Skan 1534169689Skan2006-07-07 Lee Millward <lee.millward@gmail.com> 1535169689Skan Andrew Pinski <pinskia@gmail.com> 1536169689Skan 1537169689Skan PR c++/27820 1538169689Skan * decl.c (define_label): Return error_mark_node on error. 1539169689Skan * semantics.c (finish_label_stmt): Don't call 1540169689Skan add_stmt for invalid labels. 1541169689Skan 1542169689Skan2006-07-06 Jason Merrill <jason@redhat.com> 1543169689Skan 1544169689Skan PR c++/28279 1545169689Skan * decl2.c (finish_static_data_member_decl): Don't assert 1546169689Skan TREE_PUBLIC. 1547169689Skan 1548169689Skan2006-07-05 Jason Merrill <jason@redhat.com> 1549169689Skan 1550169689Skan PR c++/13983 1551169689Skan PR c++/17519 1552169689Skan * class.c (check_field_decls): Check TYPE_PACKED after 1553169689Skan stripping array types. 1554169689Skan (finish_struct_bits): Don't copy TYPE_SIZE here. 1555169689Skan 1556169689Skan PR c++/18681 1557169689Skan * friend.c (is_friend): Fix DR 45 implementation. 1558169689Skan 1559169689Skan2006-07-05 Richard Guenther <rguenther@suse.de> 1560169689Skan Andrew Pinski <pinskia@gcc.gnu.org> 1561169689Skan 1562169689Skan PR c++/27084 1563169689Skan * cp-objcp-common.c (cxx_types_compatible_p): Ignore 1564169689Skan top level qualifiers for pointer type comparisons. 1565169689Skan 1566169689Skan2006-07-01 Jason Merrill <jason@redhat.com> 1567169689Skan 1568169689Skan PR c++/28215 1569169689Skan * method.c (make_thunk): Unset DECL_USE_TEMPLATE and 1570169689Skan DECL_TEMPLATE_INFO. 1571169689Skan 1572169689Skan2006-06-30 Jason Merrill <jason@redhat.com> 1573169689Skan 1574169689Skan PR c++/26577 1575169689Skan * call.c (build_new_method_call): Force evaluation of the 1576169689Skan instance pointer, not the object. 1577169689Skan 1578169689Skan2006-06-30 Kazu Hirata <kazu@codesourcery.com> 1579169689Skan 1580169689Skan * decl2.c: Fix a comment typo. 1581169689Skan 1582169689Skan2006-06-30 Jason Merrill <jason@redhat.com> 1583169689Skan 1584169689Skan PR c++/18698 1585169689Skan * decl2.c (grokfield): Only try to treat the decl as an access 1586169689Skan declaration if the scope is a class. 1587169689Skan 1588169689Skan2006-06-29 Jason Merrill <jason@redhat.com> 1589169689Skan 1590169689Skan PR c++/26905 1591169689Skan PR c++/26612 1592169689Skan PR c++/27000 1593169689Skan PR c++/26984 1594169689Skan PR c++/19134 1595169689Skan * decl2.c (determine_visibility): Overhaul. 1596169689Skan (determine_visibility_from_class): Likewise. 1597169689Skan (min_vis_r, type_visibility, constrain_visibility): New fns. 1598169689Skan (constrain_visibility_for_template): Likewise. 1599169689Skan (constrain_class_visibility): Likewise. 1600169689Skan * decl.c (cp_finish_decl): Call determine_visibility for function 1601169689Skan decls, too. 1602169689Skan * name-lookup.c (pushtag): Call determine_visibility. 1603169689Skan * decl.c (duplicate_decls): Don't copy visibility from template to 1604169689Skan specialization. 1605169689Skan * pt.c (check_explicit_specialization): Likewise. 1606169689Skan (lookup_template_class, tsubst_decl): Call determine_visibility. 1607169689Skan * class.c (finish_struct_1): Call constrain_class_visibility. 1608169689Skan 1609169689Skan PR c++/26905 1610169689Skan PR c++/21675 1611169689Skan PR c++/17470 1612169689Skan * parser.c (cp_parser_explicit_instantiation): Pass the attributes 1613169689Skan to grokdeclarator. 1614169689Skan (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'. 1615169689Skan (cp_parser_enum_specifier): Likewise. 1616169689Skan (cp_parser_elaborated_type_specifier): Apply attributes if this 1617169689Skan declares only the class. 1618169689Skan (cp_parser_class_specifier): Apply leading attributes immediately. 1619169689Skan * semantics.c (begin_class_definition): Add attributes parameter, 1620169689Skan apply them to the type. 1621169689Skan 1622169689Skan PR c++/21581 1623169689Skan PR c++/25915 1624169689Skan * tree.c (decl_anon_ns_mem_p): New function. 1625169689Skan * cp-tree.h: Declare it. 1626169689Skan * decl2.c (determine_visibility): Make anonymous namespace 1627169689Skan members static. 1628169689Skan (min_vis_r, constrain_visibility): Likewise. 1629169689Skan * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on 1630169689Skan pseudo-types. 1631169689Skan * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on 1632169689Skan global_namespace. 1633169689Skan * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC 1634169689Skan on anonymous namespaces. 1635169689Skan 1636169689Skan2006-06-28 Jason Merrill <jason@redhat.com> 1637169689Skan 1638169689Skan PR c++/27424 1639169689Skan * pt.c (convert_template_argument): Pass all template arguments 1640169689Skan on to coerce_template_template_parms. 1641169689Skan 1642169689Skan2006-06-25 Lee Millward <lee.millward@gmail.com> 1643169689Skan Mark Mitchell <mark@codesuorcery.com> 1644169689Skan 1645169689Skan PR c++/28054 1646169689Skan * decl2.c (grokbitfied): Remove check for grokdeclarator 1647169689Skan returning NULL_TREE, instead check for error_mark_node 1648169689Skan to indicate failure. 1649169689Skan * decl.c (grokdeclarator): Adjust block comment. 1650169689Skan 1651169689Skan2006-06-25 Lee Millward <lee.millward@gmail.com> 1652169689Skan 1653169689Skan PR c++/28051 1654169689Skan * mangle.c (mangle_conv_op_name_for_type): Check for 1655169689Skan invalid types. 1656169689Skan * name-lookup.c (push_class_level_binding): Robustify. 1657169689Skan (do_class_using_decl): Return early if name is error_mark_node. 1658169689Skan 1659169689Skan2006-06-23 Steve Ellcey <sje@cup.hp.com> 1660169689Skan 1661169689Skan PR c++/28114 1662169689Skan * name-lookup.c (pushtag): Return if we have error_mark_node. 1663169689Skan 1664169689Skan2006-06-23 Steve Ellcey <sje@cup.hp.com> 1665169689Skan 1666169689Skan PR c++/27019 1667169689Skan * typeck2.c (process_init_constructor_array): Set ce->value on errors. 1668169689Skan 1669169689Skan2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1670169689Skan 1671169689Skan PR c++/28112 1672169689Skan * parser.c (cp_parser_attribute_list): Skip attributes with invalid 1673169689Skan arguments. Fix comment. 1674169689Skan 1675169689Skan PR c++/11468 1676169689Skan * init.c (build_new_1): Handle error_mark_nodes returned by 1677169689Skan build_java_class_ref. 1678169689Skan (build_java_class_ref): Do not abort compilation, but return 1679169689Skan error_mark_node. Improve error message. Fix indentation. 1680169689Skan 1681169689Skan2006-06-23 Danny Smith <dannysmith@users.sourceforge.net> 1682169689Skan 1683169689Skan PR target/27789 1684169689Skan * decl.c (start_decl): Check that dllimports are not initialized. 1685169689Skan 1686169689Skan2006-06-22 Lee Millward <lee.millward@gmail.com> 1687169689Skan 1688169689Skan PR c++/27805 1689169689Skan * typeck2.c (build_m_component_ref): Use error_operand_p. 1690169689Skan 1691169689Skan PR c++/27821 1692169689Skan * decl.c (grokdeclarator): Return error_mark_node on 1693169689Skan invalid uses of the scope resolution operator. 1694169689Skan 1695169689Skan2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1696169689Skan 1697169689Skan PR c++/28111 1698169689Skan * pt.c (determine_specialization): Check for invalid decls. 1699169689Skan 1700169689Skan PR c++/28110 1701169689Skan * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid 1702169689Skan parameters. 1703169689Skan 1704169689Skan PR c++/28109 1705169689Skan * rtti.c (get_tinfo_decl_dynamic): Robustify. 1706169689Skan 1707169689Skan2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1708169689Skan 1709169689Skan PR c++/28052 1710169689Skan * init.c (push_base_cleanups): Skip members with invalid types. 1711169689Skan * typeck.c (build_class_member_access_expr): Robustify. 1712169689Skan 1713169689Skan2006-06-19 Mark Mitchell <mark@codesourcery.com> 1714169689Skan 1715169689Skan * pt.c (instantiate_template): Fix typo in comment. 1716169689Skan 1717169689Skan2006-06-19 Richard Guenther <rguenther@suse.de> 1718169689Skan 1719169689Skan * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near 1720169689Skan power-of-two token vector size. 1721169689Skan 1722169689Skan2006-06-16 Mark Mitchell <mark@codesourcery.com> 1723169689Skan 1724169689Skan PR c++/28016 1725169689Skan * decl.c (cp_finsh_decl): Do not emit uninstantiated static data 1726169689Skan members. 1727169689Skan 1728169689Skan PR c++/27979 1729169689Skan * call.c (standard_conversion): Strip cv-qualifiers from bitfield 1730169689Skan types. 1731169689Skan 1732169689Skan PR c++/27884 1733169689Skan * decl.c (have_extern_spec): Remove. 1734169689Skan (start_decl): Do not check have_extern_spec. 1735169689Skan (start_function): Likewise. 1736169689Skan * cp-tree.h (have_extern_spec): Remove. 1737169689Skan * parser.c (cp_parser_linkage_specification): Don't set 1738169689Skan have_extern_spec. 1739169689Skan (cp_parser_init_declarator): Likewise. 1740169689Skan (cp_parser_parameter_declaration): Do not treat parameters as 1741169689Skan within the scope of an unbraced linkage specification. 1742169689Skan 1743169689Skan2006-06-15 Mark Mitchell <mark@codesourcery.com> 1744169689Skan 1745169689Skan PR c++/27689 1746169689Skan * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New 1747169689Skan macro. 1748169689Skan * pt.c (unify): Use it. 1749169689Skan 1750169689Skan PR c++/27666 1751169689Skan * call.c (build_conditional_expr): Robustify. 1752169689Skan 1753169689Skan PR c++/27640 1754169689Skan * pt.c (instantiate_template): Set processing_template_decl to 1755169689Skan zero while performing substitutions. 1756169689Skan 1757169689Skan2006-06-14 Mark Mitchell <mark@codesourcery.com> 1758169689Skan 1759169689Skan PR c++/27665 1760169689Skan * parser.c (cp_parser_unqualified_id): Use constructor_name_p to 1761169689Skan identify destructors. 1762169689Skan (cp_parser_nested_name_specifier_opt): Remove invalid 1763169689Skan optimization. 1764169689Skan (cp_parser_template_id): Refine heuristic for determining whether 1765169689Skan we are entering a scope. 1766169689Skan 1767169689Skan PR c++/27648 1768169689Skan * parser.c (cp_parser_declarator): Robustify. 1769169689Skan 1770169689Skan PR c++/26559 1771169689Skan * pt.c (tsubst_expr): Use finish_omp_atomic. 1772169689Skan (value_dependent_expression_p): All CALL_EXPRs are dependent. 1773169689Skan * semantics.c (finish_omp_atomic): Rework to use standard 1774169689Skan paradigms for handling non-dependent expressions. 1775169689Skan 1776169689Skan2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net> 1777169689Skan 1778169689Skan * typeck.c (build_modify_expr): Tidy diagnostic message. 1779169689Skan 1780169689Skan2006-06-14 Mark Mitchell <mark@codesourcery.com> 1781169689Skan 1782169689Skan PR c++/28018 1783169689Skan * typeck.c (build_modify_expr): Disallow array assignment. 1784169689Skan 1785169689Skan2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net> 1786169689Skan 1787169689Skan * cp-tree.def: Fix typo. 1788169689Skan 1789169689Skan2006-06-13 Mark Mitchell <mark@codesourcery.com> 1790169689Skan 1791169689Skan PR c++/27227 1792169689Skan * decl.c (decls_match): Allow an extern "C" variable declarations 1793169689Skan from different namespaces to match. 1794169689Skan (duplicate_decls): Disallow redeclaring a variable with a 1795169689Skan different linkage specification. 1796169689Skan 1797169689Skan2006-06-13 Jakub Jelinek <jakub@redhat.com> 1798169689Skan 1799169689Skan PR middle-end/27793 1800169689Skan * cp-tree.h (cxx_int_tree_map): New struct. 1801169689Skan (struct language_function): Add extern_decl_map field. 1802169689Skan * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping 1803169689Skan to cp_function_chain->extern_decl_map hash table instead of 1804169689Skan copying over DECL_UID. 1805169689Skan * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New 1806169689Skan functions. 1807169689Skan (cp_genericize_r): Remap DECL_EXTERN local decls using 1808169689Skan cp_function_chain->extern_decl_map hash table. 1809169689Skan * decl.c (finish_function): Clear extern_decl_map. 1810169689Skan 1811169689Skan2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1812169689Skan 1813169689Skan PR c++/27601 1814169689Skan * semantics.c (finish_offsetof): Handle pseudo-destructors. 1815169689Skan 1816169689Skan PR c++/27933 1817169689Skan * name-lookup.c (lookup_qualified_name): Always return error_mark_node 1818169689Skan if lookup fails. 1819169689Skan 1820169689Skan PR c++/27951 1821169689Skan * decl2.c (finish_anon_union): Return early if build_anon_union_vars 1822169689Skan fails. 1823169689Skan 1824169689Skan2006-06-12 Roger Sayle <roger@eyesopen.com> 1825169689Skan 1826169689Skan PR c++/21210 1827169689Skan * typeck2.c (build_functional_cast): Use cp_convert to construct 1828169689Skan non-aggregate initializers instead of the user-level build_c_cast. 1829169689Skan 1830169689Skan2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1831169689Skan 1832169689Skan PR c++/27601 1833169689Skan * cp-tree.h (finish_offsetof): Add prototype. 1834169689Skan * semantics.c (finish_offsetof): New function. 1835169689Skan * parser.c (cp_parser_builtin_offsetof): Call it instead of 1836169689Skan fold_offsetof. 1837169689Skan * pt.c (tsubst_copy_and_build): Likewise. 1838169689Skan 1839169689Skan2006-06-06 Mark Mitchell <mark@codesourcery.com> 1840169689Skan 1841169689Skan PR c++/27177 1842169689Skan * call.c (standard_conversion): Require that the derived type be 1843169689Skan complete when performing a derived-to-base conversion. 1844169689Skan 1845169689Skan2006-06-04 Mark Mitchell <mark@codesourcery.com> 1846169689Skan 1847169689Skan PR c++/27819 1848169689Skan * decl.c (cp_finish_decl): Process initializers for static data 1849169689Skan members with non-dependent initializers, even in templates. 1850169689Skan 1851169689Skan PR c++/27722 1852169689Skan * decl.c (maybe_deduce_size_from_array_init): If the declaration 1853169689Skan is erroneous, give it an erroneous type. 1854169689Skan (layout_var_decl): If the type is erroneous, give up. 1855169689Skan (check_initializer): Likewise. 1856169689Skan 1857169689Skan PR c++/27807 1858169689Skan * cp-tree.h (TYPE_OBJ_P): New macro. 1859169689Skan (TYPE_PTROB_P): Use it. 1860169689Skan (TYPE_REF_OBJ_P): Likewise. 1861169689Skan * semantics.c (finish_compound_literal): Do not permit compound 1862169689Skan literals of non-object types. 1863169689Skan 1864169689Skan PR c++/27806 1865169689Skan * typeck.c (original_type): Robustify. 1866169689Skan 1867169689Skan2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1868169689Skan 1869169689Skan PR c++/27804 1870169689Skan * init.c (constant_value_1): Return decl instead of error_mark_node 1871169689Skan for invalid initializers. 1872169689Skan 1873169689Skan2006-06-01 Andrew Pinski <pinskia@physics.uc.edu> 1874169689Skan 1875169689Skan PR c++/27592 1876169689Skan * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion 1877169689Skan on operand of the COND_EXPR for the null pointer check. 1878169689Skan 1879169689Skan2006-06-01 Andrew Pinski <pinskia@physics.uc.edu> 1880169689Skan 1881169689Skan PR c++/26740 1882169689Skan * typeck.c (build_unary_op): Mark the function as being used. 1883169689Skan 1884169689Skan2006-06-01 Alexandre Oliva <aoliva@redhat.com> 1885169689Skan 1886169689Skan PR c++/26660 1887169689Skan * parser.c (cp_parser_initial_pragma): Read one more token for 1888169689Skan caller after reading PCH file in. 1889169689Skan 1890169689Skan2006-05-31 Mark Mitchell <mark@codesourcery.com> 1891169689Skan 1892169689Skan PR c++/27801 1893169689Skan * call.c (perform_implicit_conversion): Do not actually perform 1894169689Skan conversions in templates. 1895169689Skan 1896169689Skan PR c++/26496 1897169689Skan * call.c (resolve_args): Check for invalid uses of bound 1898169689Skan non-static member functions. 1899169689Skan * init.c (build_offset_ref): Return error_mark_node for errors. 1900169689Skan 1901169689Skan PR c++/27385 1902169689Skan * decl.c (reshape_init): Robustify. 1903169689Skan (reshape_init_array_1): Likewise. 1904169689Skan 1905169689Skan2006-05-30 Mark Mitchell <mark@codesourcery.com> 1906169689Skan 1907169689Skan PR c++/27808 1908169689Skan * parser.c (cp_parser_decl_specifier_seq): Issue errors about 1909169689Skan "friend" specifiers that do not appear in class scopes. 1910169689Skan 1911169689Skan PR c++/27803 1912169689Skan * class.c (check_bitfield_decl): Ensure that all bitfields have 1913169689Skan integral type. 1914169689Skan 1915169689Skan2006-05-29 Kazu Hirata <kazu@codesourcery.com> 1916169689Skan 1917169689Skan * pt.c (convert_nontype_argument): Fix a typo in an error 1918169689Skan message. 1919169689Skan 1920169689Skan2006-05-28 Kazu Hirata <kazu@codesourcery.com> 1921169689Skan 1922169689Skan * decl.c, decl2.c, parser.c: Fix comment typos. Follow 1923169689Skan spelling conventions. 1924169689Skan 1925169689Skan2006-05-24 Mark Mitchell <mark@codesourcery.com> 1926169689Skan 1927169689Skan PR c++/20103 1928169689Skan * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to 1929169689Skan error_mark_node to indicate an initialization is OK. 1930169689Skan (start_decl): Likewise. Adjust call to start_decl_1. 1931169689Skan (start_decl_1): Add initialized parameter. Simplify. 1932169689Skan * except.c (initialize_handler_parm): Adjust call to 1933169689Skan setart_decl_1. 1934169689Skan (expand_start_catch_block): Let cp_finish_decl initialize catch 1935169689Skan parameters. 1936169689Skan * cp-tree.h (start_decl_1): Adjust prototype. 1937169689Skan * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node. 1938169689Skan (instantiate_decl): Let cp_finish_decl handle initialization. 1939169689Skan * semantics.c (finish_compound_literal): Create a temporary 1940169689Skan variable for the literal. 1941169689Skan * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special 1942169689Skan cases. 1943169689Skan * decl2.c (finish_static_data_member_decl): Don't set 1944169689Skan DECL_INITIAL. 1945169689Skan (grokfield): Do not try to initialize functions. 1946169689Skan 1947169689Skan2006-05-23 Mark Mitchell <mark@codesourcery.com> 1948169689Skan 1949169689Skan PR c++/20173 1950169689Skan * pt.c (determine_specialization): Disallow partial 1951169689Skan specializations of templates. 1952169689Skan 1953169689Skan2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1954169689Skan 1955169689Skan PR c++/27716 1956169689Skan * typeck.c (build_modify_expr): Test arguments for error_operand_p. 1957169689Skan 1958169689Skan * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE. 1959169689Skan 1960169689Skan2006-05-21 Mark Mitchell <mark@codesourcery.com> 1961169689Skan 1962169689Skan PR c++/27210 1963169689Skan * cp-tree.h (cp_save_expr): New function. 1964169689Skan * init.c (build_new): Correct logic for zero-element array 1965169689Skan warning. Use cp_save_expr. 1966169689Skan * tree.c (cp_save_expr): New function. 1967169689Skan 1968169689Skan2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1969169689Skan 1970169689Skan PR c++/27398 1971169689Skan * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE 1972169689Skan or void_type_node. 1973169689Skan 1974169689Skan2006-05-19 Mike Stump <mrs@apple.com> 1975169689Skan 1976169689Skan * typeck.c (default_conversion): Remove static. 1977169689Skan 1978169689Skan2006-05-19 Mark Mitchell <mark@codesourcery.com> 1979169689Skan 1980169689Skan PR c++/26433 1981169689Skan * cp-tree.h (begin_function_try_block): Change prototype. 1982169689Skan (finish_function_handler_sequence): Likewise. 1983169689Skan * parser.c (cp_parser_function_try_block): Adjust calls. 1984169689Skan * pt.c (tsubst_expr): Adjust calls. 1985169689Skan * semantics.c (begin_function_try_block): Create an artificial 1986169689Skan outer scope. 1987169689Skan (finish_function_handler_sequence): Close it. 1988169689Skan 1989169689Skan2006-05-18 Mark Mitchell <mark@codesourcery.com> 1990169689Skan 1991169689Skan PR c++/27471 1992169689Skan PR c++/27506 1993169689Skan * typeck.c (decay_conversion): Convert bitfields to their declared 1994169689Skan types here. Improve documentation. Avoid use of cp_convert. 1995169689Skan (default_conversion): Make it static. Perform integral promotions 1996169689Skan before lvalue-to-rvalue, function-to-pointer, and array-to-pointer 1997169689Skan conversions. 1998169689Skan * init.c (build_init): Remove. 1999169689Skan (expand_default_init): Do not call rvalue. 2000169689Skan * call.c (null_ptr_cst_p): Robustify. 2001169689Skan (build_conditional_expr): Tidy. 2002169689Skan * except.c (build_throw): Do not perform lvalue-to-rvalue 2003169689Skan conversion on operand before initializing temporary. 2004169689Skan * tree.c (convert.h): Include it. 2005169689Skan (convert_bitfield_to_declared_type): Use convert_to_integer, not 2006169689Skan cp_convert. 2007169689Skan (rvalue): Don't convert bitfields to their declared type here. 2008169689Skan * cp-tree.h (build_init): Remove. 2009169689Skan (default_conversion): Likewise. 2010169689Skan * typeck2.c (build_m_component_ref): Do not perform 2011169689Skan lvalue-to-rvalue, function-to-pointer, or array-to-pointer 2012169689Skan conversions here. Correct error message. 2013169689Skan 2014169689Skan2006-05-17 Mark Mitchell <mark@codesourcery.com> 2015169689Skan 2016169689Skan PR c++/26122 2017169689Skan * decl2.c (check_member_template): Remove checks for virtual 2018169689Skan functions. 2019169689Skan * parser.c (cp_parser_function_specifier_opt): Complain about 2020169689Skan virtual templates. 2021169689Skan (cp_parser_pure_specifier): Likewise. 2022169689Skan 2023169689Skan PR c++/26068 2024169689Skan * parser.c (cp_parser_set_storage_class): Check for 2025169689Skan invalid uses of storage classes on unbraced linkage 2026169689Skan specifications. 2027169689Skan (cp_parser_decl_specifier_seq): Pass keywords, not storage classes, 2028169689Skan to cp_parser_set_storage_class. 2029169689Skan 2030169689Skan2006-05-17 Jakub Jelinek <jakub@redhat.com> 2031169689Skan 2032169689Skan PR c++/27491 2033169689Skan * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR 2034169689Skan on CONSTRUCTORs. 2035169689Skan 2036169689Skan PR middle-end/27415 2037169689Skan * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED 2038169689Skan on combined parallel workshare constructs. 2039169689Skan * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag. 2040169689Skan 2041169689Skan2006-05-16 H.J. Lu <hongjiu.lu@intel.com> 2042169689Skan 2043169689Skan PR driver/26885 2044169689Skan * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS). 2045169689Skan 2046169689Skan2006-05-15 Mark Mitchell <mark@codesourcery.com> 2047169689Skan 2048169689Skan PR c++/27339 2049169689Skan * cp-tree.h (perform_access_checks): New function. 2050169689Skan * semantics.c (perform_access_checks): New function. 2051169689Skan (perform_deferred_access_checks): Use it. 2052169689Skan * parser.c (cp_parser_simple_declaration): Adjust call to 2053169689Skan cp_parser_init_declarator. 2054169689Skan (cp_parser_type_parameter): Do not defer checks in default 2055169689Skan arguments. 2056169689Skan (cp_parser_explicit_specialization): Adjust call to 2057169689Skan cp_parser_single_declaration. 2058169689Skan (cp_parser_init_declarator): Perform template-parameter access 2059169689Skan checks. 2060169689Skan (cp_parser_parameter_declaration): Do not defer checks for 2061169689Skan template parameter default arguments. 2062169689Skan (cp_parser_template_declaration_after_export): Gather access 2063169689Skan checks for template parameters, and pass them to 2064169689Skan cp_parser_single_declaration. 2065169689Skan (cp_parser_template_parameter_access_checks): New function. 2066169689Skan (cp_parser_single_declaration): Add checks parameter. 2067169689Skan 2068169689Skan PR c++/27505 2069169689Skan * call.c (convert_like_real): Convert bitfields to their declared 2070169689Skan types when forming an rvalue. 2071169689Skan * tree.c (convert_bitfield_to_declared_type): New function. 2072169689Skan (rvalue): Use it. 2073169689Skan * cp-tree.h (convert_bitfield_to_declare_type): Declare it. 2074169689Skan 2075169689Skan2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2076169689Skan 2077169689Skan PR c++/27582 2078169689Skan * pt.c (any_dependent_template_arguments_p): Return early on invalid 2079169689Skan argument list. 2080169689Skan 2081169689Skan PR c++/27581 2082169689Skan * search.c (adjust_result_of_qualified_name_lookup): Skip on 2083169689Skan invalid context_class. 2084169689Skan 2085169689Skan PR c++/27315 2086169689Skan * pt.c (do_decl_instantiation): Return early on invalid decl. 2087169689Skan 2088169689Skan PR c++/27559 2089169689Skan * pt.c (push_template_decl_real): Return error_mark_node instead 2090169689Skan of broken decl. 2091169689Skan 2092169689Skan PR c++/27496 2093169689Skan * pt.c (tsubst_friend_class): Return early on invalid friend 2094169689Skan declarations. 2095169689Skan 2096169689Skan2006-05-14 H.J. Lu <hongjiu.lu@intel.com> 2097169689Skan 2098169689Skan * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H). 2099169689Skan (cp/decl2.o): Likewise. 2100169689Skan (cp/typeck.o): Likewise. 2101169689Skan (cp/cvt.o): Likewise. 2102169689Skan (cp/parser.o): Likewise. 2103169689Skan (cp/call.o): Replace target.h with $(TARGET_H). 2104169689Skan 2105169689Skan2006-05-14 Alexandre Oliva <aoliva@redhat.com> 2106169689Skan 2107169689Skan * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of 2108169689Skan COMPONENT_REF alone. 2109169689Skan 2110169689Skan2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2111169689Skan 2112169689Skan PR c++/27547 2113169689Skan * decl.c (copy_fn_p): Return early on non-member functions. 2114169689Skan 2115169689Skan2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2116169689Skan 2117169689Skan PR c++/27447 2118169689Skan * decl2.c (build_memfn_type): Skip invalid functions and class types. 2119169689Skan 2120169689Skan2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2121169689Skan 2122169689Skan PR c++/27427 2123169689Skan * pt.c (convert_nontype_argument): Return early on invalid arguments. 2124169689Skan 2125169689Skan * pt.c (process_template_parm): Remove superfluous temporary. 2126169689Skan 2127169689Skan PR c++/27430 2128169689Skan * pt.c (process_template_parm): Handle erroneous non-type parameters. 2129169689Skan 2130169689Skan PR c++/27423 2131169689Skan * typeck.c (convert_for_initialization): Skip erroneous types. 2132169689Skan 2133169689Skan PR c++/27422 2134169689Skan * typeck.c (convert_arguments): Return early on args with 2135169689Skan invalid types. 2136169689Skan 2137169689Skan2006-05-03 Aldy Hernandez <aldyh@redhat.com> 2138169689Skan 2139169689Skan PR/21391 2140169689Skan * typeck.c (build_static_cast_1): Save casted types in used types 2141169689Skan hash table. 2142169689Skan (build_reinterpret_cast_1): Same. 2143169689Skan * rtti.c (build_dynamic_cast_1): Same. 2144169689Skan 2145169689Skan2006-05-04 Jakub Jelinek <jakub@redhat.com> 2146169689Skan 2147169689Skan PR c++/27359 2148169689Skan * parser.c (cp_parser_omp_for_loop): Only call 2149169689Skan cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not 2150169689Skan called. 2151169689Skan 2152169689Skan2006-05-02 Mark Mitchell <mark@codesourcery.com> 2153169689Skan 2154169689Skan PR c++/27102 2155169689Skan * decl.c (grokdeclarator): Robustify checks for defining members 2156169689Skan of incomplete types. 2157169689Skan 2158169689Skan PR c++/27309 2159169689Skan * class.c (add_method): Call grok_special_member_properties. 2160169689Skan * decl.c (grokdeclarator): Don't call it here. 2161169689Skan (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or 2162169689Skan assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a 2163169689Skan constructor. 2164169689Skan (start_method): Don't call grok_special_member_properties. 2165169689Skan * method.c (implicitly_declare_fn): Likewise. 2166169689Skan * pt.c (instantiate_class_template): Likewise. 2167169689Skan * decl2.c (grokfield): Likewise. 2168169689Skan 2169169689Skan2006-05-02 Jakub Jelinek <jakub@redhat.com> 2170169689Skan 2171169689Skan PR middle-end/27337 2172169689Skan * cp-gimplify.c (cxx_omp_privatize_by_reference): New function. 2173169689Skan * cp-tree.h (cxx_omp_privatize_by_reference): New prototype. 2174169689Skan * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define. 2175169689Skan 2176169689Skan2006-04-30 Mark Mitchell <mark@codesourcery.com> 2177169689Skan 2178169689Skan PR c++/27094 2179169689Skan * pt.c (tsubst_default_argument): Increment function_depth around 2180169689Skan call to tsubst_expr. 2181169689Skan * parser.c (cp_parser_parameter_declaration): Likewise. 2182169689Skan * decl2.c (mark_used): Tidy. 2183169689Skan 2184169689Skan2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2185169689Skan 2186169689Skan PR c++/27278 2187169689Skan * decl.c (grok_op_properties): Skip operators with invalid args 2188169689Skan when checking for class-type or enum-type args. 2189169689Skan 2190169689Skan2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2191169689Skan 2192169689Skan PR c++/27279 2193169689Skan * decl.c (copy_fn_p): Skip functions with invalid first arg. 2194169689Skan 2195169689Skan2006-04-27 Mark Mitchell <mark@codesourcery.com> 2196169689Skan 2197169689Skan PR c++/27292 2198169689Skan * tree.c (rvalue): Convert bitfields to their declared types. 2199169689Skan 2200169689Skan PR c++/27102 2201169689Skan * typeck2.c (cxx_incomplete_type_diagnostic): Handle 2202169689Skan TYPENAME_TYPE. 2203169689Skan 2204169689Skan2006-04-24 Mark Mitchell <mark@codesourcery.com> 2205169689Skan 2206169689Skan PR c++/27292 2207169689Skan * typeck.c (decay_conversion): Don't adjust bitfield types. 2208169689Skan (perform_integral_promotions): Treat bitfield enums as enums, not 2209169689Skan as short integer types. 2210169689Skan * tree.c (rvalue): Convert bitfields to their correct types. 2211169689Skan 2212169689Skan2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2213169689Skan 2214169689Skan PR c++/19963 2215169689Skan * class.c (layout_class_type): Skip fields with invalid types. 2216169689Skan 2217169689Skan2006-04-23 Mark Mitchell <mark@codesourcery.com> 2218169689Skan 2219169689Skan PR c++/26912 2220169689Skan * cp-tree.h (build_this_parm): Declare. 2221169689Skan (grok_method_quals): Remove. 2222169689Skan (build_memfn_type): Declare. 2223169689Skan (build_artificial_parm): Declare. 2224169689Skan (do_friend): Remove quals parameter. 2225169689Skan * decl.c (build_this_parm): New function. 2226169689Skan (grokfndecl): Use it. Do not pass quals to grokclassfn. 2227169689Skan (grokdeclarator): Rename quals to memfn_quals. Avoid allocating 2228169689Skan unnecessary TYPE_DECLs. Correct qualification of member function 2229169689Skan types. Tidy. 2230169689Skan * method.c (implicitly_declare_fn): Use build_this_parm. 2231169689Skan * friend.c (do_friend): Remove quals parameter. 2232169689Skan * decl2.c (grok_method_quals): Remove. 2233169689Skan (build_memfn_type): New function. 2234169689Skan (build_artificial_parm): Give it external linkage. 2235169689Skan (grokclassfn): Remove quals parameter. Do not build "this" 2236169689Skan PARM_DECL here. 2237169689Skan 2238169689Skan PR c++/26534 2239169689Skan * cp-tree.h (is_bitfield_expr_with_lowered_type): New function. 2240169689Skan * typeck.c (is_bitfield_expr_with_lowered_type): New function. 2241169689Skan (decay_conversion): Convert bitfield expressions to the correct 2242169689Skan type. 2243169689Skan (build_modify_expr): Remove spurious conversions. 2244169689Skan * class.c (layout_class_type): Modify the type of bitfields to 2245169689Skan indicate a limited range. 2246169689Skan * call.c (standard_conversion): Adjust the type of bitfield 2247169689Skan expressions used in an rvalue context. 2248169689Skan (build_conditional_expr): Likewise. 2249169689Skan 2250169689Skan2006-04-22 Kazu Hirata <kazu@codesourcery.com> 2251169689Skan 2252169689Skan * decl.c: Fix comment typos. 2253169689Skan 2254169689Skan2006-04-21 Eric Christopher <echristo@apple.com> 2255169689Skan 2256169689Skan * decl.c: Fix typo in function name. 2257169689Skan 2258169689Skan2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2259169689Skan 2260169689Skan PR c++/26558 2261169689Skan * parser.c (cp_parser_class_name): Check for invalid typenames. 2262169689Skan Rearrange code. 2263169689Skan 2264169689Skan PR c++/26739 2265169689Skan * pt.c (tsubst_friend_function): Return early if 2266169689Skan pushdecl_namespace_level fails. 2267169689Skan 2268169689Skan PR c++/26036 2269169689Skan * typeck.c (convert_arguments): Return error_mark_node instead of 2270169689Skan error_mark_list. 2271169689Skan * cp-tree.h (error_mark_list): Remove declaration. 2272169689Skan * decl.c (error_mark_list): Remove definition. 2273169689Skan (cxx_init_decl_processing): Do not initialize error_mark_list. 2274169689Skan 2275169689Skan PR c++/10385 2276169689Skan * rtti.c (build_dynamic_cast_1): Check for invalid conversions 2277169689Skan before calling convert_to_reference. 2278169689Skan * cvt.c (convert_to_reference): Assert that reftype is a 2279169689Skan REFERENCE_TYPE. 2280169689Skan 2281169689Skan2006-04-19 Mark Mitchell <mark@codesourcery.com> 2282169689Skan 2283169689Skan PR c++/27102 2284169689Skan * class.c (currently_open_class): Tidy. 2285169689Skan * decl.c (grokdeclarator): If we encounter an erroneous 2286169689Skan declarator, assume that we have already issued an error message 2287169689Skan and return. Return error_mark_node instead of NULL_TREE in more 2288169689Skan places. Issue errors about function definitions that do not have 2289169689Skan a function declarator. Check for complete types for all function 2290169689Skan definitions. 2291169689Skan * cp-tree.h (cp_error_declarator): Remove. 2292169689Skan (currently_open_class): Change return type. 2293169689Skan * parser.c (cp_parser_id_expression): Add optional_p parameter. 2294169689Skan (cp_parser_parse_diagnose_invalid_type_name): Adjust calls. 2295169689Skan (cp_parser_id_expression): Likewise. 2296169689Skan (cp_parser_unqualified_id): If the name is optional, return 2297169689Skan NULL_TREE. 2298169689Skan (cp_parser_postfix_dot_deref_expression): Adjust calls. 2299169689Skan (cp_parser_type_parameter): Likewise. 2300169689Skan (cp_parser_unqualified_id): Likewise. 2301169689Skan (cp_parser_direct_declarator): Likewise. 2302169689Skan (cp_parser_declarator_id): Add optional_p parameter. 2303169689Skan (cp_parser_function_definition_from_specifiers_and_declarator): 2304169689Skan Assume that start_function indicates failure only if it has issued 2305169689Skan an error. 2306169689Skan (cp_parser_omp_var_list_no_open): Adjust calls. 2307169689Skan 2308169689Skan2006-04-17 Janis Johnson <janis187@us.ibm.com> 2309169689Skan 2310169689Skan PR c++/26114, c++/26115 2311169689Skan * typeck.c (cxx_mark_addressable): Restore check for extra_warnings. 2312169689Skan * class.c (check_field_decls): Ditto. 2313169689Skan 2314169689Skan2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2315169689Skan 2316169689Skan * init.c (build_offset_ref): Remove superfluous temporary. 2317169689Skan 2318169689Skan2006-04-16 Mark Mitchell <mark@codesourcery.com> 2319169689Skan 2320169689Skan PR c++/26365 2321169689Skan * typeck.c (finish_class_member_access_expr): Robustify 2322169689Skan 2323169689Skan2006-04-15 Kazu Hirata <kazu@codesourcery.com> 2324169689Skan 2325169689Skan * Make-lang.in (cp/pt.o): Depend on vecprim.h. 2326169689Skan * pt.c: Include vecprim.h. 2327169689Skan (inline_parm_levels): Change the type to VEC(int,heap) *. 2328169689Skan (inline_parm_levels_used): Remove. 2329169689Skan (maybe_begin_member_template_processing, 2330169689Skan maybe_end_member_template_processing): Use VEC instead of 2331169689Skan VARRAY. 2332169689Skan 2333169689Skan * cp/call.c: Fix comment typos. 2334169689Skan 2335169689Skan2006-04-12 Mark Mitchell <mark@codesourcery.com> 2336169689Skan 2337169689Skan * parser.c (cp_parser_init_declarator): Initialize local variables 2338169689Skan aggressively. 2339169689Skan 2340169689Skan2006-04-12 Roger Sayle <roger@eyesopen.com> 2341169689Skan 2342169689Skan * parser.c (cp_parser_init_declarator): Initialise 2343169689Skan is_parenthesized_init to false to avoid compiler warning. 2344169689Skan 2345169689Skan2006-04-11 Mark Mitchell <mark@codesourcery.com> 2346169689Skan 2347169689Skan * cp-tree.h (build_operator_new_call): Adjust prototype. 2348169689Skan (build_new_method_call): Likewise. 2349169689Skan (build_op_delete_call): Likewise. 2350169689Skan * init.c (build_raw_new_expr): New function. 2351169689Skan (build_new_1): Pass information as parameters, rather than 2352169689Skan bundling it into a NEW_EXPR. 2353169689Skan (build_new): Adjust accordingly. 2354169689Skan (build_vec_delete_1): Adjust for changes to build_op_delete_call. 2355169689Skan (build_delete): Likewise. 2356169689Skan * decl.c (finish_destructor_body): Likewise. 2357169689Skan * call.c (build_operator_new_call): Return the allocation function 2358169689Skan used. 2359169689Skan (build_op_delete_call): Take allocation function as parameter. 2360169689Skan (build_special_member_call): Adjust call to build_new_method_call. 2361169689Skan (build_new_method_call): Return function called. 2362169689Skan * pt.c (tsubst_copy_and_build): Adjust call to 2363169689Skan build_new_method_call. 2364169689Skan * semantics.c (finish_call_expr): Likewise. 2365169689Skan * parser.c (cp_parser_postfix_expression): Likewise. 2366169689Skan * typeck2.c (cxx_incomplete_type_diagnostic): Refer to 2367169689Skan "incomplete", not "undefined", types. 2368169689Skan 2369169689Skan PR c++/26295 2370169689Skan * decl.c (grokdeclarator): Remove namespace-handling code for 2371169689Skan pointers-to-members. 2372169689Skan * parser.c (cp_parser_ptr_operator): Check for qualified names 2373169689Skan using namespaces. 2374169689Skan 2375169689Skan PR c++/26122 2376169689Skan * parser.c (cp_parser_init_declarator): Adjust logic for deciding 2377169689Skan whether or not to look for a pure-specifier. 2378169689Skan (cp_parser_member_declaration): Likewise. 2379169689Skan 2380169689Skan2006-04-08 Kazu Hirata <kazu@codesourcery.com> 2381169689Skan 2382169689Skan * decl2.c, pt.c, semantics.c: Fix comment typos. 2383169689Skan 2384169689Skan2006-04-06 Roger Sayle <roger@eyesopen.com> 2385169689Skan 2386169689Skan * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check. 2387169689Skan 2388169689Skan2006-04-05 Jason Merrill <jason@redhat.com> 2389169689Skan 2390169689Skan * name-lookup.c (push_namespace_with_attribs): Temporarily disable 2391169689Skan default hidden visibility for anonymous namespace. 2392169689Skan 2393169689Skan2006-03-29 Roger Sayle <roger@eyesopen.com> 2394169689Skan 2395169689Skan PR c++/22494 2396169689Skan * init.c (build_vec_delete_1): Convert BASE pointer's type to 2397169689Skan the base pointer type to avoid a type mismatch in the EQ_EXPR. 2398169689Skan 2399169689Skan2006-03-24 Carlos O'Donell <carlos@codesourcery.com> 2400169689Skan 2401169689Skan * search.c (maybe_suppress_debug_info): If 2402169689Skan flag_emit_class_debug_always then don't suppress. 2403169689Skan 2404169689Skan2006-03-22 Jason Merrill <jason@redhat.com> 2405169689Skan 2406169689Skan * name-lookup.c (push_namespace_with_attribs): Only apply hidden 2407169689Skan visibility to anonymous namespaces if HAVE_GAS_HIDDEN. 2408169689Skan 2409169689Skan2006-03-21 Jakub Jelinek <jakub@redhat.com> 2410169689Skan 2411169689Skan PR c++/26691 2412169689Skan * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments. 2413169689Skan 2414169689Skan2006-03-21 Jason Merrill <jason@redhat.com> 2415169689Skan 2416169689Skan PR c++/21581 2417169689Skan * parser.c (cp_parser_declaration): Support attributes on 2418169689Skan anonymous namespaces. 2419169689Skan * name-lookup.c (push_namespace_with_attribs): Anonymous 2420169689Skan namespaces default to hidden visibility. 2421169689Skan 2422169689Skan2006-03-20 Jason Merrill <jason@redhat.com> 2423169689Skan 2424169689Skan PR c++/21764, c++/19238 2425169689Skan * decl.c (cp_finish_decl): Call determine_visibility later. 2426169689Skan (start_preparsed_function): Likewise. 2427169689Skan * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros. 2428169689Skan (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros. 2429169689Skan * name-lookup.h (struct cp_binding_level): Add has_visibility 2430169689Skan bitfield. 2431169689Skan * name-lookup.c: Include c-pragma.h. 2432169689Skan (push_namespace_with_attribs): Split out from push_namespace. 2433169689Skan Push visibility if appropriate. Set TREE_PUBLIC on namespaces. 2434169689Skan (leave_scope): Pop visibility if appropriate. 2435169689Skan * decl2.c (determine_visibility_from_class): Split out from... 2436169689Skan (determine_visibility): ...here. Handle function scope and 2437169689Skan nested classes. 2438169689Skan (import_export_decl): Move visibility handling to 2439169689Skan determine_visibility_from_class. 2440169689Skan * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow 2441169689Skan attributes on namespace declarations. 2442169689Skan 2443169689Skan2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2444169689Skan 2445169689Skan PR c++/6634 2446169689Skan * decl.c (grokdeclarator): Do not accept long long double. 2447169689Skan Reorganize checks for invalid (combinations of) type modifiers. 2448169689Skan Quote modifiers in messages. 2449169689Skan 2450169689Skan2006-03-09 Jason Merrill <jason@redhat.com> 2451169689Skan 2452169689Skan PR c++/16387, c++/16389 2453169689Skan * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions. 2454169689Skan (cxx_sizeof_or_alignof_expr): Split out from here. 2455169689Skan 2456169689Skan2006-03-09 Diego Novillo <dnovillo@redhat.com> 2457169689Skan 2458169689Skan Merge from gomp-20050608-branch 2459169689Skan 2460169689Skan 2006-02-02 Diego Novillo <dnovillo@redhat.com> 2461169689Skan 2462169689Skan * decl.c (pop_labels_1): Use appropriate pointer casting. 2463169689Skan (poplevel_named_label_1): Likewise. 2464169689Skan (named_label_entry_hash): Likewise. 2465169689Skan (named_label_entry_eq): Likewise. 2466169689Skan (check_goto): Likewise. 2467169689Skan (define_label): Likewise. 2468169689Skan 2469169689Skan 2006-01-26 Diego Novillo <dnovillo@redhat.com> 2470169689Skan 2471169689Skan * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead 2472169689Skan of TREE_BLOCK. 2473169689Skan * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND 2474169689Skan instead of TREE_CODE/TREE_OPERAND. 2475169689Skan * semantics.c: Likewise. 2476169689Skan * parser.c: Likewise. 2477169689Skan 2478169689Skan 2005-11-10 Diego Novillo <dnovillo@redhat.com> 2479169689Skan 2480169689Skan * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if 2481169689Skan target does not support TLS. 2482169689Skan 2483169689Skan 2005-11-09 Jakub Jelinek <jakub@redhat.com> 2484169689Skan 2485169689Skan * decl.c (redeclaration_error_message): Don't error about 2486169689Skan DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P 2487169689Skan (olddecl). 2488169689Skan 2489169689Skan 2005-11-08 Jakub Jelinek <jakub@redhat.com> 2490169689Skan 2491169689Skan PR c++/24735 2492169689Skan * semantics.c (finish_omp_barrier, finish_omp_flush): New 2493169689Skan functions. 2494169689Skan * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier. 2495169689Skan (cp_parser_omp_flush): Call finish_omp_flush. 2496169689Skan * cp-tree.h (finish_omp_barrier, finish_omp_flush): New 2497169689Skan prototypes. 2498169689Skan 2499169689Skan PR c++/24734 2500169689Skan * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED. 2501169689Skan 2502169689Skan 2005-11-03 Jakub Jelinek <jakub@redhat.com> 2503169689Skan 2504169689Skan * semantics.c (finish_omp_threadprivate): Error on class-scope 2505169689Skan variables. 2506169689Skan 2507169689Skan 2005-11-02 Jakub Jelinek <jakub@redhat.com> 2508169689Skan 2509169689Skan * parser.c (cp_parser_omp_all_clauses): If some clause 2510169689Skan type is not allowed, don't remove just one of the 2511169689Skan clauses, but all clauses added in that loop round. 2512169689Skan 2513169689Skan * semantics.c (finish_omp_clauses): Fix function 2514169689Skan comment. Don't handle non-const or mutable specially, 2515169689Skan as const and not mutable is predetermined shared and 2516169689Skan that leads to double error. Don't ICE if copyin var is 2517169689Skan PARM_DECL. 2518169689Skan 2519169689Skan PR c++/24613 2520169689Skan * parser.c (cp_parser_pragma): Diagnose 2521169689Skan PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS 2522169689Skan construct. 2523169689Skan 2524169689Skan * semantics.c (finish_omp_threadprivate): Error if V 2525169689Skan is automatic variable or has incomplete type. 2526169689Skan 2527169689Skan 2005-11-01 Diego Novillo <dnovillo@redhat.com> 2528169689Skan 2529169689Skan * parser.c (cp_parser_omp_all_clauses): Use 2530169689Skan OMP_CLAUSE_CHAIN instead of TREE_CHAIN. 2531169689Skan 2532169689Skan 2005-11-01 Diego Novillo <dnovillo@redhat.com> 2533169689Skan 2534169689Skan * parser.c (cp_parser_omp_all_clauses): When emitting an 2535169689Skan error message, remove the invalid clause from the list. 2536169689Skan 2537169689Skan 2005-10-31 Diego Novillo <dnovillo@redhat.com> 2538169689Skan 2539169689Skan * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in 2540169689Skan combined parallel+workshare directives. 2541169689Skan 2542169689Skan 2005-10-31 Richard Henderson <rth@redhat.com> 2543169689Skan 2544169689Skan * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR): 2545169689Skan Use cxx_omp_clause_dtor. 2546169689Skan * cp-tree.h (CP_OMP_CLAUSE_INFO): New. 2547169689Skan (cxx_omp_clause_dtor): New. 2548169689Skan * cp-gimplify.c (cxx_omp_clause_apply_fn): New. 2549169689Skan (cxx_omp_clause_default_ctor): Use it. 2550169689Skan (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op): 2551169689Skan Likewise. 2552169689Skan (cxx_omp_clause_dtor): New. 2553169689Skan * semantics.c (finish_omp_clauses): Rewrite cdtor 2554169689Skan checking to fill in CP_OMP_CLAUSE_INFO. Don't 2555169689Skan specialcase LASTPRIVATE for removal. 2556169689Skan (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor, 2557169689Skan cxx_omp_clause_assign_op): Move to cp-gimplify.c. 2558169689Skan 2559169689Skan 2005-10-28 Jakub Jelinek <jakub@redhat.com> 2560169689Skan 2561169689Skan * semantics.c (finish_omp_threadprivate): If 2562169689Skan DECL_RTL_SET_P, call make_decl_rtl again so that 2563169689Skan encode_section_info can update SYMBOL_REF's flags. 2564169689Skan 2565169689Skan 2005-10-26 Jakub Jelinek <jakub@redhat.com> 2566169689Skan 2567169689Skan * semantics.c (finish_omp_for): Don't segfault if COND 2568169689Skan or INCR is NULL. If not calling c_finish_omp_for 2569169689Skan right away and one of COND and INCR is NULL, issue 2570169689Skan error and don't expand anything. 2571169689Skan 2572169689Skan PR c++/24512 2573169689Skan * cp-tree.h (finish_omp_for): Add PRE_BODY argument. 2574169689Skan * semantics.c (finish_omp_for): Likewise. Set 2575169689Skan OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it 2576169689Skan into the current statement list if not processing 2577169689Skan template decl or pass it to c_finish_omp_for. 2578169689Skan 2579169689Skan * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs 2580169689Skan into PRE_BODY statement list. Pass it to finish_omp_for. 2581169689Skan * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also 2582169689Skan OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to 2583169689Skan finish_omp_for. Put all the statements into sk_omp 2584169689Skan scope. 2585169689Skan 2586169689Skan 2005-10-25 Jakub Jelinek <jakub@redhat.com> 2587169689Skan 2588169689Skan PR c++/24516 2589169689Skan * parser.c (struct cp_parser): Rename in_iteration_statement 2590169689Skan field to in_statement. 2591169689Skan (IN_SWITCH_STMT, IN_ITERATION_STMT): Define. 2592169689Skan (IN_OMP_BLOCK, IN_OMP_FOR): Change values. 2593169689Skan (cp_parser_new, cp_parser_begin_omp_structured_block, 2594169689Skan cp_parser_end_omp_structured_block, 2595169689Skan cp_parser_omp_for_loop): Adjust for 2596169689Skan in_iteration_statement renaming. 2597169689Skan (cp_parser_selection_statement): Save 2598169689Skan parser->in_iteration, or it temporarily with 2599169689Skan IN_SWITCH_STMT for the 2600169689Skan cp_parser_implicitly_scoped_statement call. 2601169689Skan (cp_parser_iteration_statement): Adjust for 2602169689Skan in_iteration_statement renaming. Use 2603169689Skan IN_ITERATION_STMT rather than true. 2604169689Skan (cp_parser_jump_statement): Adjust for 2605169689Skan in_iteration_statement renaming and new values. Don't 2606169689Skan error on break in a switch statement within OMP_FOR or 2607169689Skan OpenMP structured block. 2608169689Skan 2609169689Skan PR c++/24513 2610169689Skan * parser.c (cp_parser_cache_group): Don't stop if next 2611169689Skan token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as 2612169689Skan well. If current token is CPP_PRAGMA, consume 2613169689Skan everything until CPP_PRAGMA_EOL inclusive. 2614169689Skan 2615169689Skan 2005-10-24 Jakub Jelinek <jakub@redhat.com> 2616169689Skan 2617169689Skan PR c++/24502 2618169689Skan * semantics.c (finish_omp_for): Handle MODOP_EXPR in 2619169689Skan addition to MODIFY_EXPR. 2620169689Skan 2621169689Skan 2005-10-23 Richard Henderson <rth@redhat.com> 2622169689Skan 2623169689Skan * cp-gimplify.c (struct cp_gimplify_ctx): Remove. 2624169689Skan (bc_label): New. 2625169689Skan (begin_bc_block, finish_bc_block): Use it. 2626169689Skan (push_context, pop_context): Remove. 2627169689Skan (cp_genericize): Don't use them. Assert bc_label is null. 2628169689Skan * semantics.c (finish_omp_clauses): Create a fake data 2629169689Skan element of TYPE for probing ctors. 2630169689Skan 2631169689Skan 2005-10-23 Richard Henderson <rth@redhat.com> 2632169689Skan 2633169689Skan * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New. 2634169689Skan (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New. 2635169689Skan (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New. 2636169689Skan (LANG_HOOKS_OMP_CLAUSE_DTOR): New. 2637169689Skan * semantics.c (finish_omp_clauses): Look through 2638169689Skan arrays when looking up special member calls. Also 2639169689Skan remove FIRSTPRIVATE when LASTPRIVATE fails. 2640169689Skan (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New. 2641169689Skan (cxx_omp_clause_assign_op): New. 2642169689Skan * cp-tree.h: Declare them. 2643169689Skan 2644169689Skan 2005-10-21 Richard Henderson <rth@redhat.com> 2645169689Skan 2646169689Skan * decl.c (check_previous_goto_1): Return false if error. 2647169689Skan (check_switch_goto): Likewise. 2648169689Skan (finish_case_label): Don't emit the case label on error. 2649169689Skan * parser.c (struct cp_parser): Revert 2650169689Skan in_switch_statement_p changes. 2651169689Skan (cp_parser_labeled_statement, 2652169689Skan cp_parser_selection_statement): Likewise. 2653169689Skan (cp_parser_begin_omp_structured_block): Don't save... 2654169689Skan (cp_parser_end_omp_structured_block): or restore 2655169689Skan in_switch_statement_p. 2656169689Skan 2657169689Skan 2005-10-21 Richard Henderson <rth@redhat.com> 2658169689Skan 2659169689Skan * semantics.c (finish_omp_threadprivate): Set 2660169689Skan decl_flags.u2sel when necessary. 2661169689Skan 2662169689Skan 2005-10-21 Richard Henderson <rth@redhat.com> 2663169689Skan 2664169689Skan * decl.c (poplevel_named_label_1): Restore creation of the 2665169689Skan bad_decls list. 2666169689Skan (decl_jump_unsafe): Check for error_mark_node types. 2667169689Skan (check_goto): Don't check cdtor_label. Don't use identify_goto. 2668169689Skan * semantics.c (finish_return_stmt): Do check_omp_return before 2669169689Skan converting to cdtor_label goto. 2670169689Skan 2671169689Skan 2005-10-21 Richard Henderson <rth@redhat.com> 2672169689Skan 2673169689Skan PR c++/24451 2674169689Skan * decl.c (check_omp_return): Return false on error. 2675169689Skan * cp-tree.h (check_omp_return): Update decl. 2676169689Skan * semantics.c (finish_return_stmt): Avoid adding 2677169689Skan return on error. 2678169689Skan 2679169689Skan 2005-10-21 Richard Henderson <rth@redhat.com> 2680169689Skan 2681169689Skan * cp-tree.h (struct language_function): Remove 2682169689Skan x_named_label_uses. 2683169689Skan Change x_named_labels to a hashtable. 2684169689Skan (check_omp_return): Declare. 2685169689Skan * decl.c (struct named_label_use_entry): Rename from 2686169689Skan named_label_use_list. Remove label_decl. 2687169689Skan (struct named_label_entry): Rename from 2688169689Skan named_label_list. Remove old_value and next. Change 2689169689Skan in_try_scope and in_catch_scope to bool. Add 2690169689Skan in_omp_scope. 2691169689Skan (pop_labels_1): New. 2692169689Skan (pop_labels): Use it. 2693169689Skan (pop_local_label, poplevel_named_label_1): New. 2694169689Skan (poplevel): Use them. 2695169689Skan (named_label_entry_hash, named_label_entry_eq): New. 2696169689Skan (make_label_decl): Create named_labels. Move label 2697169689Skan creation bits from lookup_label. 2698169689Skan (declare_local_label): Tidy. 2699169689Skan (identify_goto): Split out from ... 2700169689Skan (check_previous_goto_1): Add exited_omp argument. 2701169689Skan Handle omp scopes. 2702169689Skan 2703169689Skan (use_label): Merge into... 2704169689Skan (check_goto): ... here. Handle omp scopes. 2705169689Skan (check_omp_return): New. 2706169689Skan (check_previous_gotos): Merge into... 2707169689Skan (define_label): ... here. 2708169689Skan (save_function_data): Remove x_named_label_uses reference. 2709169689Skan (finish_function): Likewise. 2710169689Skan * name-lookup.h (sk_omp): New. 2711169689Skan * name-lookup.c (begin_scope): Handle it. 2712169689Skan * parser.c (cp_parser_omp_for): Don't create extra 2713169689Skan compound stmt. 2714169689Skan 2715169689Skan (cp_parser_omp_sections): Likewise. 2716169689Skan * semantics.c (finish_return_stmt): Call check_omp_return. 2717169689Skan (begin_omp_structured_block): Use sk_omp. 2718169689Skan (finish_omp_structured_block): Use do_poplevel. Don't build a 2719169689Skan MUST_NOT_THROW expression here. 2720169689Skan (begin_omp_parallel, finish_omp_parallel): Don't create extra 2721169689Skan compound statements. 2722169689Skan 2723169689Skan 2005-10-21 Diego Novillo <dnovillo@redhat.com> 2724169689Skan 2725169689Skan PR 24455 2726169689Skan * cp/cp-tree.h (struct lang_decl_flags): Add field 2727169689Skan threadprivate_p. 2728169689Skan (CP_DECL_IS_THREADPRIVATE): Define. 2729169689Skan * cp/semantics.c (finish_omp_threadprivate): Set. Do 2730169689Skan not error out if CP_DECL_IS_THREADPRIVATE is set 2731169689Skan already. 2732169689Skan * cp/decl.c (duplicate_decls): Merge 2733169689Skan CP_DECL_THREADPRIVATE_P. 2734169689Skan 2735169689Skan 2005-10-20 Richard Henderson <rth@redhat.com> 2736169689Skan 2737169689Skan * cp-gimplify.c (cp_gimplify_omp_for): New. 2738169689Skan (cp_gimplify_expr): Call it. 2739169689Skan * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New. 2740169689Skan * parser.c (struct cp_parser): Rename 2741169689Skan in_iteration_statement_p to in_iteration_statement and 2742169689Skan change to unsigned char. Similarly with 2743169689Skan in_switch_statement. Update all users. 2744169689Skan (IN_OMP_BLOCK, IN_OMP_FOR): New. 2745169689Skan (cp_parser_labeled_statement): Diagnose case labels 2746169689Skan binding closer to an openmp block nested than the 2747169689Skan switch. 2748169689Skan (cp_parser_jump_statement): Diagnose break and 2749169689Skan continue labels binding closer to an openmp block than 2750169689Skan an iteration or switch. 2751169689Skan (cp_parser_omp_for_loop): Mark in_iteration_statement 2752169689Skan for an omp for. 2753169689Skan (cp_parser_begin_omp_structured_block): New. 2754169689Skan (cp_parser_end_omp_structured_block): New. 2755169689Skan (cp_parser_omp_structured_block): Use them. 2756169689Skan (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise. 2757169689Skan (cp_parser_omp_parallel): Likewise. 2758169689Skan 2759169689Skan 2005-10-20 Richard Henderson <rth@redhat.com> 2760169689Skan 2761169689Skan * semantics.c (begin_omp_structured_block): New. 2762169689Skan (finish_omp_structured_block): New. 2763169689Skan (begin_omp_parallel, finish_omp_parallel): Use them. 2764169689Skan * parser.c (cp_parser_omp_structured_block): Likewise. 2765169689Skan (cp_parser_omp_for): Likewise. 2766169689Skan (cp_parser_omp_sections_scope): Likewise. 2767169689Skan * cp-tree.h: Declare them. 2768169689Skan 2769169689Skan 2005-10-20 Richard Henderson <rth@redhat.com> 2770169689Skan 2771169689Skan * parser.c (cp_parser_omp_master): Return the statement. 2772169689Skan (cp_parser_omp_ordered): Likewise. 2773169689Skan (cp_parser_omp_construct): Set the locus for them. 2774169689Skan 2775169689Skan 2005-10-19 Richard Henderson <rth@redhat.com> 2776169689Skan 2777169689Skan * semantics.c (finish_omp_atomic): Revert to 2778169689Skan uses_template_parms. 2779169689Skan 2780169689Skan 2005-10-19 Richard Henderson <rth@redhat.com> 2781169689Skan 2782169689Skan * semantics.c (finish_omp_clauses): Avoid 2783169689Skan DECL_THREAD_LOCAL_P on a PARM_DECL. Remove some 2784169689Skan stub asserts guaranteed to fail. 2785169689Skan 2786169689Skan 2005-10-19 Richard Henderson <rth@redhat.com> 2787169689Skan 2788169689Skan * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New. 2789169689Skan (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New. 2790169689Skan * parser.c (cp_parser_omp_clause_copyin): Remove. 2791169689Skan (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead. 2792169689Skan Call finish_omp_clauses. 2793169689Skan (cp_parser_omp_clause_if): Don't do error checking here. 2794169689Skan (cp_parser_omp_clause_num_threads): Likewise. 2795169689Skan (cp_parser_omp_clause_schedule): Likewise. 2796169689Skan (cp_parser_omp_atomic): Use finish_omp_atomic. 2797169689Skan (cp_parser_omp_for_loop): Don't discard DECL_EXPR. 2798169689Skan Don't decompose assignment statment here. Use 2799169689Skan finish_omp_for. 2800169689Skan 2801169689Skan * pt.c (tsubst_omp_clauses): New. 2802169689Skan (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS, 2803169689Skan OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC. 2804169689Skan * semantics.c (finish_omp_clauses): New. 2805169689Skan (begin_omp_parallel, finish_omp_parallel): Know Less about the 2806169689Skan internals of the stmt_list stack. 2807169689Skan (finish_omp_for, finish_omp_atomic): New. 2808169689Skan 2809169689Skan 2005-10-18 Jakub Jelinek <jakub@redhat.com> 2810169689Skan 2811169689Skan * semantics.c (cxx_omp_predetermined_sharing): New function. 2812169689Skan * cp-tree.h (cxx_omp_predetermined_sharing): New prototype. 2813169689Skan * cp-objcp-common.h 2814169689Skan (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine. 2815169689Skan 2816169689Skan 2005-10-18 Richard Henderson <rth@redhat.com> 2817169689Skan 2818169689Skan * parser.c (cp_parser_omp_single): Use make_node and accessors 2819169689Skan instead of build. 2820169689Skan 2821169689Skan 2005-10-17 Richard Henderson <rth@redhat.com> 2822169689Skan 2823169689Skan * parser.c (cp_parser_omp_for_loop): Handle declarations. 2824169689Skan 2825169689Skan 2005-10-12 Richard Henderson <rth@redhat.com> 2826169689Skan 2827169689Skan * Make-lang.in (CXX_C_OBJS): Add c-omp.o. 2828169689Skan * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare. 2829169689Skan (finish_omp_threadprivate): Declare. 2830169689Skan * parser.c (struct cp_lexer): Add in_pragma. 2831169689Skan (cp_lexer_consume_token): Don't consume a PRAGMA_EOL 2832169689Skan when in_pragma. 2833169689Skan (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL. 2834169689Skan (cp_parser_skip_to_end_of_statement): Likewise. 2835169689Skan (cp_parser_skip_to_end_of_block_or_statement): Likewise. 2836169689Skan (cp_parser_skip_to_closing_brace): Likewise. 2837169689Skan (cp_parser_skip_to_pragma_eol): Reset in_pragma. 2838169689Skan (cp_parser_require_pragma_eol): New. 2839169689Skan (cp_parser_statement): Add in_compound argument; 2840169689Skan update all callers. 2841169689Skan Restart if a non-statement pragma seen outside a 2842169689Skan compound. 2843169689Skan (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL. 2844169689Skan (cp_parser_declaration_seq_opt): Likewise. 2845169689Skan (cp_parser_member_specification_opt): Likewise. 2846169689Skan (cp_parser_function_definition_after_decl): Likewise. 2847169689Skan (cp_parser_skip_until_found): Likewise. 2848169689Skan (cp_parser_cache_group): Likewise. 2849169689Skan (enum pragma_omp_clause, cp_parser_omp_clause_name, 2850169689Skan check_no_duplicate_clause, 2851169689Skan cp_parser_omp_var_list_no_open, 2852169689Skan cp_parser_omp_var_list, cp_parser_omp_clause_copyin, 2853169689Skan cp_parser_omp_clause_default, cp_parser_omp_clause_if, 2854169689Skan cp_parser_omp_clause_nowait, 2855169689Skan cp_parser_omp_clause_num_threads, 2856169689Skan cp_parser_omp_clause_ordered, 2857169689Skan cp_parser_omp_clause_reduction, 2858169689Skan cp_parser_omp_clause_schedule, 2859169689Skan cp_parser_omp_all_clauses, 2860169689Skan cp_parser_omp_structured_block, cp_parser_omp_atomic, 2861169689Skan cp_parser_omp_barrier, cp_parser_omp_critical, 2862169689Skan cp_parser_omp_flush, cp_parser_omp_for_loop, 2863169689Skan cp_parser_omp_for, cp_parser_omp_master, 2864169689Skan cp_parser_omp_ordered, cp_parser_omp_sections_scope, 2865169689Skan cp_parser_omp_sections, cp_parser_omp_parallel, 2866169689Skan cp_parser_omp_single, cp_parser_omp_threadprivate, 2867169689Skan cp_parser_omp_construct): New. 2868169689Skan (cp_parser_pragma): Handle OpenMP pragmas. 2869169689Skan * semantics.c (finish_omp_threadprivate): New. 2870169689Skan (begin_omp_parallel, finish_omp_parallel): New. 2871169689Skan 2872169689Skan 2005-10-11 Richard Henderson <rth@redhat.com> 2873169689Skan 2874169689Skan * parser.c (struct cp_token): Add pragma_kind. 2875169689Skan (eof_token): Initialize it. 2876169689Skan (cp_lexer_handle_pragma): Remove. 2877169689Skan (cp_parser_initial_pragma): New. 2878169689Skan (cp_lexer_new_main): Use it. 2879169689Skan (cp_lexer_get_preprocessor_token): Initialize pragma_kind. 2880169689Skan (cp_lexer_print_token): Don't handle CPP_PRAGMA. 2881169689Skan (cp_parser_skip_to_pragma_eol): New. 2882169689Skan (cp_parser_error): Use it. 2883169689Skan (pragma_lex): New. 2884169689Skan 2885169689Skan 2005-10-09 Richard Henderson <rth@redhat.com> 2886169689Skan 2887169689Skan * lex.c (parse_strconst_pragma): Update for c_lex name change. 2888169689Skan (handle_pragma_java_exceptions): Likewise. 2889169689Skan * parser.c (cp_lexer_new_main): Likewise. 2890169689Skan 2891169689Skan 2005-10-06 Richard Henderson <rth@redhat.com> 2892169689Skan 2893169689Skan * parser.c (cp_lexer_new_main): Comment out defer_pragmas. 2894169689Skan (cp_lexer_handle_pragma): Comment out 2895169689Skan cpp_handle_deferred_pragma. 2896169689Skan 2897169689Skan 2005-10-01 Richard Henderson <rth@redhat.com> 2898169689Skan 2899169689Skan * name-lookup.c (lookup_name): Remove prefer_type argument. 2900169689Skan (lookup_name_prefer_type): New function. 2901169689Skan * name-lookup.h (lookup_name_prefer_type): Declare it. 2902169689Skan * decl.c (lookup_and_check_tag): Use it. 2903169689Skan * pt.c (tsubst_friend_class): Likewise. Update for 2904169689Skan lookup_name change. 2905169689Skan (lookup_template_class, tsubst_copy_and_build): Likewise. 2906169689Skan 2907169689Skan2006-03-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2908169689Skan 2909169689Skan PR c++/15759 2910169689Skan * tree.c (bot_manip): Don't call mark_used. 2911169689Skan 2912169689Skan2006-03-02 Mike Stump <mrs@apple.com> 2913169689Skan 2914169689Skan * decl2.c (import_export_decl): Remove redundant call to 2915169689Skan targetm.cxx.key_method_may_be_inline (). 2916169689Skan 2917169689Skan2006-03-02 Richard Sandiford <richard@codesourcery.com> 2918169689Skan 2919169689Skan * decl.c (start_decl): Use have_global_bss_p when deciding 2920169689Skan whether to make the decl common. 2921169689Skan 2922169689Skan2006-03-01 Mike Stump <mrs@apple.com> 2923169689Skan 2924169689Skan PR darwin/25908 2925169689Skan * decl2.c (import_export_decl): Fix ABI breakage on darwin. 2926169689Skan 2927169689Skan2006-02-24 Geoffrey Keating <geoffk@apple.com> 2928169689Skan 2929169689Skan * except.c (expand_start_catch_block): Handle 2930169689Skan flag_use_cxa_get_exception_ptr. 2931169689Skan 2932169689Skan2006-02-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2933169689Skan 2934161651Skan PR c++/26291 2935161651Skan * decl.c (grok_op_properties): Check for ellipsis in arguments of 2936161651Skan operators. 2937161651Skan 2938169689Skan2006-02-20 Rafael �vila de Esp�ndola <rafael.espindola@gmail.com> 2939169689Skan 2940169689Skan * Make-lang.in (C++): Remove. 2941169689Skan (.PHONY): Remove C++. 2942169689Skan 2943169689Skan2006-02-18 Mark Mitchell <mark@codesourcery.com> 2944169689Skan 2945169689Skan PR c++/26266 2946169689Skan * cp-tree.h (cp_finish_decl): Adjust declaration. 2947169689Skan (grokbitfield): Likewise. 2948169689Skan (finish_static_data_member_decl): Likewise. 2949169689Skan * init.c (constant_value_1): Ensure processing_template_decl when 2950169689Skan folding non-dependent initializers for static data members of 2951169689Skan dependent types. Return error_mark_node for erroneous 2952169689Skan initailizers. 2953169689Skan * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl. 2954169689Skan * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl. 2955169689Skan (cp_finish_decl): Add init_const_expr_p parameter. Set 2956169689Skan DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here. 2957169689Skan (finish_decl): Adjust call to cp_finish_decl. 2958169689Skan (compute_array_index_type): Robustify. 2959169689Skan (start_method): Use finish_decl, not cp_finish_decl. 2960169689Skan * rtti.c (emit_tinfo_decl): Likewise. 2961169689Skan * except.c (initialize_handler_parm): Adjust call to 2962169689Skan cp_finish_decl. 2963169689Skan (expand_start_catch_block): Likewise. 2964169689Skan * cvt.c (build_up_reference): Adjust call to cp_finish_decl. 2965169689Skan * pt.c (instantiate_class_template): Adjust call to 2966169689Skan finish_static_data_member_decl. 2967169689Skan (tsubst_expr): Use finish_decl, not cp_finish_decl. 2968169689Skan (instantiate_decl): Adjust call to cp_finish_decl. 2969169689Skan * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not 2970169689Skan cp_finish_decl. 2971169689Skan * decl2.c (finish_static_data_member_decl): Add init_const_expr_p 2972169689Skan parameter. 2973169689Skan (grokfield): Likewise. 2974169689Skan * parser.c (cp_parser_condition): Check for constant initializers. 2975169689Skan (cp_parser_init_declarator): Adjust calls to grokfield and 2976169689Skan cp_finish_decl. Don't set 2977169689Skan DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here. 2978169689Skan (cp_parser_member_declaration): Likewise. 2979169689Skan (cp_parser_objc_class_ivars): Likewise. 2980169689Skan 2981169689Skan2006-02-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2982169689Skan 2983169689Skan * call.c (standard_conversion): Return NULL instead of 0. 2984169689Skan (build_user_type_conversion_1): Likewise. 2985169689Skan (tourney): Likewise. 2986169689Skan * decl.c (redeclaration_error_message): Likewise. 2987169689Skan * error.c (language_to_string): Likewise. 2988169689Skan 2989169689Skan2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2990169689Skan 2991169689Skan * cp-tree.h (warn_hidden): Remove prototype. 2992169689Skan * class.c (warn_hidden): Make static. 2993169689Skan 2994169689Skan * cp-tree.h (build_type_conversion): Remove prototype. 2995169689Skan * cvt.c (build_type_conversion): Add prototype, make static. 2996169689Skan 2997169689Skan * cp-tree.h (push_tinst_level): Remove prototype. 2998169689Skan (pop_tinst_level): Likewise. 2999169689Skan * pt.c (push_tinst_level): Add prototype, make static. 3000169689Skan (pop_tinst_level): Likewise. 3001169689Skan 3002169689Skan2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3003169689Skan 3004169689Skan * decl.c (grokdeclarator): Return NULL_TREE instead of 0. 3005169689Skan * typeck.c (unary_complex_lvalue): Likewise. 3006169689Skan 3007169689Skan2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3008169689Skan 3009169689Skan * lex.c (parse_strconst_pragma): Return error_mark_node instead of 3010169689Skan "(tree)-1" to indicate failure. Simplify. 3011169689Skan (handle_pragma_interface): Test for error_mark_node instead of 3012169689Skan "(tree)-1". 3013169689Skan (handle_pragma_implementation): Likewise. 3014169689Skan 3015169689Skan2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3016169689Skan 3017169689Skan PR c++/26151 3018169689Skan * parser.c (cp_parser_decl_specifier_seq): Check for duplicate 3019169689Skan decl-specifiers. Remove extra check for duplicate 'friend'. 3020169689Skan * decl.c (grokdeclarator): Remove check for duplicate 3021169689Skan decl-specifiers. Set longlong together with long_p. 3022169689Skan 3023169689Skan2006-02-12 Jason Merrill <jason@redhat.com> 3024169689Skan 3025169689Skan PR c++/24996 3026169689Skan * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the 3027169689Skan TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR. 3028169689Skan 3029169689Skan2006-02-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3030169689Skan 3031169689Skan * class.c (debug_class): Remove extern. 3032169689Skan (debug_thunks): Likewise. 3033169689Skan 3034169689Skan2006-02-09 Gabriel Dos Reis <gdr@integrable-solutions.net> 3035169689Skan 3036169689Skan * typeck.c (string_conv_p): Don't test for flag_const_strings. 3037169689Skan 3038169689Skan2006-02-08 Jason Merrill <jason@redhat.com> 3039169689Skan 3040169689Skan PR c++/25979 3041169689Skan * cp-gimplify.c (cp_gimplify_expr): Don't call 3042169689Skan cp_gimplify_init_expr for MODIFY_EXPRs. 3043169689Skan * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR. 3044169689Skan 3045161651Skan2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3046161651Skan 3047169689Skan PR c++/26071 3048169689Skan * decl.c (grokdeclarator): Set dname also for destructor. 3049169689Skan 3050161651Skan PR c++/26070 3051169689Skan * decl.c (grokdeclarator): Clear storage_class together with staticp. 3052161651Skan 3053169689Skan2006-02-07 Gabriel Dos Reis <gdr@integrable-solutions.net> 3054161651Skan 3055169689Skan * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error. 3056169689Skan (cp_build_qualified_type): Propogate renaming. 3057169689Skan * call.c (convert_like_real): Likewise. 3058169689Skan * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise. 3059169689Skan * decl.c (make_typename_type, grokdeclarator): Likewise. 3060169689Skan * pt.c (tsubst_friend_function, instantiate_class_template, 3061169689Skan tsubst_default_argument, instantiate_decl, 3062169689Skan tsubst_initializer_list, tsubst_enum): Likewise. 3063169689Skan * semantics.c (finish_template_type): Likewise. 3064169689Skan * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise. 3065161651Skan 3066169689Skan2006-02-07 Dirk Mueller <dmueller@suse.com> 3067161651Skan 3068169689Skan * typeck.c (build_binary_op): Annotate div-by-zero 3069169689Skan warnings to make -Wno-div-by-zero have an effect. 3070161651Skan 3071169689Skan2006-02-07 Mark Mitchell <mark@codesourcery.com> 3072161651Skan 3073169689Skan PR c++/9737 3074169689Skan * pt.c (coerce_template_template_parms): Do not templates with 3075169689Skan excess default arguments to match template template parameters 3076169689Skan with fewer parameters. 3077169689Skan (coerce_template_parms): Add use_default_args parameter; use 3078169689Skan default arguments only when true. 3079169689Skan (lookup_template_class): Adjust call to coerce_template_parms. 3080169689Skan (fn_type_unification): Likewise. 3081169689Skan (unify): Likewise. 3082169689Skan (get_bindings): Likewise. 3083169689Skan (dependent_type_p): Add assertions. 3084161651Skan 3085169689Skan2006-02-06 Roger Sayle <roger@eyesopen.com> 3086161651Skan 3087169689Skan * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE. 3088169689Skan * rtti.c (typeinfo_in_lib_p): Likewise. 3089169689Skan * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise. 3090169689Skan * name-lookup.c (arg_assoc_type): Likewise. 3091161651Skan 3092169689Skan2006-02-04 Gabriel Dos Reis <gdr@integrable-solutions.net> 3093161651Skan 3094169689Skan * cp-tree.h (tf_warn_or_error): New substituion flag. 3095169689Skan (cp_build_qualified_type): Use it. 3096169689Skan * call.c (convert_like_real): Likewise. 3097169689Skan * cvt.c (cp_convert_to_pointer): Likewise. 3098169689Skan (convert_to_reference): Likewise. 3099169689Skan * decl.c (make_typename_type): Likewise. 3100169689Skan (grokdeclarator): Likewise. 3101169689Skan * pt.c (tsubst_friend_function): Likewise. 3102169689Skan (tsubst_friend_class): Likewise. 3103169689Skan (instantiate_class_template): Likewise. 3104169689Skan (tsubst_default_argument): Likewise. 3105169689Skan (instantiate_decl): Likewise. 3106169689Skan (tsubst_initializer_list): Likewise. 3107169689Skan (tsubst_enum): Likewise. 3108169689Skan * semantics.c (finish_template_type): Likewise. 3109169689Skan * typeck.c (build_ptrmemfunc): Likewise. 3110169689Skan (convert_for_assignment): Likewise. 3111169689Skan 3112169689Skan2006-02-03 Lee Millward <lee.millward@gmail.com> 3113169689Skan 3114169689Skan * typeck.c (string_conv_p): Pass appropiate 3115169689Skan OPT_Wxxxx values when calling warning(). 3116169689Skan (build_array_ref, cxx_mark_addressable): Likewise. 3117169689Skan (check_return_expr): Likewise. 3118169689Skan 3119169689Skan * init.c (perform_member_init): Likewise. 3120169689Skan (sort_mem_initializers, emit_mem_initializers): Likewise. 3121169689Skan 3122169689Skan * class.c (check_field_decls): Likewise. 3123169689Skan (warn_about_ambiguous_bases): Likewise. 3124169689Skan 3125169689Skan * decl.c (pop_label, poplevel): Likewise. 3126169689Skan (duplicate_decls, grok_op_properties): Likewise. 3127169689Skan (start_preparsed_function, finish_function): Likewise. 3128169689Skan 3129169689Skan * name-lookup.c (pushdecl_maybe_friend): Likewise. 3130169689Skan (pushdecl_maybe_friend): Likewise. 3131169689Skan 3132169689Skan * parser.c (cp_parser_warn_min_max): Likewise. 3133169689Skan (cp_parser_cast_expression): Likewise. 3134169689Skan 3135169689Skan * method.c (lazily_declare_fn): Likewise. 3136169689Skan * cvt.c (convert_to_void): Likewise. 3137169689Skan * mangle.c (finish_mangling): Likewise. 3138169689Skan * cp-gimplify.c (gimplify_expr_stmt): Likewise. 3139169689Skan 3140169689Skan2006-02-03 Mark Mitchell <mark@codesourcery.com> 3141169689Skan 3142169689Skan * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P, 3143169689Skan not IDENTIFIER_OPNAME_P. 3144169689Skan 3145169689Skan2006-01-31 Mark Mitchell <mark@codesourcery.com> 3146169689Skan 3147169689Skan PR c++/25342 3148169689Skan * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise 3149169689Skan documentation. 3150169689Skan * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS, 3151169689Skan not TREE_VALUE. 3152169689Skan (instantiate_class_template): Simplify. 3153169689Skan (verify_class_unification): Remove. 3154169689Skan (unify): Document parameters. Use INNERMOST_TEMPLATE_ARGS to 3155169689Skan permit multiple levels of template arguments. 3156169689Skan (more_specialized_class): Simplify. 3157169689Skan (get_class_bindings): Pass full arguments to unify. Fold 3158169689Skan verify_class_unification into this function. Return full 3159169689Skan arguments. 3160169689Skan (most_specialized_class): Adjust for changes to 3161169689Skan get_class_bindings. Issue errors here for ambiguity. Return the 3162169689Skan fully deduced arguments for the most specialized class, in 3163169689Skan addition to the partial specialization. 3164169689Skan 3165169689Skan2006-01-31 Ben Elliston <bje@au.ibm.com> 3166169689Skan 3167169689Skan * mangle.c: Comment fix. 3168169689Skan 3169169689Skan2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net> 3170169689Skan 3171169689Skan * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN. 3172169689Skan * repo.c (extract_string, afgets): Use cast when converting from 3173169689Skan void *. 3174169689Skan 3175169689Skan2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net> 3176169689Skan 3177169689Skan * call.c (alloc_conversion): Use cast when converting from void *. 3178169689Skan (alloc_conversions): Likewise. 3179169689Skan (add_candidate): Likewise. 3180169689Skan (print_z_candidates): Likewise. 3181169689Skan (add_warning): Likewise. 3182169689Skan * pt.c (retrieve_local_specialization): Likewise. 3183169689Skan (process_partial_specialization): Likewise. 3184169689Skan (mangle_class_name_for_template): Likewise. 3185169689Skan (tsubst_template_args): Likewise. 3186169689Skan * typeck2.c (pat_calc_hash): Likewise. 3187169689Skan (pat_compare): Likewise. 3188169689Skan (abstract_virtuals_error): Likewise. 3189169689Skan * class.c (method_name_cmp): Likewise. 3190169689Skan (resort_method_name_cmp): Likewise. 3191169689Skan (get_vfield_name): Likewise. 3192169689Skan * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise. 3193169689Skan * lex.c (init_reswords): Likewise. 3194169689Skan * rtti.c (create_pseudo_type_info): Likewise. 3195169689Skan * search.c (dfs_lookup_base): Likewise. 3196169689Skan (dfs_dcast_hint_pre): Likewise. 3197169689Skan (dfs_dcast_hint_post): Likewise. 3198169689Skan * tree.c (hash_tree_cons): Likewise. 3199169689Skan * repo.c (extract_string): Likewise. 3200169689Skan (afgets): Likewise. 3201169689Skan * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise. 3202169689Skan * g++spec.c (lang_specific_driver): Likewise. 3203169689Skan 3204169689Skan2006-01-28 Gabriel Dos Reis <gdr@integrable-solutions.net> 3205169689Skan 3206169689Skan * call.c (joust): Pass option code to warning. Use inform for 3207169689Skan explanation. 3208169689Skan * class.c (check_bases): Likewise. 3209169689Skan (maybe_warn_about_overly_private_class): Likewise. 3210169689Skan (check_field_decls): Likewise. 3211169689Skan (layout_empty_base): Likewise. 3212169689Skan (layout_virtual_bases): Likewise. 3213169689Skan (layout_class_type): Likewise. 3214169689Skan 3215169689Skan2006-01-28 Mark Mitchell <mark@codesourcery.com> 3216169689Skan 3217169689Skan PR c++/25999 3218169689Skan * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak 3219169689Skan here, not ... 3220169689Skan (start_function): ... here. 3221169689Skan 3222169689Skan2006-01-28 Mark Mitchell <mark@codesourcery.com> 3223169689Skan 3224169689Skan PR c++/25855 3225169689Skan * class.c (resolve_address_of_overloaded_function): Adjust use of 3226169689Skan return value from most_specialized_instantiation. 3227169689Skan * pt.c (determine_specialization): Avoid multiple calls to 3228169689Skan get_bindings. 3229169689Skan (most_specialized_instantiation): When a tie occurs, set the 3230169689Skan current presumed champion to the next template. Return the 3231169689Skan TREE_LIST node containing the template, rather than the template 3232169689Skan itself. 3233169689Skan (most_specialized): Remove. 3234169689Skan * name-lookup.c (push_overloaded_decl): When duplicate_decls 3235169689Skan indicates a failed redeclaration, report that to callers. 3236169689Skan 3237169689Skan2006-01-26 Jason Merrill <jason@redhat.com> 3238169689Skan 3239169689Skan PR c++/16021 3240169689Skan * name-lookup.c (parse_using_directive): Require strong using to 3241169689Skan name a nested namespace. 3242169689Skan 3243169689Skan2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3244169689Skan 3245169689Skan Revert: 3246169689Skan * cp-tree.h (do_poplevel): Remove prototype. 3247169689Skan * semantics.c (do_poplevel): Add prototype. Make static. 3248169689Skan 3249169689Skan Revert: 3250169689Skan * cp-tree.h (default_conversion): Remove prototype. 3251169689Skan * typeck.c (default_conversion): Make static. 3252169689Skan 3253169689Skan2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3254169689Skan 3255169689Skan * cp-tree.h (get_primary_binfo): Remove prototype. 3256169689Skan (push_using_decl): Likewise. 3257169689Skan (current_template_args): Likewise. 3258169689Skan (more_specialized_class): Likewise. 3259169689Skan (mark_class_instantiated): Likewise. 3260169689Skan (default_conversion): Likewise. 3261169689Skan (pfn_from_ptrmemfunc): Likewise. 3262169689Skan * class.c (get_primary_binfo): Add prototype, make static, simplify. 3263169689Skan * name-lookup.c (push_using_decl): Make static. 3264169689Skan * pt.c (current_template_args): Likewise. 3265169689Skan (more_specialized_class): Likewise. 3266169689Skan (mark_class_instantiated): Likewise. 3267169689Skan * typeck.c (default_conversion): Make static. 3268169689Skan (pfn_from_ptrmemfunc): Add prototype, make static. 3269169689Skan 3270169689Skan2006-01-24 Dirk Mueller <dmueller@suse.de> 3271169689Skan 3272169689Skan * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning(). 3273169689Skan 3274161651Skan2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3275161651Skan 3276169689Skan PR c++/25552 3277169689Skan * parser.c (cp_parser_unqualified_id): Check that destructor name 3278169689Skan and scope match. 3279169689Skan * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR. 3280169689Skan Adjust comment. Return early if possible. 3281169689Skan Use same_type_p to compare types. 3282169689Skan * typeck.c (lookup_destructor): Adjust call to check_dtor_name. 3283169689Skan 3284169689Skan2006-01-24 Mark Mitchell <mark@codesourcery.com> 3285169689Skan 3286169689Skan * semantics.c: Remove outdated comment. 3287169689Skan 3288169689Skan2006-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3289169689Skan 3290169689Skan * cp-tree.h (do_poplevel): Remove prototype. 3291169689Skan * semantics.c (do_poplevel): Add prototype. Make static. 3292169689Skan 3293169689Skan * cp-tree.h (original_type): Remove prototype. 3294169689Skan * typeck.c (original_type): Make static. 3295169689Skan 3296169689Skan * cp-tree.h (declare_global_var): Remove prototype. 3297169689Skan * decl.c (declare_global_var): Make static. 3298169689Skan 3299169689Skan * cp-tree.h (implicitly_declare_fn): Remove prototype. 3300169689Skan * method.c (implicitly_declare_fn): Make static. 3301169689Skan 3302169689Skan * cp-tree.h (fold_decl_constant_value): Remove prototype. 3303169689Skan * pt.c (fold_decl_constant_value): Make static. 3304169689Skan 3305169689Skan * cp-tree.h (build_x_delete): Remove prototype. 3306169689Skan * init.c (build_vec_delete_1): Call build_op_delete_call directly 3307169689Skan and not via build_x_delete. 3308169689Skan (build_x_delete): Remove. 3309169689Skan 3310169689Skan * cp-tree.h (get_vtt_name): Remove prototype. 3311169689Skan * class.c (get_vtt_name): Remove. 3312169689Skan (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name. 3313169689Skan 3314169689Skan2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net> 3315169689Skan 3316169689Skan * rtti.c (build_dynamic_cast): Fix comment. 3317169689Skan 3318169689Skan2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net> 3319169689Skan 3320169689Skan PR c++/10891 3321169689Skan * rtti.c (build_dynamic_cast): Reject dynamic_cast use if 3322169689Skan -fno-rtti. 3323169689Skan 3324169689Skan2006-01-21 Mark Mitchell <mark@codesourcery.com> 3325169689Skan 3326169689Skan PR c++/25895 3327169689Skan * class.c (build_base_path): Generate a NOP_EXPR instead of a 3328169689Skan COMPONENT_REF if the base and derived classes are at the same 3329169689Skan address. 3330169689Skan 3331169689Skan PR c++/25856 3332169689Skan * decl.c (begin_destructor_body): Robustify. 3333169689Skan 3334169689Skan PR c++/25858 3335169689Skan * parser.c (cp_parser_direct_declarator): Robustify. 3336169689Skan 3337169689Skan2006-01-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3338169689Skan 3339169689Skan * parser.c (cp_lexer_next_token_is_keyword): Simplify. 3340169689Skan 3341169689Skan * parser.c (clear_decl_specs): Remove prototype. 3342169689Skan 3343169689Skan * parser.c (cp_parser_expression_fn): Remove. 3344169689Skan 3345169689Skan * call.c (add_builtin_candidates): Remove superfluous return. 3346169689Skan * name-lookup.c (do_toplevel_using_decl): Likewise. 3347169689Skan * parser.c (cp_parser_type_specifier_seq): Likewise. 3348169689Skan (cp_parser_save_default_args): Likewise. 3349169689Skan 3350169689Skan2006-01-20 Dirk Mueller <dmueller@suse.com> 3351169689Skan 3352169689Skan PR c++/5520 3353169689Skan * semantics.c (finish_if_stmt): Call empty_body_warning. 3354169689Skan * parser.c (cp_parser_implicitly_scoped_statement): 3355169689Skan Mark empty statement with an empty stmt. 3356169689Skan 3357169689Skan2006-01-19 Mark Mitchell <mark@codesourcery.com> 3358169689Skan 3359169689Skan PR c++/22136 3360169689Skan * name-lookup.c (do_class_using_decl): Don't try to look up base 3361169689Skan classes in templates with dependent base types. 3362169689Skan 3363169689Skan2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3364169689Skan 3365169689Skan PR c++/25854 3366169689Skan * pt.c (maybe_process_partial_specialization): Return early on 3367169689Skan error_mark_node. 3368169689Skan 3369169689Skan2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3370169689Skan 3371161651Skan PR c++/16829 3372161651Skan * decl.c (start_preparsed_function): Check default arguments 3373161651Skan unconditionally. 3374161651Skan * name-lookup.c (pushdecl_maybe_friend): Check default arguments 3375161651Skan of all functions and function templates. 3376161651Skan * parser.c (cp_parser_late_parsing_default_args): Check default 3377161651Skan arguments. 3378161651Skan * decl2.c (check_default_args): Set missing default arguments to 3379161651Skan error_mark_node. 3380161651Skan 3381169689Skan2006-01-18 Mark Mitchell <mark@codesourcery.com> 3382161651Skan 3383169689Skan PR c++/25836 3384169689Skan * cp-tree.h (push_class_stack): New function. 3385169689Skan (pop_class_stack): Likewise. 3386169689Skan * class.c (class_stack_node): Add hidden field. 3387169689Skan (pushclass): Clear it. 3388169689Skan (push_class_stack): New function. 3389169689Skan (pop_class_stack): Likewise. 3390169689Skan (currently_open_class): Ignore hidden classes. 3391169689Skan (currently_open_derived_class): Likewise. 3392169689Skan * name-lookup.c (push_to_top_level): Call push_class_stack. 3393169689Skan (pop_from_top_level): Call pop_class_stack. 3394161651Skan 3395169689Skan2006-01-18 Kazu Hirata <kazu@codesourcery.com> 3396161651Skan 3397169689Skan * tree.c (find_tree_t, find_tree): Remove. 3398169689Skan * cp-tree.h: Remove the prototype for find_tree. 3399161651Skan 3400169689Skan2006-01-18 Jakub Jelinek <jakub@redhat.com> 3401161651Skan 3402169689Skan * search.c (lookup_conversions_r): Fix a pasto. 3403169689Skan 3404169689Skan2006-01-17 Eric Christopher <echristo@apple.com> 3405169689Skan 3406169689Skan * call.c (convert_like_real): When issuing conversion 3407169689Skan warnings, depend on OPT_Wconversion. 3408169689Skan * cvt.c (build_expr_type_conversion): Ditto. 3409169689Skan 3410169689Skan2006-01-17 Kazu Hirata <kazu@codesourcery.com> 3411169689Skan 3412169689Skan * name-lookup.c (lookup_namespace_name): Remove. 3413169689Skan * name-lookup.h: Remove the prototype for 3414169689Skan lookup_namespace_name. 3415169689Skan 3416169689Skan2006-01-17 Jakub Jelinek <jakub@redhat.com> 3417169689Skan 3418169689Skan PR c/25682 3419169689Skan * decl.c (compute_array_index_type): After issuing not an integral 3420169689Skan constant-expression error, set size to 1 to avoid ICEs later on. 3421169689Skan 3422169689Skan2006-01-16 Ian Lance Taylor <ian@airs.com> 3423169689Skan 3424169689Skan * parser.c: Include "cgraph.h". 3425169689Skan (cp_parser_asm_definition): Call cgraph_add_asm_node rather than 3426169689Skan assemble_asm. 3427169689Skan 3428169689Skan2006-01-16 Rafael ���ila de Esp���dola <rafael.espindola@gmail.com> 3429169689Skan 3430169689Skan * g++spec.c (lang_specific_spec_functions): Remove. 3431169689Skan 3432169689Skan2006-01-15 Gabriel Dos Reis <gdr@integrable-solutions.net> 3433169689Skan 3434169689Skan * decl.c (check_initializer): Fix thinko. 3435169689Skan 3436169689Skan2006-01-14 Mark Mitchell <mark@codesourcery.com> 3437169689Skan 3438169689Skan PR c++/25663 3439169689Skan * parser.c (cp_parser_direct_declarator): Use cp_parser_error 3440169689Skan instead of error. 3441169689Skan 3442169689Skan2006-01-13 Jason Merrill <jason@redhat.com> 3443169689Skan 3444169689Skan * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more. 3445169689Skan 3446169689Skan * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT. 3447169689Skan * pt.c (check_explicit_specialization): Likewise. 3448169689Skan 3449169689Skan2006-01-12 Jason Merrill <jason@redhat.com> 3450169689Skan 3451169689Skan PR libstdc++/24660 3452169689Skan * pt.c (check_explicit_specialization): Handle namespace 3453169689Skan association. 3454169689Skan * name-lookup.c (set_decl_namespace): Likewise. 3455169689Skan 3456169689Skan2006-01-12 Nathan Sidwell <nathan@codesourcery.com> 3457169689Skan 3458169689Skan PR c++/24824 3459169689Skan * class.c (handle_using_decl): Pass correct scope to 3460169689Skan cp_emit_debug_info_for_using. 3461169689Skan 3462169689Skan2006-01-11 Nathan Sidwell <nathan@codesourcery.com> 3463169689Skan 3464169689Skan PR c++/25386 3465169689Skan * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects 3466169689Skan packedness. 3467169689Skan 3468169689Skan2006-01-06 Gabriel Dos Reis <gdr@integrablesolutions.net> 3469169689Skan 3470169689Skan * parser.c (cp_parser_primary_expression): Document the grammar 3471169689Skan for the built-in offsetof, a GNU extension. 3472169689Skan 3473169689Skan2006-01-04 Zdenek Dvorak <dvorakz@suse.cz> 3474169689Skan 3475169689Skan PR c++/25632 3476169689Skan * init.c (constant_value_1): Unshare use of DECL_INITIAL. Fix a typo 3477169689Skan in condition. 3478169689Skan 3479169689Skan2006-01-04 Chris Lattner <sabre@gnu.org> 3480169689Skan 3481169689Skan * typeck2.c: update copyright to 2006 3482169689Skan (split_nonconstant_init_1): Set TREE_CONSTANT to true. 3483169689Skan 3484169689Skan2006-01-04 Mark Mitchell <mark@codesourcery.com> 3485169689Skan 3486169689Skan PR c++/24782 3487169689Skan * parser.c (cp_parser_nested_name_specifier_opt): Preserve access 3488169689Skan checks, even when parsing tentatively. 3489169689Skan 3490169689Skan2006-01-04 Richard Henderson <rth@redhat.com> 3491169689Skan 3492169689Skan Merge from gomp branch. 3493169689Skan * lex.c (handle_pragma_java_exceptions): Fix whitespace. 3494169689Skan * parser.c (struct cp_token): Add pragma_kind. 3495169689Skan (eof_token): Update to match. 3496169689Skan (struct cp_lexer): Add in_pragma; rearrange next for better packing. 3497169689Skan (cp_parser_initial_pragma): New. 3498169689Skan (cp_lexer_new_main): Use it. Don't bother clearing 3499169689Skan c_lex_return_raw_strings. 3500169689Skan (cp_lexer_get_preprocessor_token): Always initialize keyword 3501169689Skan and pragma_kind fields. Handle CPP_PRAGMA. 3502169689Skan (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when 3503169689Skan in_pragma is set. 3504169689Skan (cp_lexer_handle_pragma): Remove. Update callers to cp_parser_pragma. 3505169689Skan (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string. 3506169689Skan (cp_parser_skip_to_pragma_eol): New. 3507169689Skan (cp_parser_error): Use it. 3508169689Skan (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL; 3509169689Skan rearrange with switch statement. 3510169689Skan (cp_parser_skip_to_end_of_statement): Likewise. 3511169689Skan (cp_parser_skip_to_end_of_block_or_statement): Likewise. 3512169689Skan (cp_parser_skip_to_closing_brace): Likewise. 3513169689Skan (cp_parser_skip_until_found): Likewise. 3514169689Skan (cp_parser_statement): Add in_compound argument; update callers. 3515169689Skan Use it to decide how to handle pragma parsing. 3516169689Skan (cp_parser_labeled_statement): Add in_compound argument; pass 3517169689Skan it on to cp_parser_statement. 3518169689Skan (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL. 3519169689Skan (cp_parser_declaration_seq_opt): Likewise. 3520169689Skan (cp_parser_parameter_declaration): Likewise. 3521169689Skan (cp_parser_member_specification_opt): Likewise. 3522169689Skan (cp_parser_function_definition_after_decl): Likewise. 3523169689Skan (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs. 3524169689Skan (cp_parser_pragma): New. 3525169689Skan (pragma_lex): New. 3526169689Skan 3527169689Skan2006-01-04 Dirk Mueller <dmueller@suse.com> 3528169689Skan 3529169689Skan * decl.c (finish_constructor_body): create simple 3530169689Skan compound stmt instead of a if(1) { } construct. 3531169689Skan 3532169689Skan2006-01-03 Mark Mitchell <mark@codesourcery.com> 3533169689Skan 3534169689Skan PR c++/25492 3535169689Skan * name-lookup.c (push_class_level_binding): When a derived class 3536169689Skan provides a type binding, eliminate any type binding from a base 3537169689Skan class. 3538169689Skan 3539169689Skan PR c++/25625 3540169689Skan * repo.c (repo_emit_p): Always instantiate static data members 3541169689Skan initialized by constant expressions, so that there values are 3542169689Skan available. 3543169689Skan 3544169689Skan2006-01-02 Mark Mitchell <mark@codesourcery.com> 3545169689Skan 3546169689Skan PR c++/25635 3547169689Skan * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a 3548169689Skan conversion operator. 3549169689Skan * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here. 3550169689Skan 3551169689Skan PR c++/25638 3552169689Skan * class.c (add_method): Never associate more than one destructor 3553169689Skan with a single class. 3554169689Skan 3555169689Skan PR c++/25637 3556169689Skan * cp-tree.h (do_friend): Adjust prototype. 3557169689Skan * decl.c (grokfndecl): Make funcdef_flag a bool, not an int. 3558169689Skan (grokdeclarator): Likewise. Refine check for invalid 3559169689Skan declarations/definitions of member functions outside of their own 3560169689Skan class. 3561169689Skan * friend.c (do_friend): Make funcdef_flag a bool, not an int. 3562169689Skan 3563169689Skan PR c++/25633 3564169689Skan * parser.c (cp_parser_mem_initializer_list): Check result of 3565169689Skan cp_parser_mem_initializer against error_mark_node, not NULL_TREE. 3566169689Skan (cp_parser_mem_initializer): Return error_mark_node for failure. 3567169689Skan 3568169689Skan PR c++/25634 3569169689Skan * parser.c (cp_parser_template_parameter_list): Call 3570169689Skan begin_template_parm_list and end_template_parm_list here. 3571169689Skan (cp_parser_type_parameter): Not here. 3572169689Skan (cp_parser_template_declaration_after_export): Or here. 3573169689Skan (cp_parser_elaborated_type_specifier): Call 3574169689Skan cp_parser_check_template_parameters. 3575169689Skan 3576169689Skan * tree.c (build_target_expr_with_type): Use force_target_expr. 3577169689Skan 3578169689Skan * decl2.c (mark_used): Fix typo in comment. 3579169689Skan 3580169689Skan2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3581169689Skan 3582169689Skan * parser.c (cp_parser_using_declaration): Skip name-lookup on 3583169689Skan invalid scope. 3584169689Skan 3585169689Skan2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net> 3586169689Skan 3587169689Skan * cxx-pretty-print.c (pp_cxx_constant): New. Print 3588169689Skan string-literal in parens if input program says so. 3589169689Skan (pp_cxx_primary_expression): Hand off constant printing to 3590169689Skan pp_cxx_constant. 3591169689Skan (pp_cxx_pretty_printer_init): Set pp->c_base.constant. 3592169689Skan (pp_cxx_expression): Use pp_cxx_constant for literals. 3593169689Skan * error.c (dump_expr): Use pp_constant for literals. 3594169689Skan 3595169689Skan2005-12-29 Nathan Sidwell <nathan@codesourcery.com> 3596169689Skan 3597169689Skan * method.c (make_thunk): Don't set comdat_linkage here. 3598169689Skan (use_thunk): Make thunk one only here, if thunk target is 3599169689Skan DECL_ONE_ONLY. 3600169689Skan 3601169689Skan2005-12-26 Mark Mitchell <mark@codesourcery.com> 3602169689Skan 3603169689Skan PR c++/25439 3604169689Skan * decl.c (grokdeclarator): Remove dead code. 3605169689Skan * ptree.c (cxx_print_xnode): Handle BASELINK. 3606169689Skan * parser.c (make_id_declarator): Add sfk parameter. 3607169689Skan (cp_parser_direct_declarator): Do not pass TYPE_DECLs to 3608169689Skan make_id_declarator. 3609169689Skan (cp_parser_declarator_id): Simplify BASELINKs here. 3610169689Skan (cp_parser_member_declaration): Adjust calls to 3611169689Skan make_id_declarator. 3612169689Skan 3613169689Skan2005-12-26 Mark Mitchell <mark@codesourcery.com> 3614169689Skan 3615169689Skan PR c++/23171, c++/23172, c++/25417. 3616169689Skan * typeck.c (build_unary_op): Create temporary variables for 3617169689Skan compound literals whose addresses are taken. 3618169689Skan * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P. 3619169689Skan * decl.c (reshape_init_vector): Likewise. 3620169689Skan (reshape_init): Give it external linkage. 3621169689Skan (check_initializer): Use COMPOUND_LITERAL_P. 3622169689Skan (initialize_artificial_var): Allow the initializer to be a 3623169689Skan CONSTRUCTOR. 3624169689Skan * call.c (make_temporary_var_for_ref_to_temp): Use 3625169689Skan create_temporary_var. 3626169689Skan * cp-tree.h (COMPOUND_LITERAL_P): New macro. 3627169689Skan (rehape_init): Declare. 3628169689Skan * typeck2.c (digest_init): Use COMPOUND_LITERAL_P. 3629169689Skan * semantics.c (finish_compound_literal): Use reshape_init. 3630169689Skan 3631169689Skan2005-12-23 Mark Mitchell <mark@codesourcery.com> 3632169689Skan 3633169689Skan PR c++/24671 3634169689Skan * pt.c (instantiate_template): Handle SFINAE. 3635169689Skan 3636169689Skan2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3637169689Skan 3638169689Skan * decl.c (grokdeclarator): Improve diagnostic for friend 3639169689Skan declarations of class members. 3640169689Skan 3641169689Skan2005-12-22 Mark Mitchell <mark@codesourcery.com> 3642169689Skan 3643169689Skan PR c++/25369 3644169689Skan * tree.c (really_overloaded_fn): Tweak comment. 3645169689Skan * pt.c (tsubst_call_declarator_parms): Remove. 3646169689Skan (tsubst_copy): Call mark_used on the member referenced by an 3647169689Skan OFFSET_REF. 3648169689Skan * semantics.c (finish_qualified_id_expr): Simplify. 3649169689Skan * decl2.c (mark_used): Accept BASELINKs. 3650169689Skan 3651169689Skan PR c++/25364 3652169689Skan * typeck.c (build_unary_op): Pass DECLs not names to 3653169689Skan build_offset_refs. 3654169689Skan * init.c (build_offset_ref): Do not do name lookup. Do not call 3655169689Skan mark_used. 3656169689Skan * call.c (build_call): Simplify and tidy. 3657169689Skan * semantics.c (finish_qualified_id_expr): Call mark_used. 3658169689Skan 3659169689Skan2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3660169689Skan 3661169689Skan PR c++/23333 3662169689Skan * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to 3663169689Skan identify a single '0'. 3664169689Skan 3665169689Skan2005-12-20 Mark Mitchell <mark@codesourcery.com> 3666169689Skan 3667169689Skan PR c++/21228 3668169689Skan * decl.c (use_eh_spec_block): New function. 3669169689Skan (store_parm_decls): Use it. 3670169689Skan (finish_function): Likewise. 3671169689Skan 3672169689Skan2005-12-19 Mark Mitchell <mark@codesourcery.com> 3673169689Skan 3674169689Skan PR c++/24278 3675169689Skan * init.c (expand_member_init): Print messages about baseclasses 3676169689Skan using %T rather than %D. 3677169689Skan 3678169689Skan PR c++/24915 3679169689Skan * class.c (add_method): Do not treat templates as identical unless 3680169689Skan their return types are the same. 3681169689Skan 3682169689Skan2005-12-12 Mark Mitchell <mark@codesourcery.com> 3683169689Skan 3684169689Skan PR c++/25300 3685169689Skan * tree.c (build_qualified_name): Return error_mark_node for 3686169689Skan erroneous input. 3687169689Skan 3688169689Skan2005-12-10 Mark Mitchell <mark@codesourcery.com> 3689169689Skan 3690169689Skan PR c++/25337 3691169689Skan * pt.c (tsubst_copy_and_build): Permit dependent types for the 3692169689Skan object in a class member access expression. 3693169689Skan 3694169689Skan2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com> 3695169689Skan 3696169689Skan PR java/9861 3697169689Skan * mangle.c (write_bare_function_type): Mangle return type for 3698169689Skan methods of Java classes 3699169689Skan 3700169689Skan2005-12-08 Th���dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 3701169689Skan 3702169689Skan * call.c (build_conditional_expr): Print types in error messages. 3703169689Skan 3704161651Skan2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3705161651Skan 3706169689Skan * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort. 3707161651Skan 3708161651Skan2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3709161651Skan 3710169689Skan * cp-gimplify.c (gimplify_cp_loop): Use fold_build3. 3711161651Skan 3712169689Skan2005-12-07 Rafael ���ila de Esp���dola <rafael.espindola@gmail.com> 3713161651Skan 3714169689Skan * Make-lang.in (c++.all.build, c++.install-normal): Remove. 3715161651Skan 3716169689Skan2005-12-07 Rafael ���ila de Esp���dola <rafael.espindola@gmail.com> 3717161651Skan 3718169689Skan * Make-lang.in: Remove all dependencies on s-gtype. 3719161651Skan 3720169689Skan2005-12-06 Aldy Hernandez <aldyh@redhat.com> 3721161651Skan 3722169689Skan PR C++/24138 3723169689Skan * decl.c (reshape_init_array_1): Handle max_index of -1. 3724161651Skan 3725169689Skan2005-12-06 Roger Sayle <roger@eyesopen.com> 3726161651Skan 3727169689Skan * typeck.c (build_binary_op): Issue warning if either operand of a 3728169689Skan comparison operator is a string literal, except for testing equality 3729169689Skan or inequality against NULL. 3730161651Skan 3731169689Skan2005-12-06 Roger Sayle <roger@eyesopen.com> 3732161651Skan 3733169689Skan PR c++/25263 3734169689Skan * decl.c (compute_array_index_type): Check that itype is an 3735169689Skan INTEGER_CST node before testing/clearing TREE_OVERFLOW. 3736161651Skan 3737169689Skan2005-12-05 Daniel Berlin <dberlin@dberlin.org> 3738161651Skan 3739169689Skan * ptree.c (cxx_print_decl): Update to check for decl_common 3740169689Skan structure. 3741161651Skan 3742169689Skan2005-12-02 Mark Mitchell <mark@codesourcery.com> 3743161651Skan 3744169689Skan PR c++/24173 3745169689Skan * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after 3746169689Skan clobbering newdecl. 3747161651Skan 3748169689Skan2005-12-02 Richard Guenther <rguenther@suse.de> 3749161651Skan 3750169689Skan * semantics.c (simplify_aggr_init_expr): Use buildN instead 3751169689Skan of build. 3752161651Skan 3753169689Skan2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net> 3754161651Skan 3755169689Skan * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of 3756169689Skan ggc_realloc. 3757169689Skan (cp_parser_template_argument_list): Use XRESIZEVEC instead of 3758169689Skan xrealloc. 3759169689Skan * class.c (pushclass): Likewise. 3760169689Skan 3761169689Skan2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net> 3762169689Skan 3763169689Skan * decl2.c (get_priority_info): Use XNEW, not xmalloc. 3764169689Skan * decl.c (push_switch): Likewise. 3765169689Skan * lex.c (handle_pragma_implementation): Likewise. 3766169689Skan * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW, 3767169689Skan not ggc_alloc. 3768169689Skan (cxx_initialize_diagnostics): Use XNEW, not xmalloc. 3769169689Skan * class.c (init_class_processing): Use XNEWVEC, not xmalloc. 3770169689Skan * g++spec.c (lang_specific_driver): Likewise. 3771169689Skan * mangle.c (save_partially_mangled_name): Likewise. 3772169689Skan * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc. 3773169689Skan (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc. 3774169689Skan (cp_parser_sizeof_operand): Likewise. 3775169689Skan * repo.c (open_repo_file, open_repo_file): Likewise. 3776169689Skan 3777169689Skan2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net> 3778169689Skan 3779169689Skan * parser.c (cp_parser_make_typename_type): Call make_typename_type 3780169689Skan with tf_none instead of magic value 0. 3781169689Skan (cp_parser_explicit_instantiation): Call do_type_instantiation 3782169689Skan with tf_error instead of magic value 1. 3783169689Skan (cp_parser_elaborated_type_specifier): Call make_typename_type 3784169689Skan with tf_error instead of magic value 1. 3785169689Skan (cp_parser_class_name): Likewise. 3786169689Skan (cp_parser_lookup_name): Likewise. 3787169689Skan 3788169689Skan2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net> 3789169689Skan 3790169689Skan * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF, 3791169689Skan not RID_MAX. 3792169689Skan 3793169689Skan2005-11-30 Jason Merrill <jason@redhat.com> 3794169689Skan 3795169689Skan PR c++/21123 3796169689Skan * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference 3797169689Skan parms in a thunk. 3798169689Skan 3799169689Skan2005-11-30 Ben Elliston <bje@au.ibm.com> 3800169689Skan 3801169689Skan * typeck.c (build_x_unary_op): Correct spelling in error message. 3802169689Skan 3803169689Skan2005-11-28 Nathan Sidwell <nathan@codesourcery.com> 3804169689Skan 3805169689Skan PR c++/21166 3806169689Skan * class.c (check_field_decls): Only set DECL_PACKED on a field 3807169689Skan when its natural alignment is > BITS_PER_UNIT. 3808169689Skan 3809169689Skan2005-11-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3810169689Skan 3811169689Skan PR c++/24979 3812169689Skan * cp-tree.h (DECL_MAIN_P): Remove duplicate definition. 3813169689Skan 3814169689Skan2005-11-26 Richard Henderson <rth@redhat.com> 3815169689Skan 3816169689Skan * lex.c: Update for pragma_lex rename. 3817169689Skan * parser.c: Likewise. 3818169689Skan 3819169689Skan2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3820169689Skan 3821169689Skan PR c++/9278 3822169689Skan * decl.c (grokparms): Do not allow typedef-names in a '(void)' 3823169689Skan parmlist. 3824169689Skan 3825169689Skan2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3826169689Skan 3827169689Skan * typeck2.c (process_init_constructor_union): Remove check for 3828169689Skan unnamed union members. 3829169689Skan 3830169689Skan2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3831169689Skan 3832169689Skan * name-lookup.c (lookup_name_real): Merge two if's. 3833169689Skan 3834169689Skan2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3835169689Skan 3836169689Skan * pt.c (instantiate_class_template): Clean-up. 3837169689Skan 3838169689Skan2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 3839169689Skan 3840169689Skan * pt.c (template_class_depth_real): Remove. Move functionality to ... 3841169689Skan (template_class_depth): ... here, replacing count_specializations 3842169689Skan with 0. Adjust comment. 3843169689Skan 3844169689Skan2005-11-24 Richard Guenther <rguenther@suse.de> 3845169689Skan Dirk Mueller <dmueller@suse.de> 3846169689Skan 3847169689Skan PR c++/14024 3848169689Skan * typeck.c (build_reinterpret_cast_1): Use 3849169689Skan strict_aliasing_warning. 3850169689Skan 3851169689Skan2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net> 3852169689Skan 3853169689Skan PR c++/24235 3854169689Skan * pt.c (check_instantiated_args): Reword diagnostic message about 3855169689Skan template argument involving local types. 3856169689Skan 3857169689Skan2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net> 3858169689Skan 3859169689Skan PR c++/21667 3860169689Skan * typeck.c (build_array_ref): Avoid code duplicate. Use common 3861169689Skan C/C++ diagnostic function warn_array_subscript_with_type_char. 3862169689Skan 3863169689Skan2005-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net> 3864169689Skan 3865169689Skan PR c++/22238 3866169689Skan * error.c (resolve_virtual_fun_from_obj_type_ref): New. 3867169689Skan (dump_expr): Use it in <case CALL_EXPR>. 3868169689Skan 3869169689Skan2005-11-21 Richard Henderson <rth@redhat.com> 3870169689Skan 3871169689Skan * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch. 3872169689Skan 3873169689Skan * name-lookup.c (lookup_name): Remove prefer_type argument. 3874169689Skan (lookup_name_prefer_type): New. 3875169689Skan * decl.c (lookup_and_check_tag): Use them. 3876169689Skan * pt.c (tsubst_friend_class): Likewise. 3877169689Skan (lookup_template_class): Likewise. 3878169689Skan (tsubst_copy_and_build): Likewise. 3879169689Skan * name-lookup.h (lookup_name_prefer_type): New. 3880169689Skan (lookup_name): Remove declaration. 3881169689Skan 3882169689Skan2005-11-18 Mark Mitchell <mark@codesourcery.com> 3883169689Skan 3884169689Skan PR c++/8355 3885169689Skan * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling 3886169689Skan set_decl_namespace. 3887169689Skan * name-lookup.c (set_decl_namespace): 3888169689Skan 3889169689Skan2005-11-18 Mike Stump <mrs@apple.com> 3890169689Skan 3891169689Skan * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add. 3892169689Skan * name-lookup.c (lookup_name_two): Remove. 3893169689Skan (lookup_name_one): Add. 3894169689Skan * name-lookup.h (lookup_name_two): Remove. 3895169689Skan (lookup_name_one): Add. 3896169689Skan 3897161651Skan2005-11-15 Jason Merrill <jason@redhat.com> 3898161651Skan 3899161651Skan PR c++/24580 3900161651Skan * method.c (locate_copy): Also use skip_artificial_parms here. 3901161651Skan (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking 3902161651Skan for RECORD_TYPE. 3903169689Skan (locate_ctor): Abort if we fail to find a default constructor. 3904161651Skan 3905169689Skan2005-11-15 Mike Stump <mrs@apple.com> 3906161651Skan 3907169689Skan * name-lookup.c (lookup_name_two): Add. 3908169689Skan * name-lookup.h: Likewise. 3909161651Skan 3910169689Skan2005-11-15 Mark Mitchell <mark@codesourcery.com> 3911161651Skan 3912169689Skan PR c++/24667 3913169689Skan * typeck.c (check_for_casting_away_constness): Use the diag_fn. 3914169689Skan (build_const_cast_1): Call it, for C-style casts. 3915161651Skan 3916169689Skan2005-11-14 Mark Mitchell <mark@codesourcery.com> 3917169689Skan 3918169689Skan PR c++/24687 3919169689Skan * pt.c (check_explicit_specialization): Don't check for C linkage. 3920169689Skan (push_template_decl_real): Likewise. 3921169689Skan * parser.c (cp_parser_explicit_specialization): Check here. 3922169689Skan (cp_parser_template_declaration_after_export): And here. 3923169689Skan 3924169689Skan * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword 3925169689Skan field. 3926169689Skan 3927169689Skan2005-11-14 Jason Merrill <jason@redhat.com> 3928169689Skan 3929169689Skan PR c++/24580 3930169689Skan * method.c (locate_ctor): Skip all artificial parms, not just 3931169689Skan 'this'. 3932169689Skan 3933169689Skan2005-11-14 Mark Mitchell <mark@codesourcery.com> 3934169689Skan 3935169689Skan * parser.c (eof_token): Add initializer for ambiguous_p. 3936169689Skan 3937169689Skan2005-11-13 Mark Mitchell <mark@codesourcery.com> 3938169689Skan 3939169689Skan PR c++/24817 3940169689Skan * decl.c (check_redeclaration_exception_specification): New 3941169689Skan function. 3942169689Skan (duplicate_decls): Use it. 3943169689Skan * error.c (fndecl_to_string): Print the template parameter list. 3944169689Skan 3945169689Skan PR c++/20293 3946169689Skan * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes 3947169689Skan for namespaces. 3948169689Skan (pp_cxx_original_namespace_definition): Likewise. 3949169689Skan * name-lookup.c (ambiguous_decl): Don't issue error messages; 3950169689Skan instead return lists of ambiguous candidates. 3951169689Skan (select_decl): Handle ambiguous namespace lookups. 3952169689Skan * parser.c (cp_token): Add ambiguous_p. 3953169689Skan (cp_lexer_get_preprocessor_token): Set it. 3954169689Skan (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages 3955169689Skan when a qualified name uses an invalid scope. 3956169689Skan (cp_parser_primary_expression): Print ambiguous candidates. 3957169689Skan (cp_parser_type_parameter): Adjust comment to reflect new 3958169689Skan parameter name for cp_parser_lookup_name. 3959169689Skan (cp_parser_template_argument): Likewise. 3960169689Skan (cp_parser_elaborated_type_specifier): Likewise. 3961169689Skan (cp_parser_namespace_name): Likewise. 3962169689Skan (cp_parser_class_name): Print ambiguous candidates. 3963169689Skan (cp_parser_lookup_name): Rename ambiguous_p parameter to 3964169689Skan ambiguous_decls. Use it to return a list of ambiguous candiates 3965169689Skan when a lookup is ambiguous. 3966169689Skan (cp_parser_lookup_name_simple): Adjust comment to reflect new 3967169689Skan parameter name for cp_parser_lookup_name. 3968169689Skan 3969169689Skan2005-11-12 Jakub Jelinek <jakub@redhat.com> 3970169689Skan 3971169689Skan PR c++/24780 3972169689Skan * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING 3973169689Skan and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants 3974169689Skan of array type. 3975169689Skan 3976169689Skan PR c++/24761 3977169689Skan * pt.c (tsubst_copy_asm_operands): New function. 3978169689Skan (tsubst_expr) <case ASM_EXPR>: Use it. 3979169689Skan 3980169689Skan2005-11-08 Jakub Jelinek <jakub@redhat.com> 3981169689Skan 3982169689Skan PR c++/19450 3983169689Skan * decl.c (redeclaration_error_message): Issue diagnostics about 3984169689Skan olddecl and newdecl disagreement on __thread property. 3985169689Skan (grokdeclarator): Set DECL_TLS_MODEL on class static variables. 3986169689Skan 3987169689Skan2005-11-08 Jason Merrill <jason@redhat.com> 3988169689Skan 3989169689Skan PR c++/21123 3990169689Skan * method.c (use_thunk): Use build_cplus_new instead of 3991169689Skan force_target_expr. 3992169689Skan 3993169689Skan2005-11-06 Jason Merrill <jason@redhat.com> 3994169689Skan James A. Morrison <phython@gcc.gnu.org> 3995169689Skan 3996169689Skan PR c++/17256 3997169689Skan * decl2.c (cp_finish_file): Fix conditions for undefined warning. 3998169689Skan Set TREE_NO_WARNING instead of TREE_PUBLIC. 3999169689Skan * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid 4000169689Skan a warning on a function we didn't instantiate because of excessive 4001169689Skan recursion. 4002169689Skan 4003169689Skan2005-11-06 Mark Mitchell <mark@codesourcery.com> 4004169689Skan 4005169689Skan * class.c (record_subobject_offsets): Don't record offsets past 4006169689Skan biggest empty class for non-empty base classes. 4007169689Skan (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when 4008169689Skan keeping track of the size of emptyclasses. 4009169689Skan 4010169689Skan PR c++/21308 4011169689Skan * class.c (sizeof_biggest_empty_class): New variable. 4012169689Skan (record_subobject_offsets): Don't record offsets past biggest 4013169689Skan empty class for data members. Replace vbases_p parameter with 4014169689Skan is_data_member parameter. 4015169689Skan (build_base_field): Adjust call. 4016169689Skan (layout_class_type): Likewise. Maintain 4017169689Skan sizeof_biggest_empty_class. 4018169689Skan 4019169689Skan2005-11-05 Kazu Hirata <kazu@codesourcery.com> 4020169689Skan 4021169689Skan * decl2.c, init.c, typeck.c: Fix comment typos. 4022169689Skan 4023169689Skan2005-11-04 Richard Guenther <rguenther@suse.de> 4024169689Skan 4025169689Skan PR c++/22487 4026169689Skan * init.c (build_vec_init): Build comparison of matching 4027169689Skan types. 4028169689Skan 4029169689Skan2005-11-03 Josh Conner <jconner@apple.com> 4030169689Skan 4031169689Skan PR c++/19989 4032169689Skan pt.c (tsubst): Accept zero-length array if tf_error is set 4033169689Skan in complain flags. Change error message for negative- 4034169689Skan length array. 4035169689Skan 4036169689Skan2005-11-04 Joseph S. Myers <joseph@codesourcery.com> 4037169689Skan 4038169689Skan * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list* 4039169689Skan parameter. 4040169689Skan 4041169689Skan2005-11-03 Joseph S. Myers <joseph@codesourcery.com> 4042169689Skan 4043169689Skan PR c++/17964 4044169689Skan * error.c (cp_cpp_error): New function. 4045169689Skan * cp-tree.h (cp_cpp_error): Declare. 4046169689Skan * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic 4047169689Skan and error callback after lexing. 4048169689Skan 4049169689Skan2005-11-03 Mark Mitchell <mark@codesourcery.com> 4050169689Skan 4051169689Skan PR c++/21627 4052169689Skan * pt.c (register_specialization): Update inline flags on clones.y 4053169689Skan 4054169689Skan2005-11-03 Andrew Pinski <pinskia@physics.uc.edu> 4055169689Skan 4056169689Skan PR c++/24582 4057169689Skan * decl.c (declare_local_label): Return 0 for variables 4058169689Skan with error_mark_node as their types. 4059169689Skan 4060169689Skan2005-11-02 Mark Mitchell <mark@codesourcery.com> 4061169689Skan 4062169689Skan PR c++/22434 4063169689Skan * call.c (build_conditional_expr): Do bad conversions, if there's 4064169689Skan no other choice. 4065169689Skan 4066169689Skan PR c++/24560 4067169689Skan * parser.c (cp_parser_postfix_dot_deref_expression): Improve error 4068169689Skan message for use of overloaded functions on LHS of "." operator. 4069169689Skan 4070161651Skan PR c++/19253 4071161651Skan * parser.c (cp_parser_postfix_expression): Use 4072161651Skan cp_parser_elaborated_type_specifier to handle typename-types in 4073161651Skan functional casts. 4074161651Skan (cp_parser_enclosed_argument_list): Skip ahead to the end of the 4075161651Skan template argument list if the closing ">" is not found. 4076161651Skan 4077169689Skan PR c++/24569 4078169689Skan * pt.c (instantiate_decl): Use cp_finish_decl, not 4079169689Skan finish_static_data_member_decl. 4080161651Skan 4081169689Skan2005-10-28 Andrew Pinski <pinskia@physics.uc.edu> 4082161651Skan 4083169689Skan * decl.c (grokfndecl): Remove the setting 4084169689Skan of the return type of the function type 4085169689Skan of main after erroring about must returning 4086169689Skan int. 4087169689Skan 4088169689Skan2005-10-28 Andrew Pinski <pinskia@physics.uc.edu> 4089169689Skan 4090169689Skan PR C++/23229 4091169689Skan * decl.c (grokfndecl): Create a new function type 4092169689Skan after erroring out about main not returning int. 4093169689Skan 4094161651Skan2005-10-28 Josh Conner <jconner@apple.com> 4095161651Skan 4096161651Skan PR c++/22153 4097161651Skan * parser.c (cp_parser_member_declaration): Detect and handle 4098161651Skan a template specialization. 4099161651Skan 4100169689Skan2005-10-28 Andrew Pinski <pinskia@physics.uc.edu> 4101161651Skan 4102169689Skan PR C++/23426 4103169689Skan * decl.c (start_decl): Check that the decl is an 4104169689Skan error_mark_node before getting the type. 4105169689Skan Remove the check for the decl's type being an 4106169689Skan error_mark_node. 4107161651Skan 4108169689Skan2005-10-21 Mark Mitchell <mark@codesourcery.com> 4109169689Skan 4110169689Skan PR c++/24260 4111169689Skan * parser.c (cp_parser_init_declarator): Pass attributes to 4112169689Skan grokfield. 4113169689Skan 4114169689Skan2005-10-20 Mark Mitchell <mark@codesourcery.com> 4115169689Skan 4116169689Skan PR c++/22618 4117169689Skan * search.c (accessible_p): Check access in the outermost set of 4118169689Skan template parameters. 4119169689Skan 4120169689Skan2005-10-20 Richard Guenther <rguenther@suse.de> 4121169689Skan 4122169689Skan * decl.c (grokdeclarator): Fix ambiguous pedwarn message. 4123169689Skan 4124169689Skan2005-10-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4125169689Skan 4126169689Skan PR c++/22293 4127169689Skan * decl.c (grokdeclarator): Reject unqualified destructors in 4128169689Skan friend declarations. 4129169689Skan 4130169689Skan2005-10-18 Mark Mitchell <mark@codesourcery.com> 4131169689Skan 4132169689Skan PR c++/23293 4133169689Skan * pt.c (convert_template_argument): Use canonical type variants in 4134169689Skan template specializations. 4135169689Skan 4136169689Skan2005-10-18 Nathan Sidwell <nathan@codesourcery.com> 4137169689Skan 4138169689Skan PR c++/21383 4139169689Skan * name-lookup.c (arg_assoc): Template args can be null in a 4140169689Skan template-id-expr. 4141169689Skan 4142169689Skan PR c++/22604 4143169689Skan * class.c (update_vtable_entry_for_fn): Don't process invalid 4144169689Skan covariant overriders. 4145169689Skan 4146169689Skan PR c++/23118 4147169689Skan * cp-tree.h (add_method): Add return value. 4148169689Skan * class.c (add_method): Return success indicator. 4149169689Skan * semantics.c (finish_member_declaration): Don't add an invalid 4150169689Skan method to the method list. 4151169689Skan 4152169689Skan2005-10-17 Mark Mitchell <mark@codesourcery.com> 4153169689Skan 4154169689Skan PR c++/21908 4155169689Skan * call.c (build_new_method_call): Do not show VTT parameters to 4156169689Skan the user. 4157169689Skan 4158169689Skan2005-10-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4159169689Skan 4160169689Skan PR c++/23440 4161169689Skan * parser.c (cp_parser_statement): If the parser reached CPP_EOF, 4162169689Skan only complain about missing statement. 4163169689Skan 4164169689Skan2005-10-17 Nathan Sidwell <nathan@codesourcery.com> 4165169689Skan 4166169689Skan PR c++/24386 4167169689Skan * cp-tree.h (BASELINK_QUALIFIED_P): New. 4168169689Skan * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it. 4169169689Skan * typeck.c (finish_class_member_access_expr): Set it. 4170169689Skan 4171169689Skan PR c++/21353 4172169689Skan * decl.c (check_default_argument): Don't check 4173169689Skan processing_template_decl or uses_template_parms here. 4174169689Skan (grokparms): Only call check_default_argument when not processing 4175169689Skan a template decl. 4176169689Skan * parser.c (cp_parser_late_parsing_default_arg): Call 4177169689Skan check_default_argument when not processing a template decl. 4178169689Skan 4179169689Skan2005-10-16 Mark Mitchell <mark@codesourcery.com> 4180169689Skan 4181169689Skan PR c++/24389 4182169689Skan * decl2.c (mark_used): Use uses_template_parms instead of 4183169689Skan dependent_type_p. 4184169689Skan * init.c (constant_value_1): Handle uninstantiated templates 4185169689Skan specially. 4186169689Skan * pt.c (instantiate_decl): Add sanity check. 4187169689Skan 4188169689Skan2005-10-16 Mark Mitchell <mark@codesourcery.com> 4189169689Skan 4190169689Skan PR c++/22173 4191169689Skan * typeck.c (check_template_keyword): Fix thinko. 4192169689Skan 4193169689Skan2005-10-16 Andrew Pinski <pinskia@physics.uc.edu> 4194169689Skan 4195169689Skan PR c++/23959 4196169689Skan * decl.c (pop_switch): Only call c_do_switch_warnings 4197169689Skan when not processing templates. 4198169689Skan 4199169689Skan2005-10-16 Mark Mitchell <mark@codesourcery.com> 4200169689Skan 4201169689Skan PR c++/22173 4202169689Skan * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro. 4203169689Skan (check_template_keyword): New function. 4204169689Skan (finish_id_expression): Change prototoype. 4205169689Skan (finish_qualified_id_expr): Change prototype. 4206169689Skan (build_qualified_name): New function. 4207169689Skan (finish_class_member_access_expr): Change prototype. 4208169689Skan * init.c (build_offset_ref): Use build_qualified_name. 4209169689Skan * mangle.c (write_expression): Likewise. 4210169689Skan * parser.c (cp_parser_primary_expression): Remove qualifying_class 4211169689Skan parameter. Add address_p and template_arg_p. Use 4212169689Skan build_qualified_name. 4213169689Skan (cp_parser_id_expression): Default *template_p to 4214169689Skan template_keyword_p. Check for invalid uses of the template 4215169689Skan keyword. 4216169689Skan (cp_parser_postfix_expression): Eliminate special handling for 4217169689Skan qualified names. Adjust call to cp_parser_primary_expression. 4218169689Skan (cp_parser_postfix_dot_deref_expression): Adjust call to 4219169689Skan cp_parser_id_expression and finish_class_member_access_expr. 4220169689Skan (cp_parser_template_argument_list): Add comment. 4221169689Skan (cp_parser_template_argument): Adjust use of 4222169689Skan cp_parser_primary_expression. Remove call to 4223169689Skan finish_qualified_id_expr. 4224169689Skan (cp_parser_lookup_name): Use build_qualified_name. 4225169689Skan * pt.c (tsubst): Use build_qualified_name. 4226169689Skan (tsubst_qualified_id): Likewise. Adjust call to 4227169689Skan finish_qualified_id_expr. 4228169689Skan (tsubst_copy): Use build_qualified_name. 4229169689Skan (tsubst_copy_and_build): Adjusts call to finish_id_expression and 4230169689Skan finish_class_member_access_expr. 4231169689Skan * semantics.c (finish_non_static_data_member): Use 4232169689Skan build_qualified_name. 4233169689Skan (finish_qualified_id_expr): Add template_p and template_arg_p 4234169689Skan parameters. 4235169689Skan (finish_id_expression): Remove qualifiying_class parameter. Add 4236169689Skan template_p, done, address_p, and template_arg_p. Use 4237169689Skan build_qualified_name. Adjust calls to 4238169689Skan finish_class_member_acess_expr. 4239169689Skan * tree.c (build_qualified_name): New function. 4240169689Skan * typeck.c (check_template_keyword): New function. 4241169689Skan (finish_class_member_access_expr): Add template_p argument. Check 4242169689Skan for invalid uses of the template keyword. 4243169689Skan 4244169689Skan2005-10-15 Mark Mitchell <mark@codesourcery.com> 4245169689Skan 4246169689Skan PR c++/21347 4247169689Skan * class.c (maybe_warn_about_overly_private_class): Lazy 4248169689Skan constructors are public. 4249169689Skan 4250169689Skan2005-10-14 Mark Mitchell <mark@codesourcery.com> 4251169689Skan 4252169689Skan PR c++/19565 4253169689Skan * call.c (convert_like_real): Rely on convert_and_check to issue 4254169689Skan warnings about overflow and conversion to unsigned. 4255169689Skan * decl.c (finish_enum): Use the location of the enumerators, not 4256169689Skan the closing brace of the enumeration, when reporting warnings 4257169689Skan about conversions. 4258169689Skan (build_enumerator): Use error_mark_node for erroneous values. 4259169689Skan * typeck2.c (digest_init): Remove reference to "signature pointer" 4260169689Skan from comment. 4261169689Skan 4262169689Skan2005-10-14 Nathan Sidwell <nathan@codesourcery.com> 4263169689Skan 4264169689Skan PR c++/17796 4265169689Skan * optimize.c (update_cloned_parm): Add FIRST parameter. Use it. 4266169689Skan (maybe_clone_body): Track the first clone. 4267169689Skan 4268169689Skan2005-10-13 Nathan Sidwell <nathan@codesourcery.com> 4269169689Skan 4270169689Skan PR c++/23984 4271169689Skan * class.c (build_base_path): The vtable is always the first thing 4272169689Skan in the vtt. 4273169689Skan 4274169689Skan2005-10-13 Mark Mitchell <mark@codesourcery.com> 4275169689Skan 4276169689Skan PR c++/20721 4277169689Skan * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro. 4278169689Skan * decl.c (duplicate_decls): Merge it into new declarations. 4279169689Skan (decl_jump_unsafe): Use it, rather than DECL_INITIAL. 4280169689Skan (cp_finish_decl): Set it, when appropriate. 4281169689Skan 4282169689Skan PR c++/22180 4283169689Skan * call.c (build_new_method_call): Correct pretty-printing of 4284169689Skan destructor names. 4285169689Skan * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an 4286169689Skan identifier. 4287169689Skan 4288169689Skan PR c++/23694 4289169689Skan * decl.c (start_method): Return error_mark_node for errors. 4290169689Skan 4291169689Skan PR c++/23307 4292169689Skan * pt.c (push_template_decl_real): Complain about attempts to 4293169689Skan declare template variables. 4294169689Skan 4295169689Skan PR c++/22352 4296169689Skan * pt.c (tsubst_template_parms): Set processing_template_decl while 4297169689Skan processing the parameters. 4298169689Skan (tsubst_decl): Set processing_template_decl when substituting into 4299169689Skan a TEMPLATE_DECL. 4300169689Skan 4301169689Skan PR c++/22405 4302169689Skan * pt.c (most_specialized_instantiation): Robustify. 4303169689Skan 4304169689Skan PR c++/22464 4305169689Skan * semantics.c (finish_id_expression): Issue errors about uses of 4306169689Skan local variables in containing functions even in templates. 4307169689Skan 4308169689Skan2005-10-12 Danny Smith <dannysmith@users.sourceforge.net> 4309169689Skan 4310169689Skan PR target/21801 4311169689Skan PR target/23589 4312169689Skan * class.c (finish_struct_1): Call 4313169689Skan targetm.cxx.adjust_class_at_definition. 4314169689Skan 4315169689Skan 4316169689Skan2005-10-12 Nathan Sidwell <nathan@codesourcery.com> 4317169689Skan 4318169689Skan PR c++/21592 4319169689Skan * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF 4320169689Skan with already looked up member functions. Assert we're not 4321169689Skan returning a NON_DEPENDENT_EXPR with unknown type. 4322169689Skan * typeck.c (finish_class_member_access_expr): We can get 4323169689Skan non-template-id-expr baselinks. If the lookup finds a baselink, 4324169689Skan remember it even inside templates. 4325169689Skan 4326169689Skan PR c++/23797 4327169689Skan * parser.c (cp_parser_functional_cast): Cope when TYPE is not a 4328169689Skan TYPE_DECL. Use dependent_type_p to check type. 4329169689Skan * pt.c (uses_template_parms_p): Use dependent_type_p for a 4330169689Skan TYPE_DECL. 4331169689Skan (type_dependent_expression_p): Assert we've not been given a 4332169689Skan TYPE_DECL. 4333169689Skan 4334169689Skan PR c++/21117 4335169689Skan * decl.c (check_function_type): Correctly overwrite incomplete 4336169689Skan return type with void type. 4337169689Skan * typeck.c (check_return_expr): If the function's return type is 4338169689Skan void, don't try and convert a return expr. 4339169689Skan 4340169689Skan2005-10-12 David Edelsohn <edelsohn@gnu.org> 4341169689Skan 4342169689Skan PR c++/23730 4343169689Skan * call.c (build_object_call): If BINFO is NULL, bypass 4344169689Skan lookup_fnfields and set fns to NULL_TREE. 4345169689Skan 4346161651Skan2005-10-12 Paolo Bonzini <bonzini@gnu.org> 4347161651Skan 4348161651Skan PR c++/24052 4349161651Skan * error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print 4350161651Skan an ADDR_EXPR of a LABEL_DECL as &&. 4351161651Skan 4352169689Skan2005-10-12 Nathan Sidwell <nathan@codesourcery.com> 4353161651Skan 4354169689Skan PR c++/19964 4355169689Skan * class.c (walk_subobject_offsets): Don't walk error_mark_node. 4356161651Skan 4357169689Skan2005-10-11 Ian Lance Taylor <ian@airs.com> 4358161651Skan 4359169689Skan PR c++/8057 4360169689Skan * cvt.c (convert_to_void): Don't warn about unused values when 4361169689Skan processing a template declaration. 4362161651Skan 4363169689Skan2005-10-11 Mark Mitchell <mark@codesourcery.com> 4364169689Skan 4365169689Skan PR c++/21089 4366169689Skan * call.c (convert_like_real): Use decl_constant_value, not 4367169689Skan integral_constant_value. 4368169689Skan * init.c (constant_value_1): New function. 4369169689Skan (integral_constant_value): Use it. 4370169689Skan (decl_constant_value): Likewise. 4371169689Skan * typeck.c (decay_conversion): Use decl_constant_value, not 4372169689Skan integral_constant_value. 4373169689Skan 4374169689Skan PR c++/21369 4375169689Skan * parser.c (cp_parser_elaborated_type_specifier): Don't treat 4376169689Skan class types as templates if the type is not appearing as part of a 4377169689Skan type definition or declaration. 4378169689Skan 4379169689Skan2005-10-10 Mark Mitchell <mark@codesourcery.com> 4380169689Skan 4381169689Skan PR c++/24277 4382169689Skan * pt.c (instantiate_decl): Call finish_static_data_member_decl for 4383169689Skan static data members. 4384169689Skan 4385169689Skan2005-10-10 Giovanni Bajo <giovannibajo@gcc.gnu.org> 4386169689Skan Mark Mitchell <mark@codesourcery.com> 4387169689Skan 4388169689Skan PR c++/23437 4389169689Skan * parser.c (cp_parser_template_argument_list): Do not treat 4390169689Skan contents of argument list as part of a constant expression. 4391169689Skan 4392169689Skan2005-10-10 Mark Mitchell <mark@codesourcery.com> 4393169689Skan 4394169689Skan PR c++/24139 4395169689Skan * decl.c (grokdeclarator): Do not require template parameter lists 4396169689Skan for explicitly specialized class. 4397169689Skan * error.c (dump_aggr_type): Do not dump template arguments for 4398169689Skan non-primary specializations. 4399169689Skan (dump_function_name): Likewise. 4400169689Skan 4401169689Skan PR c++/24275 4402169689Skan * pt.c (instantiate_decl): Instantiate the initializer of 4403169689Skan a static data member in the namespace containing the class 4404169689Skan containing the static data member. 4405169689Skan 4406169689Skan2005-10-08 James A. Morrison <phython@gcc.gnu.org> 4407169689Skan 4408169689Skan PR c++/22172 4409169689Skan * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype 4410169689Skan scopes as nondependent. 4411169689Skan 4412161651Skan2005-10-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4413161651Skan 4414161651Skan * call.c (resolve_args): Remove redundant test. 4415161651Skan 4416169689Skan2005-10-05 Paolo Bonzini <bonzini@gnu.org> 4417169689Skan 4418169689Skan PR tree-optimization/21419 4419169689Skan PR tree-optimization/24146 4420169689Skan PR tree-optimization/24151 4421169689Skan 4422169689Skan * semantics.c (finish_asm_stmt): Call readonly_error if outputs are 4423169689Skan read-only. Set ASM_VOLATILE_P for asms without outputs. 4424169689Skan 4425169689Skan2005-10-05 Nathan Sidwell <nathan@codesourcery.com> 4426169689Skan 4427169689Skan PR c++/23513 4428169689Skan * call.c (joust): Adjust length count to more_specialized_fn. 4429169689Skan * pt.c (more_specialized_fn): Cope with non-static member vs 4430169689Skan non-member. 4431169689Skan 4432169689Skan2005-10-04 Andrew Pinski <pinskia@physics.uc.edu> 4433169689Skan 4434169689Skan PR middle-end/23125 4435169689Skan * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name 4436169689Skan instead of change_decl_assembler_name. 4437169689Skan 4438169689Skan2005-10-03 Alexandre Oliva <aoliva@redhat.com> 4439169689Skan 4440169689Skan * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message. 4441169689Skan 4442169689Skan2005-10-03 Mark Mitchell <mark@codesourcery.com> 4443169689Skan 4444169689Skan PR c++/17775 4445169689Skan * repo.c: Include flags.h. 4446169689Skan (finish_repo): Add -frandom-seed to the arguments. 4447169689Skan 4448169689Skan2005-10-02 Mark Mitchell <mark@codesourcery.com> 4449169689Skan 4450169689Skan PR c++/22621 4451169689Skan * parser.c (cp_parser_template_argument): Don't turn "T::f" into 4452169689Skan "(*this).T::f". 4453169689Skan * pt.c (convert_nontype_argument): Remove ??? comment. 4454169689Skan 4455169689Skan PR c++/23840 4456169689Skan * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue, 4457169689Skan when class rvalues are lvalues. 4458169689Skan 4459169689Skan2005-09-28 Mark Mitchell <mark@codesourcery.com> 4460169689Skan 4461169689Skan PR c++/16782 4462169689Skan * decl.c (grokdeclarator): Always pedwarn about overqualified 4463169689Skan member names. 4464169689Skan 4465169689Skan2005-09-27 Mark Mitchell <mark@codesourcery.com> 4466169689Skan 4467169689Skan PR c++/22147 4468169689Skan * name-lookup.c (maybe_process_template_type_declaration): Don't 4469169689Skan treat forward declarations of classes as templates just because 4470169689Skan we're processing_template_decl. 4471169689Skan * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend 4472169689Skan functions. 4473169689Skan 4474169689Skan2005-09-26 Jason Merrill <jason@redhat.com> 4475169689Skan 4476169689Skan PR c++/13764 4477169689Skan * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro. 4478169689Skan * name-lookup.c (pushdecl_maybe_friend): Check it. 4479169689Skan * decl.c (begin_function_body): Do nothing if it's false. 4480169689Skan (finish_function_body): Ditto. 4481169689Skan (outer_curly_brace_block): New fn. 4482169689Skan (finish_function): Use it. 4483169689Skan 4484169689Skan2005-09-26 Richard Guenther <rguenther@suse.de> 4485169689Skan 4486169689Skan PR middle-end/15855 4487169689Skan * decl2.c (do_static_destruction): Remove. 4488169689Skan (finish_static_initialization_or_destruction): Likewise. 4489169689Skan (DECL_EFFECTIVE_INIT_PRIORITY): New macro. 4490169689Skan (NEEDS_GUARD_P): Likewise. 4491169689Skan (do_static_initialization): Rename to 4492169689Skan do_static_initialization_or_destruction. Process all 4493169689Skan initializers/destructors and handle common conditionalizing. 4494169689Skan (start_static_initialization_or_destruction): Rename to 4495169689Skan one_static_initialization_or_destruction. Handle only 4496169689Skan decl-specific conditionalizing. 4497169689Skan (cp_finish_file): Call do_static_initialization_or_destruction. 4498169689Skan 4499169689Skan2005-09-22 Jakub Jelinek <jakub@redhat.com> 4500169689Skan 4501169689Skan PR c++/21983 4502169689Skan * class.c (find_final_overrider): Move diagnostic about no unique final 4503169689Skan overrider to... 4504169689Skan (update_vtable_entry_for_fn): ... here. 4505169689Skan 4506169689Skan2005-09-21 Mark Mitchell <mark@codesourcery.com> 4507169689Skan 4508169689Skan PR c++/23993 4509169689Skan * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P. 4510169689Skan 4511161651Skan2005-09-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4512161651Skan 4513161651Skan PR c++/23965 4514161651Skan * call.c (resolve_args): Return error_mark_node on arguments 4515161651Skan whose TREE_TYPE is error_mark_node. 4516161651Skan 4517169689Skan2005-09-20 Jakub Jelinek <jakub@redhat.com> 4518161651Skan 4519169689Skan PR c++/23947 4520169689Skan * rtti.c (get_pseudo_ti_init): Recompute ti pointer after 4521169689Skan get_tinfo_ptr calls. 4522161651Skan 4523169689Skan2005-09-16 Mark Mitchell <mark@codesourcery.com> 4524161651Skan 4525169689Skan PR c++/23914 4526169689Skan * parser.c (cp_parser_enclosed_template_argument_list): Make sure 4527169689Skan skip_evaluation is false when processing template arguments. 4528161651Skan 4529169689Skan PR c++/21514 4530169689Skan * pt.c (check_instantiated_args): Treat uses of anonymous types as 4531169689Skan causing type-deduction failure. 4532161651Skan 4533169689Skan2005-09-15 Jason Merrill <jason@redhat.com> 4534161651Skan 4535169689Skan PR c++/23357 4536169689Skan * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to 4537169689Skan tcc_expression. 4538161651Skan 4539169689Skan2005-09-15 Mark Mitchell <mark@codesourcery.com> 4540161651Skan 4541169689Skan PR c++/23896 4542169689Skan * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when 4543169689Skan processing template arguments. 4544161651Skan 4545169689Skan * pt.c (check_explicit_instantiation_namespace): Fix typo. 4546161651Skan 4547169689Skan PR c++/13140 4548169689Skan * decl.c (check_class_member_definition_namespace): New function. 4549169689Skan (grokfndecl): Use it. 4550169689Skan (grokvardecl): Likewise. 4551169689Skan (grokdecl): Improve documentation. 4552169689Skan * pt.c (check_explicit_instantiation_namespace): New function. 4553169689Skan (register_specialization): Call check_specialization_namespace 4554169689Skan when replacing an implicitly instantiated function. 4555169689Skan (check_explicit_specialization): Ensure that DECL_CONTEXT is set 4556169689Skan correctly for namespace-scope specializations. 4557169689Skan (do_decl_instantiation): Use 4558169689Skan check_explicit_instantiation_namespace. 4559169689Skan (do_type_instantiation): Likewise. 4560161651Skan 4561169689Skan2005-09-15 Nathan Sidwell <nathan@codesourcery.com> 4562161651Skan 4563169689Skan PR c++/23725 4564169689Skan * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE. 4565161651Skan 4566169689Skan2005-09-13 Bastian Blank <waldi@debian.org> 4567161651Skan 4568169689Skan PR c++/16171 4569169689Skan * mangle.c (find_substitution): Do not use special substitutions 4570169689Skan for identifiers not in std::. 4571161651Skan 4572169689Skan2005-09-13 Mark Mitchell <mark@codesourcery.com> 4573161651Skan 4574169689Skan PR c++/23839 4575169689Skan * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER 4576169689Skan for VAR_DECLs. 4577161651Skan 4578169689Skan2005-09-13 Mark Mitchell <mark@codesourcery.com> 4579161651Skan 4580169689Skan PR c++/23842 4581169689Skan * pt.c (tsubst_default_argument): Do treat default argument 4582169689Skan expressions as occurring in the context of the function called. 4583161651Skan 4584169689Skan2005-09-12 Mark Mitchell <mark@codesourcery.com> 4585161651Skan 4586169689Skan PR c++/23841 4587169689Skan * parser.c (cp_parser_primary_expression): Recognize the closing 4588169689Skan ">" of a template-argument-list after a floating-point literal as 4589169689Skan the end of a cast expression. 4590161651Skan 4591169689Skan2005-09-12 Mark Mitchell <mark@codesourcery.com> 4592161651Skan 4593169689Skan PR c++/23789 4594169689Skan * cvt.c (perform_qualification_conversions): Don't create 4595169689Skan unnecessary NOP_EXPRs. 4596169689Skan * pt.c (tsubst_template_arg): Use fold_non_dependent_expr. 4597161651Skan 4598169689Skan2005-09-12 Ian Lance Taylor <ian@airs.com> 4599161651Skan 4600169689Skan PR g++/7874 4601169689Skan * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p 4602169689Skan bitfield. Make dummy bitfield one bit smaller. 4603169689Skan (DECL_HIDDEN_FRIEND_P): Define. 4604169689Skan (pushdecl_maybe_friend): Declare. 4605169689Skan (pushdecl_top_level_maybe_friend): Declare. 4606169689Skan * decl.c (duplicate_decls): Add newdecl_is_friend parameter. 4607169689Skan Change prototype and all callers. Add assertion that a 4608169689Skan DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P. Set 4609169689Skan DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if 4610169689Skan appropriate. 4611169689Skan * name-lookup.c (supplement_binding): Don't ignore a 4612169689Skan DECL_HIDDEN_FRIEND_P. 4613169689Skan (pushdecl_maybe_friend): Break out contents of pushdecl. Add 4614169689Skan is_friend parameter. Set DECL_ANTICIPATED and 4615169689Skan DECL_HIDDEN_FRIEND_P for a friend function. 4616169689Skan (pushdecl): Just call pushdecl_maybe_friend. 4617169689Skan (pushdecl_with_scope): Add is_friend parameter. Change prototype 4618169689Skan and all callers. 4619169689Skan (pushdecl_namespace_level): Likewise. 4620169689Skan (push_overloaded_decl): Likewise. Check DECL_HIDDEN_FRIEND_P as 4621169689Skan well as DECL_ANTICIPATED when checking for a builtin. 4622169689Skan (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as 4623169689Skan DECL_ANTICIPATED when checking for a builtin. 4624169689Skan (do_nonmember_using_decl): Likewise. 4625169689Skan (pushdecl_top_level_1): Add is_friend parameter. Change all 4626169689Skan callers. 4627169689Skan (pushdecl_top_level_maybe_friend): New function. 4628169689Skan (remove_hidden_names): New function. 4629169689Skan (struct arg_lookup): Add args field. 4630169689Skan (friend_of_associated_class_p): New static function. 4631169689Skan (arg_assoc_namespace): Ignore hidden functions which are not 4632169689Skan friends of an associated class of some argument. 4633169689Skan (lookup_arg_dependent): Remove hidden functions from list passed 4634169689Skan in. Initialize k.args. 4635169689Skan * name-lookup.h (remove_hidden_names): Declare. 4636169689Skan * friend.c (do_friend): Call pushdecl_maybe_friend instead of 4637169689Skan pushdecl. 4638169689Skan * call.c (add_function_candidate): Change DECL_ANTICIPATED test to 4639169689Skan an assertion, with a check for DECL_HIDDEN_FRIEND_P. 4640169689Skan (build_new_function_call): Add koenig_p parameter. Change 4641169689Skan prototype and callers. 4642169689Skan * pt.c (register_specialization): Add is_friend parameter. Change 4643169689Skan all callers. 4644169689Skan (push_template_decl_real): Change is_friend parameter to bool. 4645169689Skan Change prototype and all callers. 4646169689Skan (tsubst_friend_class): Call pushdecl_top_level_maybe_friend 4647169689Skan instead of pushdecl_top_level. 4648161651Skan 4649169689Skan2005-09-11 Richard Henderson <rth@redhat.com> 4650161651Skan 4651169689Skan * decl2.c (build_anon_union_vars): Copy attributes from the base addr. 4652169689Skan * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR. 4653161651Skan 4654169689Skan2005-09-09 Gabriel Dos Reis <gdr@integrable-solutions.net> 4655161651Skan 4656169689Skan * parser.c (cp_parser_translation_unit): Simplify. The while-block 4657169689Skan was actually executed at most once. 4658161651Skan 4659169689Skan2005-09-09 Richard Henderson <rth@redhat.com> 4660161651Skan 4661169689Skan PR debug/20998 4662169689Skan * cp-tree.def (ALIAS_DECL): Remove. 4663169689Skan * cp-lang.c (cp_init_ts): Remove support for it. 4664169689Skan * error.c (dump_decl): Likewise. 4665169689Skan * name-lookup.c (pushdecl): Likewise. 4666169689Skan * semantics.c (finish_id_expression): Likewise. 4667169689Skan * decl2.c (build_anon_union_vars): Use a VAR_DECL with 4668169689Skan DECL_VALUE_EXPR instead. 4669161651Skan 4670169689Skan2005-09-09 Mark Mitchell <mark@codesourcery.com> 4671161651Skan 4672169689Skan PR c++/22252 4673169689Skan * decl.c (start_preparsed_function): Do not pay attention to 4674169689Skan #pragma interface for implicitly-defined methods. 4675169689Skan * decl2.c (cp_finish_file): Do not complain about uses of inline 4676169689Skan functions that have bodies, even if we decided not to emit the 4677169689Skan body in this translation unit. 4678169689Skan * semantics.c (note_decl_for_pch): Do not mess with linkage. 4679169689Skan (expand_or_defer_fn): Make inline, non-template functions COMDAT 4680169689Skan at this point. 4681161651Skan 4682169689Skan2005-09-08 Richard Henderson <rth@redhat.com> 4683161651Skan 4684169689Skan PR debug/23190 4685169689Skan * decl.c (wrapup_globals_for_namespace): Call 4686169689Skan emit_debug_global_declarations. 4687169689Skan * decl2.c (cp_finish_file): Likewise. 4688169689Skan 4689169689Skan2005-09-08 Mark Mitchell <mark@codesourcery.com> 4690169689Skan 4691169689Skan PR c++/23691 4692169689Skan * decl2.c (mark_used): Instantiate static data members initialized 4693169689Skan by constants, even in a template. 4694169689Skan 4695169689Skan2005-09-08 Andrew Pinski <pinskia@physics.uc.edu> 4696169689Skan 4697169689Skan PR obj-c++/16816 4698169689Skan * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as 4699169689Skan two CPP_COLON. 4700169689Skan 4701169689Skan2005-09-07 Richard Guenther <rguenther@suse.de> 4702169689Skan 4703169689Skan * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR 4704169689Skan for EMPTY_CLASS_EXPR. 4705169689Skan 4706169689Skan2005-09-06 Jakub Jelinek <jakub@redhat.com> 4707169689Skan 4708169689Skan PR c/23075 4709169689Skan * typeck.c (check_return_expr): Add no_warning argument. Set 4710169689Skan *no_warning to true if "return-statement with no value, in function 4711169689Skan returning" warning has been issued. 4712169689Skan * cp-tree.h (check_return_expr): Adjust prototype. 4713169689Skan * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if 4714169689Skan check_return_expr set *no_warning to true. 4715169689Skan 4716169689Skan2005-09-06 Mark Mitchell <mark@codesourcery.com> 4717169689Skan 4718169689Skan * cp-tree.h (rvalue): New function. 4719169689Skan * call.c (build_conditional_expr): Use it. 4720169689Skan * init.c (build_new_1): Likewise. 4721169689Skan * rtti.c (build_dynamic_cast_1): Likewise. 4722169689Skan * tree.c (rvalue): New function. 4723169689Skan * typeck.c (build_unary_op): Use it. 4724169689Skan (build_static_cast_1): Likewise. 4725169689Skan 4726169689Skan PR c++/9782 4727169689Skan * init.c (build_new_1): Make sure the entire array type is 4728169689Skan complete, not just its element types. 4729169689Skan 4730169689Skan2005-09-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4731169689Skan 4732169689Skan * decl.c (check_elaborated_type_specifier): Remove redundant check. 4733169689Skan 4734169689Skan2005-09-06 Jakub Jelinek <jakub@redhat.com> 4735169689Skan 4736169689Skan PR c++/23056 4737169689Skan * typeck.c (ignore_overflows): New helper function. 4738169689Skan (build_static_cast_1): Use it. 4739169689Skan 4740169689Skan2005-09-06 Kazu Hirata <kazu@codesourcery.com> 4741169689Skan 4742169689Skan * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos. 4743169689Skan Follow spelling conventions. 4744169689Skan 4745169689Skan2005-09-05 Mark Mitchell <mark@codesourcery.com> 4746169689Skan 4747169689Skan PR c++/23667 4748169689Skan * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when 4749169689Skan copying a VAR_DECL. 4750169689Skan 4751169689Skan2005-09-05 Mark Mitchell <mark@codesourcery.com> 4752169689Skan 4753169689Skan PR c++/21440 4754169689Skan * semantics.c (finish_stmt_expr_expr): Add an explicit 4755169689Skan initialization to the last statement in the statement-expression. 4756169689Skan * (finish_stmt_expr): Adjust accordingly. 4757169689Skan 4758169689Skan2005-09-03 Mark Mitchell <mark@codesourcery.com> 4759169689Skan 4760169689Skan PR c++/23699 4761169689Skan * decl2.c (mark_used): Always instantiate static data members 4762169689Skan initialized by constant expressions. 4763169689Skan * pt.c (instantiate_decl): Instantiate the initializers for static 4764169689Skan data members initialized by constant expressions. 4765169689Skan 4766169689Skan PR c++/21687 4767169689Skan * semantics.c (expand_or_defer_fn): Do not call ggc_collect when 4768169689Skan finishing processing for a template function in a local class. 4769169689Skan Revert: 4770169689Skan 2005-09-02 Mark Mitchell <mark@codesourcery.com> 4771169689Skan * parser.c (cp_parser_class_specifier): Push/pop GC contexts 4772169689Skan around functions in local classes. 4773169689Skan 4774169689Skan2005-09-02 Mark Mitchell <mark@codesourcery.com> 4775169689Skan 4776169689Skan PR c++/21687 4777169689Skan * parser.c (cp_parser_class_specifier): Push/pop GC contexts 4778169689Skan around functions in local classes. 4779169689Skan 4780169689Skan2005-08-31 Andrew Pinski <pinskia@physics.uc.edu> 4781169689Skan 4782169689Skan PR obj-c++/23640 4783169689Skan * decl2.c (cp_finish_file): If this is obj-c++ and we need a static 4784169689Skan init, call generate_ctor_or_dtor_function. 4785169689Skan 4786169689Skan2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4787169689Skan 4788161651Skan PR c++/13377 4789161651Skan * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to 4790161651Skan lookup_name_real on final parse. 4791161651Skan 4792161651Skan2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4793161651Skan 4794169689Skan PR c++/23639 4795169689Skan * semantics.c (qualified_name_lookup_error): Do not complain again 4796169689Skan on invalid scope. 4797169689Skan 4798169689Skan2005-08-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4799169689Skan 4800161651Skan PR c++/23586 4801161651Skan * parser.c (cp_parser_namespace_name): Move diagnostic for 4802161651Skan invalid namespace-name to here from ... 4803161651Skan * name-lookup.c (do_namespace_alias): ... here and ... 4804161651Skan (do_using_directive): ... here. Remove dead code. 4805161651Skan 4806169689Skan2005-08-28 Mark Mitchell <mark@codesourcery.com> 4807161651Skan 4808169689Skan PR c++/23099 4809169689Skan * cp-tree.h (saved_scope): Add skip_evaluation. 4810169689Skan * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not 4811169689Skan DECL_INITIAL, to determine whether or not a static data member was 4812169689Skan initialized in the class-specifier. 4813169689Skan (cp_finish_decl): Add comment. 4814169689Skan * init.c (integral_constant_value): Subtitute into the 4815169689Skan initializers for static data members in templates. 4816169689Skan * name-lookup.c (push_to_top_level): Save skip_evaluation. 4817169689Skan (pop_from_top_level): Restore it. 4818169689Skan * pt.c (instantiate_class_template): Do not substitute into the 4819169689Skan intializers of static data members when instantiating a class. 4820169689Skan (regenerate_decl_from_template): Simplify. 4821169689Skan (instantiate_decl): Tidy. Substitute into the initializer for a 4822169689Skan static data member even when the definition of the data member is 4823169689Skan not available. 4824161651Skan 4825169689Skan2005-08-26 Mark Mitchell <mark@codesourcery.com> 4826161651Skan 4827169689Skan PR c++/19004 4828169689Skan * pt.c (uses_template_parms): Handle IDENTIFIER_NODE. 4829169689Skan (type_dependent_expression_p): Allow BASELINKs whose associated 4830169689Skan functions are simply a FUNCTION_DECL. 4831161651Skan 4832169689Skan PR c++/23491 4833169689Skan * cp-tree.h (build_vec_init): Adjust prototype. 4834169689Skan * init.c (perform_member_init): Adjust call to build_vec_init. 4835169689Skan (build_aggr_init): Likewise. 4836169689Skan (build_new_1): Do not call build_default_init for array types. 4837169689Skan (build_vec_init): Add explicit_default_init_p parameter. Perform 4838169689Skan default initialization of vector elements when set. 4839169689Skan * typeck.c (build_modify_expr): Adjust call to build_vec_init. 4840161651Skan 4841169689Skan2005-08-25 Nathan Sidwell <nathan@codesourcery.com> 4842161651Skan 4843169689Skan PR c++/20817 4844169689Skan * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a 4845169689Skan ->*. 4846161651Skan 4847169689Skan2005-08-24 Nathan Sidwell <nathan@codesourcery.com> 4848161651Skan 4849169689Skan PR c++/22454 4850169689Skan * parser.c (cp_lexer_peek_nth_token): Relax assert. 4851161651Skan 4852169689Skan2005-08-23 Nathan Sidwell <nathan@codesourcery.com> 4853161651Skan 4854169689Skan PR c++/23044 4855169689Skan * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain. 4856161651Skan 4857169689Skan2005-08-22 James E Wilson <wilson@specifix.com> 4858161651Skan 4859169689Skan PR tree-optimization/23426 4860169689Skan * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for 4861169689Skan array size check. 4862161651Skan 4863169689Skan2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4864161651Skan 4865169689Skan PR c++/22233 4866169689Skan * pt.c (push_template_decl_real): Return error_mark_node if the 4867169689Skan number of template parameters does not match previous definition. 4868161651Skan 4869169689Skan2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4870161651Skan 4871169689Skan PR c++/23089 4872169689Skan * decl.c (require_complete_types_for_parms): Mark incomplete types 4873169689Skan as invalid. 4874161651Skan 4875169689Skan2005-08-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4876161651Skan 4877169689Skan * parser.c (cp_parser_nth_token_starts_template_argument_list_p): 4878169689Skan Fix typo in leading comment. 4879161651Skan 4880169689Skan2005-08-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4881161651Skan 4882169689Skan * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF. 4883161651Skan 4884169689Skan2005-08-15 Fariborz Jahanian <fjahanian@apple.com> 4885161651Skan 4886169689Skan * cp-tree.h (can_convert_arg, fn_type_unification): New argument. 4887169689Skan * call.c (add_template_candidate_real): Pass down 'flags' to 4888169689Skan fn_type_unification. 4889169689Skan (can_convert_arg): New 'flags' argument. Pass it to call to 4890169689Skan implicit_conversion instead of LOOKUP_NORMAL. 4891169689Skan (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg. 4892169689Skan * class.c (resolve_address_of_overloaded_function): Ditto. 4893169689Skan (resolve_address_of_overloaded_function): Ditto. 4894169689Skan * decl.c (reshape_init, check_default_argument): Ditto. 4895169689Skan * typeck.c (build_ptrmemfunc): Ditto. 4896169689Skan * pt.c (type_unification_real): Add 'flags' argument. 4897169689Skan (fn_type_unification): Pass 'flags' to type_unification_real. 4898169689Skan (type_unification_real): Pass new 'flags' argument to call to 4899169689Skan can_convert_arg. 4900161651Skan 4901169689Skan2005-08-12 Giovanni Bajo <giovannibajo@libero.it> 4902169689Skan Nathan Sidwell <nathan@codesourcery.com> 4903161651Skan 4904169689Skan PR c++/21799 4905169689Skan PR c++/8271 4906169689Skan * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers 4907169689Skan explicitly. 4908161651Skan 4909169689Skan2005-08-12 Nathan Sidwell <nathan@codesourcery.com> 4910161651Skan 4911169689Skan PR c++/21799 4912169689Skan Revert my 2005-07-08 patch 4913169689Skan * pt.c (type_unification_real): Remove is_method_argument and 4914169689Skan assoicated checks. 4915169689Skan (fn_type_unification, unify): Adjust type_unification_real calls. 4916161651Skan 4917169689Skan2005-08-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4918161651Skan 4919169689Skan PR c++/23266 4920169689Skan * decl2.c (grokfield): Check that method is not static before 4921169689Skan marking it as pure. 4922146895Skan 4923169689Skan2005-08-11 Nathan Sidwell <nathan@codesourcery.com> 4924146895Skan 4925169689Skan PR c++/23219 4926169689Skan * name-lookup.c (pushtag): Process the template type before 4927169689Skan altering the identifier lookup fields. Remove unreachable code 4928169689Skan creating an empty stub decl. 4929146895Skan 4930169689Skan2005-08-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4931146895Skan 4932169689Skan PR c++/20646 4933169689Skan * decl.c (grokdeclarator): Reset storage_class after error. 4934146895Skan 4935169689Skan2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4936146895Skan 4937169689Skan PR c++/22508 4938169689Skan * init.c (build_new_1): Check for empty candidate list. 4939146895Skan 4940169689Skan2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4941146895Skan 4942169689Skan PR c++/23191 4943169689Skan * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node 4944169689Skan before calling build_exception_variant. 4945146895Skan 4946169689Skan2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 4947146895Skan 4948169689Skan PR c++/19498 4949169689Skan * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE 4950169689Skan if substitution of template args did not succeed. 4951146895Skan 4952169689Skan2005-08-06 Michael Matz <matz@suse.de> 4953146895Skan 4954169689Skan * method.c (use_thunk): Call init_insn_lengths. 4955146895Skan 4956169689Skan2005-08-05 James A. Morrison <phython@gcc.gnu.org> 4957146895Skan 4958169689Skan PR c++/22514 4959169689Skan * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if 4960169689Skan sorrycount or errorcount are nonzero. 4961146895Skan 4962169689Skan2005-08-05 Mark Mitchell <mark@codesourcery.com> 4963146895Skan 4964169689Skan * name-lookup.c (pushtag): Remove accidental commit from: 4965169689Skan 2004-12-21 Mark Mitchell <mark@codesourcery.com> 4966169689Skan PR c++/19063 4967169689Skan * decl.c (grokdeclarator): Return error_mark_node, not 4968169689Skan void_type_node, to indicate errors. 4969169689Skan * parser.c (cp_parser_template_parameter_list): Robustify. 4970169689Skan (cp_parser_template_parameter): Likewise. 4971146895Skan 4972169689Skan2005-08-01 Kazu Hirata <kazu@codesourcery.com> 4973146895Skan 4974169689Skan * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c: 4975169689Skan Fix comment typos. 4976146895Skan 4977169689Skan2005-07-29 Kazu Hirata <kazu@codesourcery.com> 4978146895Skan 4979169689Skan * method.c: Fix a comment typo. 4980146895Skan 4981169689Skan2005-07-28 Mark Mitchell <mark@codesourcery.com> 4982146895Skan 4983169689Skan PR c++/22545 4984169689Skan * call.c (add_builtin_candidate): Adjust for changes in 4985169689Skan representation of pointer-to-member types. 4986146895Skan 4987169689Skan2005-07-28 Mike Stump <mrs@apple.com> 4988146895Skan 4989169689Skan * pt.c (check_explicit_specialization): Add visibility logic. 4990169689Skan (lookup_template_class): Likewise. 4991169689Skan (instantiate_class_template): Likewise. 4992146895Skan 4993169689Skan2005-07-27 Devang Patel <dpatel@apple.com> 4994146895Skan 4995169689Skan * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit. 4996146895Skan 4997169689Skan2005-07-25 Ian Lance Taylor <ian@airs.com> 4998146895Skan 4999169689Skan * ptree.c (cxx_print_identifier): Print a leading space if the 5000169689Skan indent level is 0. 5001146895Skan 5002169689Skan2005-07-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5003146895Skan 5004169689Skan * call.c (convert_for_arg_passing): Check function pointers when 5005169689Skan -Wmissing-format-attribute is activated. 5006169689Skan * typeck.c (convert_for_assignment): Likewise. 5007146895Skan 5008169689Skan2005-07-22 Manfred Hollstein <mh@suse.com> 5009146895Skan 5010169689Skan * parser.c (cp_parser_declaration): Fix unitialised warnings. 5011146895Skan 5012169689Skan2005-07-21 Andrew Pinski <pinskia@physics.uc.edu> 5013146895Skan 5014169689Skan * class.c (build_base_path): Fix typo. 5015146895Skan 5016169689Skan2005-07-21 Andrew Pinski <pinskia@physics.uc.edu> 5017146895Skan 5018169689Skan PR C++/22358 5019169689Skan * class.c (build_base_path): Convert BINFO_OFFSET to the correct type. 5020146895Skan 5021169689Skan2005-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 5022146895Skan 5023169689Skan * call.c: Fix comment typo(s). 5024169689Skan * cxx-pretty-print.h: Likewise. 5025169689Skan * name-lookup.c: Likewise. 5026169689Skan * parser.c: Likewise. 5027146895Skan 5028169689Skan2005-07-20 Douglas Gregor <doug.gregor@gmail.com> 5029146895Skan 5030169689Skan PR c++/2922 5031169689Skan * semantics.c (perform_koenig_lookup): For dependent calls, just 5032169689Skan return the set of functions we've found so far. Later, it will be 5033169689Skan augmented by those found through argument-dependent lookup. 5034169689Skan * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing 5035169689Skan the optimization that skips namespaces where the functions were 5036169689Skan originally found. 5037146895Skan 5038169689Skan2005-07-20 Giovanni Bajo <giovannibajo@libero.it> 5039146895Skan 5040169689Skan Make CONSTRUCTOR use VEC to store initializers. 5041169689Skan * call.c (convert_default_arg): Update call to digest_init. 5042169689Skan * class.c (dump_class_hierarchy, dump_array): Update to cope with 5043169689Skan VEC in CONSTRUCTOR_ELTS. 5044169689Skan * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise. 5045169689Skan (finish_compound_literal, digest_init): Update declaration. 5046169689Skan * decl.c (struct reshape_iter): New data type. 5047169689Skan (reshape_init_array): Rename to... 5048169689Skan (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS. 5049169689Skan (reshape_init): Rewrite from scratch. Split parts into... 5050169689Skan (reshape_init_array, reshape_init_vector, reshape_init_class, 5051169689Skan reshape_init_r): New functions. 5052169689Skan (check_initializer): Update call to reshape_init. Remove obsolete 5053169689Skan code. 5054169689Skan (initialize_artificial_var, cp_complete_array_type): Update to cope 5055169689Skan with VEC in CONSTRUCTOR_ELTS. 5056169689Skan * decl2.c (grokfield): Update calls to digest_init. 5057169689Skan (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS. 5058169689Skan * error.c (dump_expr_init_vec): New function. 5059169689Skan (dump_expr): Use dump_expr_init_vec. 5060169689Skan * init.c (build_zero_init, build_vec_init): Update to cope with VEC 5061169689Skan in CONSTRUCTOR_ELTS. 5062169689Skan (expand_default_init): Update call to digest_init. 5063169689Skan * parser.c (cp_parser_postfix_expression): Use a VEC for the 5064169689Skan initializers. 5065169689Skan (cp_parser_initializer_list): Build a VEC of initializers. 5066169689Skan * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC 5067169689Skan in CONSTRUCTOR_ELTS. 5068169689Skan * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer, 5069169689Skan ptm_initializer, class_initializer, get_pseudo_ti_init): Use 5070169689Skan build_constructor_from_list instead of build_constructor. 5071169689Skan * semantics.c (finish_compound_literal): Update call to digest_init. 5072169689Skan * tree.c (stabilize_init): Update to cope with VEC in 5073169689Skan CONSTRUCTOR_ELTS. 5074169689Skan * typeck.c (build_ptrmemfunc1): Likewise. 5075169689Skan * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1): 5076169689Skan Likewise. 5077169689Skan (store_init_value): Use build_constructor_from_list and update call 5078169689Skan to digest_init. 5079169689Skan (digest_init): Rewrite. 5080169689Skan (process_init_constructor): Rewrite from scratch. Split into... 5081169689Skan (process_init_constructor_array, picflag_from_initializer, 5082169689Skan process_init_constructor_record, process_init_constructor_union): 5083169689Skan New functions. 5084169689Skan (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE): 5085169689Skan New macros. 5086169689Skan (build_functional_cast): Use build_constructor_from_list instead of 5087169689Skan build_constructor. 5088146895Skan 5089169689Skan2005-07-18 Mark Mitchell <mark@codesourcery.com> 5090146895Skan 5091169689Skan PR c++/22263 5092169689Skan * cp-tree.h (instantiate_decl): Change prototype. 5093169689Skan * decl2.c (mark_used): Adjust accordingly. 5094169689Skan * pt.c (do_decl_instantiation): Likewise. 5095169689Skan (instantiate_class_member): Likewise. 5096169689Skan (instantiate_decl): Rename undefined_ok as expl_inst_class_mem_p. 5097169689Skan Clear DECL_INTERFACE_KNOWN for an explicitly instantiated template 5098169689Skan that has no definition available. 5099169689Skan (instantiate_pending_templates): Adjust call to instantiate_decl. 5100146895Skan 5101169689Skan2005-07-17 Mark Mitchell <mark@codesourcery.com> 5102146895Skan 5103169689Skan PR c++/22139 5104169689Skan * cp-tree.h (DECL_TEMPLATE_INFO): Improve documentation. 5105169689Skan * decl.c (duplicate_decls): Re-register template specializations 5106169689Skan for functions that have DECL_TEMLPLATE_INFO, even if they do not 5107169689Skan have DECL_TEMPLATE_INSTANTIATION set. 5108146895Skan 5109169689Skan2005-07-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5110146895Skan 5111169689Skan * call.c (diagnostic_fn_t): New. 5112169689Skan (build_temp, convert_like_real): Use diagnostic_fn_t. 5113146895Skan 5114169689Skan2005-07-15 Mark Mitchell <mark@codesourcery.com> 5115146895Skan 5116169689Skan PR c++/22204 5117169689Skan * repo.c (repo_emit_p): Robustify. 5118146895Skan 5119169689Skan2005-07-14 Daniel Berlin <dberlin@dberlin.org> 5120146895Skan 5121169689Skan Fix PR c++/22452 5122169689Skan * tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL. 5123146895Skan 5124169689Skan2005-07-15 Mark Mitchell <mark@codesourcery.com> 5125146895Skan 5126169689Skan PR c++/22132 5127169689Skan * call.c (implicit_conversion): Add c_cast_p parameter. 5128169689Skan (standard_conversion): Likewise. Allow conversions between 5129169689Skan differently-qualified pointer types when performing a C-style 5130169689Skan cast. 5131169689Skan (add_function_candidate): Adjust callee. 5132169689Skan (build_builtin_candidate): Likewise. 5133169689Skan (build_user_type_conversion_1): Likewise. 5134169689Skan (conditional_conversion): Likewise. 5135169689Skan (can_convert_arg): Likewise. 5136169689Skan (can_convert_arg_bad): Likewise. 5137169689Skan (perform_implicit_conversion): Likewise. 5138169689Skan * cp-tree.h (comp_ptr_ttypes_const): Declare. 5139169689Skan * typeck.c (comp_ptr_ttypes_const): Give it external linkage. 5140169689Skan Return bool. 5141146895Skan 5142169689Skan2005-07-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 5143169689Skan Nathan Sidwell <nathan@codesourcery.com> 5144146895Skan 5145169689Skan PR c++/20172 5146169689Skan * pt.c (tsubst_template_parms): Check for invalid non-type 5147169689Skan parameters. 5148146895Skan 5149169689Skan2005-07-09 Andrew Pinski <pinskia@physics.uc.edu> 5150146895Skan 5151169689Skan * cp-lang.c (shadowed_var_for_decl, decl_shadowed_for_var_lookup, 5152169689Skan decl_shadowed_for_var_insert): Move over to cp-objcp-common.c. 5153169689Skan (cp_init_ts): Call init_shadowed_var_for_decl. 5154169689Skan Remove include of gt-cp-cp-lang.h. 5155169689Skan * cp-objcp-common.c (shadowed_var_for_decl, 5156169689Skan decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Moved from 5157169689Skan cp-lang.c. 5158169689Skan (init_shadowed_var_for_decl): New function to initialize 5159169689Skan shadowed_var_for_decl. 5160169689Skan Include gt-cp-cp-objcp-common.h. 5161169689Skan * Make-lang.in (gt-cp-lang.h): Remove. 5162169689Skan (gt-cp-cp-objcp-common.h): Add. 5163169689Skan (cp/cp-lang.o): Remove dependancy on gt-cp-lang.h. 5164169689Skan (cp/cp-objcp-common.o): Add dependancy on gt-cp-cp-objcp-common.h. 5165169689Skan * config-lang.in (gtfiles): Remove cp-lang.c and Add cp-objcp-common.c. 5166169689Skan * cp-tree (init_shadowed_var_for_decl): Add prototype. 5167146895Skan 5168169689Skan2005-07-08 Daniel Berlin <dberlin@dberlin.org> 5169146895Skan 5170169689Skan * Make-lang.in: Add gt-cp-lang.h. 5171169689Skan (cp-lang.o): Ditto. 5172169689Skan * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on 5173169689Skan the field. 5174169689Skan * config-lang.in: Add cp-lang.c to gtfiles. 5175169689Skan * cp-lang.c: Include hashtab.h. 5176169689Skan (cp_init_ts): New function. 5177169689Skan (LANG_HOOK_INIT_TS): Use macro. 5178169689Skan (decl_shadowed_for_var_lookup): New function. 5179169689Skan (decl_shadowed_for_var_insert): Ditto. 5180169689Skan * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common. 5181169689Skan (NON_THUNK_FUNCTION_CHECK): Ditto. 5182169689Skan (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common. 5183169689Skan (DECL_INIT_PRIORITY): Ditto. 5184169689Skan (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto. 5185169689Skan (DECL_SHADOWED_FOR_VAR): Use hashtable. 5186169689Skan (SET_DECL_SHADOWED_FOR_VAR): Ditto. 5187169689Skan * decl.c (duplicate_decls): Update for new/updated structures. 5188169689Skan (poplevel): Use SET_DECL_SHADOWED_FOR_VAR. 5189169689Skan * decl2.c (start_static_initialization_or_destruction): Deal with 5190169689Skan priority. 5191169689Skan * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing 5192169689Skan SET_DECL_RTL. 5193169689Skan * tree.c (handle_init_priority_attribute): Handle priority. 5194146895Skan 5195169689Skan2005-07-08 Nathan Sidwell <nathan@codesourcery.com> 5196146895Skan 5197169689Skan PR c++/21799 5198169689Skan * pt.c (type_unification_real): Add is_method argument. Use it 5199169689Skan for this pointer unification. 5200169689Skan (fn_type_unification): Adjust type_unification_real call. 5201169689Skan (unify): Likewise. 5202146895Skan 5203169689Skan2005-07-07 Nathan Sidwell <nathan@codesourcery.com> 5204146895Skan 5205169689Skan * pt.c (type_unification_real): Remove allow_incomplete argument. 5206169689Skan Remove unreachable code. 5207169689Skan (fn_type_unification): Adjust call to type_unification_real. 5208169689Skan (unify): Likewise. 5209146895Skan 5210169689Skan2005-07-05 Paolo Bonzini <bonzini@gnu.org> 5211146895Skan 5212169689Skan * Makefile.in (class.o, decl2.o): Adjust dependencies. 5213169689Skan * class.c: Include tree-dump.h. 5214169689Skan * decl2.c: Include tree-dump.h. 5215146895Skan 5216169689Skan2005-07-02 Gabriel Dos Reis <gdr@integrable-solutions.net> 5217146895Skan 5218169689Skan * dump.c: Use dump_string_field. 5219146895Skan 5220169689Skan2005-07-03 Joseph S. Myers <joseph@codesourcery.com> 5221146895Skan 5222169689Skan * cp-tree.h (GCC_DIAG_STYLE): #undef before defining. Change 5223169689Skan minimum GCC version for format checking to 4.1. 5224146895Skan 5225169689Skan2005-07-02 Kazu Hirata <kazu@codesourcery.com> 5226146895Skan 5227169689Skan * Make-lang.in (cc1plus-checksum.c): Use 5228169689Skan build/genchecksum$(build_exeext), not build/genchecksum$(exeext). 5229146895Skan 5230169689Skan2005-07-02 Joseph S. Myers <joseph@codesourcery.com> 5231146895Skan 5232169689Skan * name-lookup.c, parser.c: Use %q, %< and %> to quote in 5233169689Skan diagnostics. 5234146895Skan 5235169689Skan2005-07-02 Zack Weinberg <zack@codesourcery.com> 5236169689Skan Joseph S. Myers <joseph@codesourcery.com> 5237146895Skan 5238169689Skan * error.c (location_of): Add comment. 5239169689Skan (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove. 5240169689Skan * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove. 5241169689Skan * call.c, class.c, decl.c, decl2.c, friend.c, init.c, 5242169689Skan name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c, 5243169689Skan typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at 5244169689Skan or cp_pedwarn_at. Mark up some diagnostic strings with N_. 5245146895Skan 5246169689Skan2005-06-30 Daniel Berlin <dberlin@dberlin.org> 5247146895Skan 5248169689Skan * decl.c (require_complete_types_for_parms): Call relayout_decl 5249169689Skan instead of layout_decl. 5250146895Skan 5251169689Skan2005-06-30 Zack Weinberg <zack@codesourcery.com> 5252169689Skan Jakub Jelinek <jakub@redhat.com> 5253146895Skan 5254169689Skan * cp-lang.c: No need to include cxx-pretty-print.h. 5255169689Skan * error.c (cp_printer): Update signature. No need to process 5256169689Skan flags. 5257169689Skan (print_instantiation_partial_context): Output last newline 5258169689Skan with pp_base_newline. 5259169689Skan * Make-lang.in: Update dependencies. 5260146895Skan 5261169689Skan2005-06-30 Steven Bosscher <stevenb@suse.de> 5262146895Skan 5263169689Skan * decl.c (start_decl): Replace DECL_THREAD_LOCAL with 5264169689Skan DECL_THREAD_LOCAL_P. 5265169689Skan (cp_finish_decl): Likewise. 5266169689Skan (grokvardecl): Set the default DECL_TLS_MODEL here. 5267146895Skan 5268169689Skan2005-06-28 Joseph S. Myers <joseph@codesourcery.com> 5269146895Skan 5270169689Skan * cvt.c (ocp_convert): Use invalid_conversion hook. 5271169689Skan * typeck.c (build_binary_op): Use invalid_binary_op hook. 5272169689Skan (build_unary_op): Use invalid_unary_op hook. 5273146895Skan 5274169689Skan2005-06-28 Paul Brook <paul@codesourcery.com> 5275146895Skan 5276169689Skan * Make-lang.in (cp/except.o): Depend on $(TARGET_H) 5277169689Skan * except.c: Include target.h. 5278169689Skan (init_exception_processing): Initialize unwind_resume_libfunc. 5279169689Skan * doc/tm.texi: Document TARGET_ASM_TTYPE 5280146895Skan 5281169689Skan2005-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5282146895Skan 5283169689Skan * call.c (build_over_call): Pass in named argument list to 5284169689Skan `check_function_arguments'. 5285169689Skan * typeck.c (build_function_call): Likewise. 5286146895Skan 5287169689Skan2005-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5288146895Skan 5289169689Skan * cp-tree.h (lang_check_failed): Add noreturn attribute. 5290146895Skan 5291169689Skan2005-06-25 Kelley Cook <kcook@gcc.gnu.org> 5292146895Skan 5293169689Skan * all files: Update FSF address in copyright headers. 5294146895Skan 5295169689Skan2005-06-23 Jason Merrill <jason@redhat.com> 5296146895Skan 5297169689Skan PR c++/19317 5298169689Skan * semantics.c (simplify_aggr_init_expr): Use 5299169689Skan CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR. 5300146895Skan 5301169689Skan2005-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 5302146895Skan 5303169689Skan * pt.c (register_specialization): Remove superfluous assertion. 5304146895Skan 5305169689Skan2005-06-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5306146895Skan 5307169689Skan * call.c (convert_like_real): Add format attribute. 5308169689Skan * typeck.c (check_for_casting_away_constness, 5309169689Skan build_static_cast_1): Likewise. 5310169689Skan * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic): 5311169689Skan Likewise. 5312146895Skan 5313169689Skan2005-06-17 Geoffrey Keating <geoffk@apple.com> 5314146895Skan 5315169689Skan PR c++/17413 5316169689Skan * pt.c (type_unification_real): Apply template type deduction even 5317169689Skan to procedure parameters that are not dependent on a template 5318169689Skan parameter. 5319146895Skan 5320169689Skan2005-06-16 Nathan Sidwell <nathan@codesourcery.com> 5321146895Skan 5322169689Skan * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might 5323169689Skan change. 5324169689Skan (create_pseudo_type_info): First parameter is an int. 5325146895Skan 5326169689Skan2005-06-15 Nathan Sidwell <nathan@codesourcery.com> 5327146895Skan 5328169689Skan PR c++/20678 5329169689Skan * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not 5330169689Skan null. 5331146895Skan 5332169689Skan * Make-lang.in: Reformat some long lines. 5333169689Skan (gt-cp-rtti.h): New target. 5334169689Skan (cp/rtti.o): Add dependency. 5335169689Skan * config-lang.in (gtfiles): Add cp/rtti.c. 5336169689Skan * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE, 5337169689Skan CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE, 5338169689Skan CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, 5339169689Skan CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE, 5340169689Skan CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove. 5341169689Skan (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node, 5342169689Skan ary_desc_type_node, func_desc_type_node, enum_desc_type_node, 5343169689Skan class_desc_type_node, si_class_desc_type_node, 5344169689Skan vmi_class_desc_type_node, ptm_desc_type_node, 5345169689Skan base_desc_type_node): Remove. 5346169689Skan * decl.c: Adjust documentation of global trees. 5347169689Skan * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL, 5348169689Skan TINFO_REAL_NAME): Remove. 5349169689Skan (struct tinfo_s): New. 5350169689Skan (enum tinfo_kind): New. 5351169689Skan (tinfo_descs): New. 5352169689Skan (get_tinfo_decl): Adjust use of tinfo descriptor. 5353169689Skan (tinfo_base_init, generic_initializer, ptr_initializer, 5354169689Skan ptm_initializer, class_initializer): Likewise. 5355169689Skan (get_pseudo_ti_init): Take descriptor index. Adjust. 5356169689Skan (create_pseudo_type_info): Likewise. 5357169689Skan (get_pseudo_ti_desc): Return descriptor index. Adjust. 5358169689Skan (create_tinfo_types): Adjust use of create_pseudo_type_info. 5359169689Skan (emit_tinfo_decl): Adjust use of tinfo descriptor. 5360146895Skan 5361169689Skan2005-06-14 Roger Sayle <roger@eyesopen.com> 5362146895Skan 5363169689Skan * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST. 5364146895Skan 5365169689Skan2005-06-13 Geoffrey Keating <geoffk@apple.com> 5366146895Skan 5367169689Skan * Make-lang.in (c++.install-man): Doesn't really depend on installdirs. 5368169689Skan (rule for installing g++.1 manpage): Does depend on installdirs. 5369146895Skan 5370169689Skan2005-06-13 Nathan Sidwell <nathan@codesourcery.com> 5371146895Skan 5372169689Skan PR c++/20789 5373169689Skan * decl.c (cp_finish_decl): Clear runtime runtime initialization if 5374169689Skan in-class decl's initializer is bad. 5375146895Skan 5376169689Skan PR c++/21929 5377169689Skan * parser.c (struct cp_parser): Document that scope could be 5378169689Skan error_mark. 5379169689Skan (cp_parser_diagnose_invalid_type_name): Cope with error_mark for 5380169689Skan scope. 5381169689Skan (cp_parser_nested_name_specifier): Return NULL_TREE on error. 5382169689Skan (cp_parser_postfix_expression): Deal with null or error_mark 5383169689Skan scope. 5384169689Skan (cp_parser_elaborated_type_specifier): Adjust 5385169689Skan cp_parser_nested_name_specifier call. 5386146895Skan 5387169689Skan * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup. 5388146895Skan 5389169689Skan2005-06-12 Roger Sayle <roger@eyesopen.com> 5390146895Skan 5391169689Skan PR c++/21930 5392169689Skan * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types. 5393169689Skan Treat CONVERT_EXPR identically to NOP_EXPR. 5394146895Skan 5395169689Skan2005-06-10 Aldy Hernandez <aldyh@redhat.com> 5396146895Skan 5397169689Skan PR c++/10611 5398169689Skan * cvt.c (build_expr_type_conversion): Same. 5399169689Skan * typeck.c (build_binary_op): Handle vectors. 5400169689Skan (common_type): Same. 5401169689Skan (type_after_usual_arithmetic_conversions): Same. 5402146895Skan 5403169689Skan2005-06-08 Nathan Sidwell <nathan@codesourcery.com> 5404146895Skan 5405169689Skan PR c++/19497 5406169689Skan * cp-tree.def (USING_DECL): Update documentation. 5407169689Skan * cp-tree.h (DECL_DEPENDENT_P): New. 5408169689Skan (USING_DECL_DECLS, USING_DECL_SCOPE): New. 5409169689Skan * class.c (handle_using_decl): Move most of the processing to ... 5410169689Skan * name-lookup.c (do_class_using_decl): ... here. Make stricter. 5411169689Skan (push_using_decl): Use USING_DECL_SCOPE. 5412169689Skan (cp_emit_debug_info_for_using): Make extern. 5413169689Skan * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust. 5414169689Skan * name-lookup.h (cp_emit_debug_info_for_using): Declare. 5415169689Skan * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl 5416169689Skan when tsubsting. 5417169689Skan (tsubst_expr): Use USING_DECL_SCOPE. 5418169689Skan * search.c (lookup_field_1): Use DECL_DEPENDENT_P. 5419169689Skan * semantics.c (finish_member_declaration): Likewise. 5420146895Skan 5421169689Skan2005-06-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 5422146895Skan 5423169689Skan PR c++/19894 5424169689Skan * pt.c (tsubst): Reject pointer-to-member of type void. 5425146895Skan 5426169689Skan PR c++/20563 5427169689Skan * parser.c (cp_parser_label_declaration): Deal with invalid/missing 5428169689Skan identifiers. 5429146895Skan 5430169689Skan2005-06-07 Nathan Sidwell <nathan@codesourcery.com> 5431146895Skan 5432169689Skan * cp-tree.def (DEFAULT_ARG): Adjust documentation. 5433169689Skan * cp-tree.h (DEFARG_INSTANTIATIONS): New. 5434169689Skan (struct tree_default_arg): Add instantiations member. 5435169689Skan * parser.c (cp_parser_late_parsing_default_args): Adjust to use a 5436169689Skan VEC. 5437169689Skan * pt.c (tsubst_arg_types): Likewise. 5438146895Skan 5439169689Skan * parser.c (cp_parser_late_parsing_default_args): Fix overeager 5440169689Skan assert in previous patch. 5441146895Skan 5442169689Skan2005-06-06 Jakub Jelinek <jakub@redhat.com> 5443146895Skan 5444169689Skan * error.c (locate_error): Use gmsgid instead of msgid for argument 5445169689Skan name. 5446169689Skan (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise. 5447146895Skan 5448169689Skan2005-06-06 Nathan Sidwell <nathan@codesourcery.com> 5449146895Skan 5450169689Skan PR 21903 5451169689Skan * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use. 5452169689Skan * parser.c (cp_parser_late_parsing_default_args): Propagate parsed 5453169689Skan argument to any early instantiations. 5454169689Skan * pt.c (tsubst_arg_types): Chain early instantiation of default arg. 5455146895Skan 5456169689Skan PR c++/20637 5457169689Skan * cp-tree.h (add_method): Add using_decl parameter. 5458169689Skan * class.c (add_method): Add using_decl parameter. Adjust error 5459169689Skan messages. 5460169689Skan (handle_using_decl): Pass the using decl to add_method. 5461169689Skan (clone_function_decl): Adjust add_member calls. 5462169689Skan * decl2.c (check_classfn): Likewise. 5463169689Skan * method.c (lazily_declare_fn): Likewise. 5464169689Skan * semantics.c (finish_member_declaration): Likewise. 5465146895Skan 5466169689Skan * method.c (synthesize_method): Use inform, not warning. 5467146895Skan 5468169689Skan2005-06-06 Hans-Peter Nilsson <hp@axis.se> 5469146895Skan 5470169689Skan * config-lang.in (target_libs): Remove target-gperf. 5471146895Skan 5472169689Skan2005-06-05 Mark Mitchell <mark@codesourcery.com> 5473146895Skan 5474169689Skan PR c++/21619 5475169689Skan * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro. 5476169689Skan * parser.c (cp_parser_postfix_expression): Allow non-constant 5477169689Skan expressions as arguments to __builtin_constant_p. 5478169689Skan * tree.c (builtin_valid_in_constant_expr_p): Use 5479169689Skan DECL_IS_BUILTIN_CONSTANT_P. 5480146895Skan 5481169689Skan2005-06-03 Mark Mitchell <mark@codesourcery.com> 5482146895Skan 5483169689Skan PR c++/21853 5484169689Skan * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on 5485169689Skan the pointed-to type for a pointer-to-member. 5486146895Skan 5487169689Skan PR c++/21336 5488169689Skan * cp-tree.h (grok_op_properties): Remove friendp parameter. 5489169689Skan * decl.c (grokfndecl): Adjust call. 5490169689Skan (grok_op_properties): Determine the class of which the function is 5491169689Skan a member by looking at its DECL_CONTEXT, not current_class_type. 5492169689Skan * pt.c (tsubst_decl): Adjust call to grok_op_properties. 5493146895Skan 5494169689Skan2005-06-02 Nathan Sidwell <nathan@codesourcery.com> 5495146895Skan 5496169689Skan * method.c (synthesize_method): Add addtional arg to warning call. 5497146895Skan 5498169689Skan PR c++/21280 5499169689Skan * Make-lang.in (method.o): Add diagnostic.h 5500169689Skan * decl.c (start_preparsed_function): Use decl's location for file 5501169689Skan info. 5502169689Skan * decl2.c (cp_finish_file): Set input_location before synthesizing 5503169689Skan a function. 5504169689Skan (mark_used): When deferring a synthesized function, save current 5505169689Skan location. Do not set function's location when actually 5506169689Skan synthesizing it. 5507169689Skan * method.c: #include diagnostic.h. 5508169689Skan (synthesize_method): Set the functions source location. Show 5509169689Skan needed location if errors are emitted. 5510146895Skan 5511169689Skan * decl.c (start_decl): Simplify specialization handling. Remove 5512169689Skan unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check. 5513169689Skan * mangle.c (discriminator_for_local_entity): Use VEC_index. 5514146895Skan 5515169689Skan PR c++/20350 5516169689Skan * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE. 5517146895Skan 5518169689Skan PR c++/21151 5519169689Skan * name-lookup.c (pushtag): Push local class even in a template. 5520146895Skan 5521169689Skan2005-05-31 Nathan Sidwell <nathan@codesourcery.com> 5522146895Skan 5523169689Skan PR c++/21165 5524169689Skan * init.c (integral_constant_value): Check the type of the 5525169689Skan initializer, not the decl. 5526146895Skan 5527169689Skan2005-05-30 Mark Mitchell <mark@codesourcery.com> 5528146895Skan 5529169689Skan PR c++/21784 5530169689Skan * name-lookup.c (do_nonmember_using_decl): Ignore builtin 5531169689Skan functions, even when the used name is not a function. 5532146895Skan 5533169689Skan2005-05-30 Kazu Hirata <kazu@cs.umass.edu> 5534146895Skan 5535169689Skan * operators.def, optimize.c: Update copyright. 5536146895Skan 5537169689Skan2005-05-28 Mark Mitchell <mark@codesourcery.com> 5538146895Skan 5539169689Skan PR c++/21210 5540169689Skan * call.c (standard_conversion): Permit conversions to complex 5541169689Skan types if conversion to the corresponding scalar type would be 5542169689Skan permitted. 5543146895Skan 5544169689Skan PR c++/21340 5545169689Skan * method.c (implicitly_declare_fn): Clear processing_template_decl 5546169689Skan when generating implicit declaration. 5547146895Skan 5548169689Skan2005-05-27 Mark Mitchell <mark@codesourcery.com> 5549146895Skan 5550169689Skan PR c++/21614 5551169689Skan * typeck.c (get_member_function_from_ptrfunc): Do not attempt 5552169689Skan conversions to base classes of incomplete types. 5553146895Skan 5554169689Skan2005-05-27 Ian Lance Taylor <ian@airs.com> 5555146895Skan 5556169689Skan * semantics.c (add_stmt): Add C++ frontend specific version. 5557169689Skan * cp-tree.h (STMT_IS_FULL_EXPR_P): Define. 5558169689Skan (stmts_are_full_exprs_p): Declare. 5559146895Skan 5560169689Skan2005-05-27 Roger Sayle <roger@eyesopen.com> 5561169689Skan Giovanni Bajo <giovannibajo@gcc.gnu.org> 5562146895Skan 5563169689Skan * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code. 5564169689Skan * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead 5565169689Skan of CONVERT_EXPR. 5566169689Skan (cp_parser_unary_expression): Likewise. 5567169689Skan * typeck.c (build_unary_op): Likewise. 5568169689Skan * call.c (add_builtin_candidate, build_new_op): Likewise. 5569169689Skan * error.c (dump_expr): Likewise. 5570169689Skan * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise. 5571169689Skan * decl.c (ambi_op_p, grok_op_properties): Likewise. 5572169689Skan * dump.c (dump_op): Likewise. 5573169689Skan * lex.c (init_operators): Likewise. 5574169689Skan * operators.def ("+"): Likewise. 5575169689Skan * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a 5576169689Skan conversion, if the result and argument types differ. 5577169689Skan * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much 5578169689Skan like a NOP_EXPR when !processing_template_decl. 5579146895Skan 5580169689Skan * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype. 5581169689Skan (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code. 5582146895Skan 5583169689Skan2005-05-27 Nathan Sidwell <nathan@codesourcery.com> 5584146895Skan 5585169689Skan PR c++/21455 5586169689Skan * typeck.c (get_delta_difference): Cope with incomplete but equal 5587169689Skan classes. Reorder if. 5588146895Skan 5589169689Skan PR c++/21681 5590169689Skan * parser.c (cp_parser_late_parsing_for_member): Disable access 5591169689Skan checking for template functions. 5592146895Skan 5593169689Skan2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 5594146895Skan 5595169689Skan PR c++/21768 5596169689Skan * pt.c (redeclare_class_template): Change error message according 5597169689Skan to coding conventions. 5598146895Skan 5599169689Skan2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 5600146895Skan 5601169689Skan * call.c (build_op_delete_call): Fix quoting in error message. 5602146895Skan 5603169689Skan2005-05-25 Richard Henderson <rth@redhat.com> 5604146895Skan 5605169689Skan PR libgcj/21692 5606169689Skan * cp-tree.h (make_alias_for): Declare. 5607169689Skan * decl2.c (build_java_method_aliases): New. 5608169689Skan (cp_finish_file): Call it. 5609169689Skan * method.c (make_alias_for): Split out from ... 5610169689Skan (make_alias_for_thunk): ... here. 5611146895Skan 5612169689Skan2005-05-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 5613146895Skan 5614169689Skan PR c++/21686 5615169689Skan * semantics.c (finish_id_expression): Fix quoting in error message. 5616119256Skan 5617169689Skan2005-05-25 DJ Delorie <dj@redhat.com> 5618119256Skan 5619169689Skan * decl.c (duplicate_decls): Move warning control from if() to 5620169689Skan warning(OPT_*). 5621169689Skan * name-lookup.c (parse_using_directive): Likewise. 5622169689Skan * parser.c (cp_parser_elaborated_type_specifier): Likewise. 5623169689Skan (cp_parser_init_declarator): Likewise. 5624169689Skan * tree.c (handle_com_interface_attribute): Likewise. 5625122180Skan 5626169689Skan2005-05-24 Ziemowit Laski <zlaski@apple.com> 5627117395Skan 5628169689Skan * class.c (layout_class_type): Do not issue C++ ABI warnings 5629169689Skan for ObjC structs. 5630169689Skan * decl.c (objc_mark_locals_volatile): Streamline by calling 5631169689Skan objc_volatilize_decl(). 5632169689Skan * parser.c (cp_parser_objc_message_expression): Allow simple 5633169689Skan type specifiers (instead of merely type names) as message 5634169689Skan receivers. 5635169689Skan * pt.c (template_args_equal): Do not call objc_comptypes(). 5636169689Skan * typeck.c (composite_pointer_type): If both pointers are 5637169689Skan ObjC-esque, arbitrarily choose the first; do not call 5638169689Skan objc_comptypes(). 5639169689Skan (comptypes): Do not call objc_comptypes(). 5640169689Skan (convert_for_assignment): Call objc_compare_types(). 5641169689Skan (comp_ptr_ttypes_real): Call objc_type_quals_match() before 5642169689Skan concluding that types do not match. 5643117395Skan 5644169689Skan2005-05-24 Andrew Pinski <pinskia@physics.uc.edu> 5645117395Skan 5646169689Skan PR C++/21645 5647169689Skan * optimize.c (update_cloned_parm): Copy the TYPE also from the 5648169689Skan original one. 5649117395Skan 5650169689Skan2005-05-19 Jakub Jelinek <jakub@redhat.com> 5651117395Skan 5652169689Skan PR c++/21495 5653169689Skan * decl.c (grokdeclarator): Fix "storage class specified for" 5654169689Skan error reporting. 5655117395Skan 5656169689Skan2005-05-19 Kazu Hirata <kazu@cs.umass.edu> 5657117395Skan 5658169689Skan * parser.c: Fix comment typos. 5659110611Skan 5660169689Skan2005-05-18 Geoffrey Keating <geoffk@apple.com> 5661117395Skan 5662169689Skan * Make-lang.in (cc1plus-dummy): New. 5663169689Skan (cc1plus-checksum.c): New. 5664169689Skan (cc1plus-checksum.o): New. 5665169689Skan (cc1plus): Add cc1plus-checksum.o. 5666117395Skan 5667169689Skan2005-05-17 H.J. Lu <hongjiu.lu@intel.com> 5668117395Skan 5669169689Skan PR C++/19664 5670169689Skan * decl2.c (determine_visibility): Don't set visibility to 5671169689Skan hidden if it has been set explicitly by user. 5672117395Skan 5673169689Skan2005-05-17 Ziemowit Laski <zlaski@apple.com> 5674169689Skan Mike Stump <mrs@apple.com> 5675117395Skan 5676169689Skan Yet more Objective-C++... 5677117395Skan 5678169689Skan * cp-objcp-common.h (cxx_get_alias_set): Move from 5679169689Skan here... 5680169689Skan (cxx_warn_unused_global_decl): Likewise. 5681169689Skan (cp_expr_size): Likewise. 5682169689Skan (cp_tree_size): Likewise. 5683169689Skan (cp_var_mod_type_p): Likewise. 5684169689Skan (cxx_initialize_diagnostics): Likewise. 5685169689Skan (cxx_types_compatible_p): Likewise. 5686169689Skan * cp-tree.h: to here. 5687169689Skan (do_poplevel): Add. 5688169689Skan * lex.c (D_OBJC): Add. 5689169689Skan (init_reswords): Add. 5690169689Skan * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h. 5691169689Skan * parser.c: Add c-common.h include. 5692169689Skan * pt.c: Add c-common.h and cp-objcp-common.h includes. 5693169689Skan (template_args_equal): Use objc_comptypes as well. 5694169689Skan (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well. 5695169689Skan * semantics.c (do_poplevel): Remove static. 5696117395Skan 5697169689Skan * decl.c (objc_mark_locals_volatile): Don't change decls that are 5698169689Skan already ok. 5699169689Skan * decl2.c (generate_ctor_or_dtor_function): Add code to initialize 5700169689Skan Objective C++ early enough. 5701169689Skan * lex.c (struct resword reswords): Add Objective-C++ support. 5702169689Skan * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++. 5703169689Skan (cp_parser_objc_message_receiver): Add. 5704169689Skan (cp_parser_objc_message_args): Likewise. 5705169689Skan (cp_parser_objc_message_expression): Likewise. 5706169689Skan (cp_parser_objc_encode_expression): Likewise. 5707169689Skan (cp_parser_objc_defs_expression): Likewise. 5708169689Skan (cp_parser_objc_protocol_expression): Likewise. 5709169689Skan (cp_parser_objc_selector_expression): Likewise. 5710169689Skan (cp_parser_objc_expression): Likewise. 5711169689Skan (cp_parser_objc_visibility_spec): Likewise. 5712169689Skan (cp_parser_objc_method_type): Likewise. 5713169689Skan (cp_parser_objc_protocol_qualifiers): Likewise. 5714169689Skan (cp_parser_objc_typename): Likewise. 5715169689Skan (cp_parser_objc_selector_p): Likewise. 5716169689Skan (cp_parser_objc_selector): Likewise. 5717169689Skan (cp_parser_objc_method_keyword_params): Likewise. 5718169689Skan (cp_parser_objc_method_tail_params_opt): Likewise. 5719169689Skan (cp_parser_objc_interstitial_code): Likewise. 5720169689Skan (cp_parser_objc_method_signature): Likewise. 5721169689Skan (cp_parser_objc_method_prototype_list): Likewise. 5722169689Skan (cp_parser_objc_method_definition_list): Likewise. 5723169689Skan (cp_parser_objc_class_ivars): Likewise. 5724169689Skan (cp_parser_objc_identifier_list): Likewise. 5725169689Skan (cp_parser_objc_alias_declaration): Likewise. 5726169689Skan (cp_parser_objc_class_declaration): Likewise. 5727169689Skan (cp_parser_objc_protocol_declaration): Likewise. 5728169689Skan (cp_parser_objc_protocol_refs_opt): Likewise. 5729169689Skan (cp_parser_objc_superclass_or_category): Likewise. 5730169689Skan (cp_parser_objc_class_interface): Likewise. 5731169689Skan (cp_parser_objc_class_implementation): Likewise. 5732169689Skan (cp_parser_objc_end_implementation): Likewise. 5733169689Skan (cp_parser_objc_declaration): Likewise. 5734169689Skan (cp_parser_objc_try_catch_finally_statement): Likewise. 5735169689Skan (cp_parser_objc_synchronized_statement): Likewise. 5736169689Skan (cp_parser_objc_throw_statement): Likewise. 5737169689Skan (cp_parser_objc_statement): Likewise. 5738169689Skan (cp_parser_primary_expression): Add Objective-C++. 5739169689Skan (cp_parser_statement): Likewise. 5740169689Skan (cp_parser_declaration): Likewise. 5741169689Skan (cp_parser_simple_type_specifier): Likewise. 5742169689Skan (cp_parser_type_name): Likewise. 5743169689Skan (cp_parser_parameter_declaration_list): Likewise. 5744169689Skan (cp_parser_member_declaration) Likewise. 5745169689Skan * tree.c: Include debug.h. 5746169689Skan * typeck.c (composite_pointer_type): Add Objective-C++ support. 5747169689Skan (finish_class_member_access_expr): Likewise. 5748169689Skan (build_function_call): Allow objc to rewrite FUNCTION_DECLs. 5749169689Skan (build_modify_expr): Allow objc to generate write barriers. 5750117395Skan 5751169689Skan * Make-lang.in (cp/tree.o): Add debug.h. 5752169689Skan * tree.c (lvalue_p_1, case CONST_DECL): Add. 5753117395Skan 5754169689Skan2005-05-18 Jan Hubicka <jh@suse.cz> 5755117395Skan 5756169689Skan * method.c: Include tree-pass.h 5757169689Skan (use_thunk): Lower body before expanding. 5758117395Skan 5759169689Skan2005-05-17 Jakub Jelinek <jakub@redhat.com> 5760117395Skan 5761169689Skan PR c++/21454 5762169689Skan * decl.c (maybe_deduce_size_from_array_init): Call 5763169689Skan cp_apply_type_quals_to_decl after completing array type. 5764117395Skan 5765169689Skan2005-05-16 Richard Henderson <rth@redhat.com> 5766117395Skan 5767169689Skan * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ... 5768169689Skan (build_library_fn): ... here. 5769117395Skan 5770169689Skan2005-05-12 Ian Lance Taylor <ian@airs.com> 5771117395Skan 5772169689Skan * cp-tree.h (cp_stmt_codes): Don't define. 5773169689Skan (statement_code_p): Declare. 5774169689Skan (STATEMENT_CODE_P): Define. 5775169689Skan * lex.c (statement_code_p): Define. 5776169689Skan (cxx_init): Use actual codes in stmt_codes initializer, not 5777169689Skan cp_stmt_codes macro. Initialize statement_code_p directly, rather 5778169689Skan than using INIT_STATEMENT_CODES. 5779117395Skan 5780169689Skan2005-05-09 Mark Mitchell <mark@codesourcery.com> 5781117395Skan 5782169689Skan * typeck.c (build_unary_op): Do not resort to address arithmetic 5783169689Skan when taking the address of a COMPONENT_REF. 5784117395Skan 5785169689Skan2005-05-08 Kazu Hirata <kazu@cs.umass.edu> 5786117395Skan 5787169689Skan * class.c (vtbl_init_data_s): Change the type of fns to 5788169689Skan VEC(tree,gc)*. 5789169689Skan (build_vtbl_initializer, add_vcall_offset, add_vcall_offset): 5790169689Skan Use VEC instead of VARRAY. 5791117395Skan 5792169689Skan2005-05-07 Richard Sandiford <rsandifo@redhat.com> 5793117395Skan 5794169689Skan * mangle.c: Remove a reference to the MIPS -mint64 option. 5795117395Skan 5796169689Skan2005-05-07 Kazu Hirata <kazu@cs.umass.edu> 5797117395Skan 5798169689Skan * decl.c (wrapup_globals_for_namespace): Use VEC instead of 5799169689Skan VARRAY. 5800169689Skan * name-lookup.c (add_decl_to_level, begin_scope): Likewise. 5801169689Skan * name-lookup.h (cp_binding_level): Change the type of 5802169689Skan static_decls to VEC(tree,gc)*. 5803117395Skan 5804169689Skan * mangle.c (globals): Change the type of substitutions to 5805169689Skan VEC(tree,gc)*. 5806169689Skan (dump_substitution_candidates, add_substitution, 5807169689Skan find_substitution, finish_mangling, init_mangle): Use VEC 5808169689Skan instead of VARRAY. 5809117395Skan 5810169689Skan2005-05-06 Kazu Hirata <kazu@cs.umass.edu> 5811117395Skan 5812169689Skan * decl2.c (spew_debug): Remove. 5813117395Skan 5814169689Skan * decl2.c (ssdf_decls, start_static_storage_duration_function, 5815169689Skan generate_ctor_or_dtor_function): Use VEC instead of VARRAY. 5816117395Skan 5817169689Skan * decl2.c (pending_statics, note_vague_linkage_var, 5818169689Skan cp_finish_file): Use VEC instead of VARRAY. 5819169689Skan (pending_statics_used): Remove. 5820117395Skan 5821169689Skan2005-05-05 Kazu Hirata <kazu@cs.umass.edu> 5822117395Skan 5823169689Skan * decl2.c (deferred_fns, note_vague_linkage_fn, 5824169689Skan cp_finish_file): Use VEC instead of VARRAY. 5825117395Skan 5826169689Skan2005-05-05 Mark Mitchell <mark@codesourcery.com> 5827117395Skan 5828169689Skan PR c++/21352 5829169689Skan * pt.c (build_non_dependent_expr): Use is_overloaded_fn. 5830117395Skan 5831169689Skan2005-05-05 Kazu Hirata <kazu@cs.umass.edu> 5832117395Skan 5833169689Skan * pt.c: Fix a comment typo. 5834117395Skan 5835169689Skan2005-05-04 Kazu Hirata <kazu@cs.umass.edu> 5836117395Skan 5837169689Skan * cp-tree.h (language_function): Change the type of 5838169689Skan x_local_names to VEC. 5839169689Skan * decl.c (push_local_name): Adjust uses of local_names. 5840117395Skan 5841169689Skan2005-05-03 Kazu Hirata <kazu@cs.umass.edu> 5842117395Skan 5843169689Skan * friend.c, lex.c, mangle.c, repo.c: Update copyright. 5844117395Skan 5845169689Skan2005-05-02 Kazu Hirata <kazu@cs.umass.edu> 5846117395Skan 5847169689Skan * class.c (local_classes, init_class_processing): Use VEC 5848169689Skan instead of VARRAY. 5849169689Skan * cp-tree.h (local_classes): Likewise. 5850169689Skan * mangle.c (discriminator_for_local_entity): Likewise. 5851169689Skan * name-lookup.c (pushtag): Likewise. 5852117395Skan 5853169689Skan * class.c (current_lang_depth, push_lang_context, 5854169689Skan pop_lang_context): Use VEC instead of VARRAY. 5855169689Skan * cp-tree.h (saved_scope): Use VEC for lang_base instead of 5856169689Skan VARRAY. 5857169689Skan * name-lookup.c (push_to_top_level): Use VEC instead of 5858169689Skan VARRAY. 5859117395Skan 5860169689Skan2005-05-02 Paolo Bonzini <bonzini@gnu.org> 5861117395Skan 5862169689Skan * semantics.c (finish_call_expr): Call resolve_overloaded_builtin 5863169689Skan for BUILT_IN_MD built-ins. 5864117395Skan 5865169689Skan2005-05-02 Michael Matz <matz@suse.de> 5866110611Skan 5867169689Skan PR c++/19542 5868169689Skan * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C 5869169689Skan common frontend. 5870169689Skan (null_node): Remove. 5871169689Skan * lex.c (cxx_init): Move null_node initialisation to C common frontend. 5872110611Skan 5873169689Skan2005-04-25 Ian Lance Taylor <ian@airs.com> 5874117395Skan 5875169689Skan * cp-tree.def: Add EXPR_STMT. 5876169689Skan * cp-tree.h (cp_stmt_codes): Add EXPR_STMT. 5877169689Skan (EXPR_STMT_EXPR): Define. 5878169689Skan * cp-gimplify.c: Include "flags.h". 5879169689Skan (gimplify_expr_stmt): New static function. 5880169689Skan (cp_gimplify_expr): Handle EXPR_STMT. 5881169689Skan * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression 5882169689Skan rather than pp_expression. 5883169689Skan (pp_cxx_statement): Handle EXPR_STMT. 5884169689Skan * dump.c (cp_dump_tree): Handle EXPR_STMT. 5885169689Skan * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes 5886169689Skan initializer. 5887117395Skan 5888169689Skan2005-04-25 Andrew Pinski <pinskia@physics.uc.edu> 5889110611Skan 5890169689Skan PR C++/21188 5891169689Skan * rtti.c (ifnonnull): Cast the zero comparison operand 5892169689Skan to the correct type. 5893110611Skan 5894169689Skan2005-04-24 Jakub Jelinek <jakub@redhat.com> 5895117395Skan 5896169689Skan PR middle-end/20991 5897169689Skan * class.c: Include cgraph.h. 5898169689Skan (cp_fold_obj_type_ref): Set node->local.vtable_method. 5899169689Skan * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H). 5900117395Skan 5901169689Skan2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com> 5902117395Skan 5903169689Skan * mangle.c (write_builtin_type): Handle integer types which are 5904169689Skan not one of the shared integer type nodes and emit a "vendor 5905169689Skan extended builtin type" with an encoding in the form of "u5int96". 5906117395Skan 5907169689Skan2005-04-24 Ian Lance Taylor <ian@airs.com> 5908117395Skan 5909169689Skan * cp-tree.def (USING_STMT): Change class to tcc_statement. 5910169689Skan (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise. 5911169689Skan (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise. 5912169689Skan (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise. 5913117395Skan 5914169689Skan2005-04-23 DJ Delorie <dj@redhat.com> 5915110611Skan 5916169689Skan * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c, 5917169689Skan init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c, 5918169689Skan repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning() 5919169689Skan callers. 5920117395Skan 5921169689Skan2005-04-22 Per Bothner <per@bothner.com> 5922110611Skan 5923169689Skan * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if 5924169689Skan input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__. 5925117395Skan 5926169689Skan2005-04-22 Alexandre Oliva <aoliva@redhat.com> 5927117395Skan 5928169689Skan PR c++/21087 5929169689Skan * name-lookup.c (push_overloaded_decl): Do not overload with 5930169689Skan non-duplicate anticipated built-in. 5931110611Skan 5932169689Skan2005-04-21 Kazu Hirata <kazu@cs.umass.edu> 5933110611Skan 5934169689Skan * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT, 5935169689Skan VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove. 5936110611Skan 5937169689Skan2005-04-21 Nathan Sidwell <nathan@codesourcery.com> 5938110611Skan 5939169689Skan * cp-tree.h: Adjust for new VEC API. 5940169689Skan Define VEC(tree_pair_s,gc). 5941169689Skan (struct save_scope): Adjust. 5942169689Skan (struct lang_type_class): Adjust. 5943169689Skan (unemitted_tinfo_decls): Adjust. 5944169689Skan * class.c (add_method, resort_type_method_vec, 5945169689Skan finish_struct_methods, struct find_final_overrider_data, 5946169689Skan dfs_find_final_overrider_pre, find_final_overrider, 5947169689Skan get_vcall_index, warn_hidden, walk_subobject_offsets, 5948169689Skan check_methods, fixup_inline_methods, end_of_class, 5949169689Skan warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer, 5950169689Skan add_vcall_offset): Adjust. 5951169689Skan * decl.c (xref_basetypes, finish_method): Adjust. 5952169689Skan * decl2.c (check_classfn): Adjust. 5953169689Skan * init.c (sort_mem_initializers, push_base_cleanups): Adjust. 5954169689Skan * method.c (do_build_copy_constructor): Adjust. 5955169689Skan * name-lookup.c (new_class_binding, store_binding, 5956169689Skan store_bindings, store_class_bindings): Adjust. 5957169689Skan * name-lookup.h: Define VEC(cxx_saved_binding,gc), 5958169689Skan VEC(cp_class_binding,gc). 5959169689Skan (struct cp_binding_level): Adjust. 5960169689Skan * parser.c: Define VEC(cp_token_position,heap). 5961169689Skan (struct cp_lexer): Adjust. 5962169689Skan (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy, 5963169689Skan cp_lexer_save_tokens): Adjust. 5964169689Skan * pt.c (retrieve_specialization, 5965169689Skan check_explicit_specialization): Adjust. 5966169689Skan * rtti.c (unemitted_tinfo_decls): Adjust. 5967169689Skan (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init, 5968169689Skan get_pseudo_ti_desc): Adjust. 5969169689Skan * search.c (dfs_access_in_type, lookup_conversion_operator, 5970169689Skan lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible, 5971169689Skan dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust. 5972169689Skan * semantics.c: Define VEC(deferred_access,gc). 5973169689Skan (push_deferring_access_checks): Adjust. 5974169689Skan * typeck2.c (abstract_virtuals_error): Adjust. 5975110611Skan 5976169689Skan2005-04-20 Ian Lance Taylor <ian@airs.com> 5977110611Skan 5978169689Skan * cp-tree.def: Add STMT_EXPR. 5979169689Skan * cp-tree.h (STMT_EXPR_NO_SCOPE): Define. 5980169689Skan (STMT_EXPR_STMT): Define. 5981169689Skan * cxx-pretty-print.c (pp_cxx_primary_expression): Handle 5982169689Skan STMT_EXPR. 5983169689Skan (pp_cxx_expression): Likewise. 5984169689Skan (pp_cxx_statement): Call pp_cxx_statement, not pp_statement. 5985169689Skan * dump.c (cp_dump_tree): Handle STMT_EXPR. 5986110611Skan 5987169689Skan2005-04-18 Kazu Hirata <kazu@cs.umass.edu> 5988117395Skan 5989169689Skan * decl.c (expand_static_init): Call build2 and build3 instead 5990169689Skan of build. 5991110611Skan 5992169689Skan * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove. 5993107590Sobrien 5994169689Skan2005-04-17 Ian Lance Taylor <ian@airs.com> 5995107590Sobrien 5996169689Skan * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR. 5997169689Skan * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle 5998169689Skan ARROW_EXPR. 5999169689Skan (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR. 6000169689Skan (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and 6001169689Skan ALIGNOF_EXPR. 6002169689Skan * typeck.c (cxx_sizeof_or_alignof_type): Update call to 6003169689Skan c_sizeof_or_alignof_type for change in parameter type. 6004107590Sobrien 6005169689Skan2005-04-16 Mark Mitchell <mark@codesourcery.com> 6006107590Sobrien 6007169689Skan PR c++/21025 6008169689Skan * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to 6009169689Skan which sizeof/alignof is dependent, rather than just whether we are 6010169689Skan processing_template_decl. 6011117395Skan 6012169689Skan2005-04-17 Kazu Hirata <kazu@cs.umass.edu> 6013107590Sobrien 6014169689Skan * cp-tree.h (LOOKUP_GLOBAL): Remove. 6015169689Skan (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION, 6016169689Skan LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES, 6017169689Skan LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust 6018169689Skan their values. 6019107590Sobrien 6020169689Skan2005-04-15 Richard Henderson <rth@redhat.com> 6021107590Sobrien 6022169689Skan PR middle-end/14311 6023169689Skan * semantics.c (finish_call_expr): Call resolve_overloaded_builtin. 6024107590Sobrien 6025169689Skan2005-04-15 Kazu Hirata <kazu@cs.umass.edu> 6026107590Sobrien 6027169689Skan * cp-tree.h (lang_type_class): Remove redefined. Move 6028169689Skan java_interface into where redefined was. Increment the width 6029169689Skan of dummy. 6030169689Skan (TYPE_REDEFINED): Remove. 6031107590Sobrien 6032169689Skan2005-04-14 Kazu Hirata <kazu@cs.umass.edu> 6033117395Skan 6034169689Skan * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS, 6035169689Skan CLASSTYPE_TEMPLATE_LEVEL): Remove. 6036104752Skan 6037169689Skan2005-04-11 Mark Mitchell <mark@codesourcery.com> 6038104752Skan 6039169689Skan * decl2.c (determine_visibility): Don't use export_class_data. 6040169689Skan (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and 6041169689Skan TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY. 6042117395Skan 6043169689Skan2005-04-09 Kazu Hirata <kazu@cs.umass.edu> 6044117395Skan 6045169689Skan * cp-tree.h (cxx_alignof): Remove. 6046104752Skan 6047169689Skan * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove. 6048104752Skan 6049169689Skan * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST, 6050169689Skan CONV_STATIC_CAST): Remove. 6051104752Skan 6052169689Skan * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove. 6053104752Skan 6054169689Skan * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove. 6055104752Skan 6056169689Skan * cp-tree.h (cp_deprecated): Remove. 6057104752Skan 6058169689Skan2005-04-08 Ian Lance Taylor <ian@airs.com> 6059104752Skan 6060169689Skan * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT, 6061169689Skan CONTINUE_STMT, SWITCH_STMT. 6062169689Skan * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT, 6063169689Skan BREAK_STMT, CONTINUE_STMT, SWITCH_STMT. 6064169689Skan (WHILE_COND, WHILE_BODY): Define. 6065169689Skan (DO_COND, DO_BODY): Define. 6066169689Skan (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define. 6067169689Skan (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define. 6068169689Skan * cp-gimplify.c (enum bc_t): Define. 6069169689Skan (struct cp_gimplify_ctx, ctxp): Define. 6070169689Skan (push_context, pop_context): New static functions. 6071169689Skan (begin_bc_block, finish_bc_block): New static functions. 6072169689Skan (build_bc_goto): New static function. 6073169689Skan (gimplify_cp_loop, gimplify_for_stmt): New static functions. 6074169689Skan (gimplify_while_stmt, gimplify_do_stmt): Likewise. 6075169689Skan (gimplify_switch_stmt): Likewise. 6076169689Skan (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT, 6077169689Skan SWITCH_STMT, CONTINUE_STMT, BREAK_STMT. 6078169689Skan (cp_genericize): Call push_context and pop_context. 6079169689Skan * semantics.c (finish_break_stmt): Just call build_stmt 6080169689Skan (BREAK_STMT) rather than build_break_stmt. 6081169689Skan (finish_continue_stmt): Corresponding change. 6082169689Skan * decl.c (pop_switch): Update call to c_do_switch_warnings for new 6083169689Skan parameters. 6084169689Skan * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT, 6085169689Skan WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT. 6086169689Skan * dump.c (cp_dump_tree): Likewise. 6087104752Skan 6088169689Skan2005-04-08 Mark Mitchell <mark@codesourcery.com> 6089104752Skan 6090169689Skan PR c++/20905 6091169689Skan * parser.c (cp_parser_type_specifier_seq): Add is_condition 6092169689Skan parameter. 6093169689Skan (cp_parser_new_type_id): Pass it. 6094169689Skan (cp_parser_condition): Likewise. 6095169689Skan (cp_parser_conversion_type_id): Likewise. 6096169689Skan (cp_parser_type_id): Likewise. 6097169689Skan (cp_parser_type_specifier_seq): In a condition, do not allow 6098169689Skan invalid type-specifier combinations. 6099169689Skan (cp_parser_exception_declaration): Adjust call to 6100169689Skan cp_parser_type_specifier_seq. 6101117395Skan 6102169689Skan * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P. 6103169689Skan * cp-tree.h (struct tinst_level): Add in_system_header_p. 6104169689Skan (TINST_IN_SYSTEM_HEADER_P): New macro. 6105169689Skan (make_tinst_level): Remove. 6106169689Skan * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on 6107169689Skan the instantiated class. 6108169689Skan (push_tinst_level): Do not use make_tinst_level. Set 6109169689Skan TINST_IN_SYSTEM_HEADER_P. 6110169689Skan (pop_tinst_level): Likewise. 6111169689Skan (instantiate_class_template): Set in_system_header. 6112169689Skan (instantiate_pending_templates): Likewise. 6113169689Skan * tree.c (make_tinst_level): Remove. 6114117395Skan 6115169689Skan2005-04-06 Joseph S. Myers <joseph@codesourcery.com> 6116104752Skan 6117169689Skan * decl.c (start_decl): Apply pending #pragma weak regardless of 6118169689Skan scope. 6119104752Skan 6120169689Skan2005-04-06 Mark Mitchell <mark@codesourcery.com> 6121117395Skan 6122169689Skan PR c++/20212 6123169689Skan * pt.c (regenerate_decl_from_template): Copy attributes for 6124169689Skan parameters from the pattern to the instantiation. 6125117395Skan 6126169689Skan2005-04-05 Mark Mitchell <mark@codesourcery.com> 612752284Sobrien 6128169689Skan PR c++/20734 6129169689Skan * cp-tree.def (OFFSET_REF): Correct comments. 6130169689Skan * init.c (build_offset_ref): Remove misleading comment. 6131169689Skan * typeck.c (build_unary_op): Handle pointer-to-member creation 6132169689Skan here, rather than ... 6133169689Skan (unary_complex_lvalue): ... here. 613452284Sobrien 6135169689Skan2005-04-06 Jason Merrill <jason@redhat.com> 613618334Speter 6137169689Skan PR c++/19312 6138169689Skan * tree.c (stabilize_init): Don't bother trying to stabilize 6139169689Skan something with no side-effects. 614018334Speter 6141169689Skan2005-04-05 Mark Mitchell <mark@codesourcery.com> 614218334Speter 6143169689Skan PR c++/20763 6144169689Skan * decl.c (grokdeclarator): Correct attribute handling. 614518334Speter 6146169689Skan2005-04-05 Mark Mitchell <mark@codesourcery.com> 614718334Speter 6148169689Skan PR c++/19159 6149169689Skan * decl2.c (import_export_decl): Use non-COMDAT external linkage 6150169689Skan for virtual tables, typeinfo, etc. that will be emitted in only 6151169689Skan one translation unit on systems without weak symbols. 615218334Speter 6153169689Skan2005-04-04 Mark Mitchell <mark@codesourcery.com> 615418334Speter 6155169689Skan PR c++/20679 6156169689Skan * parser.c (cp_parser_template_name): Fix thinko. 615718334Speter 6158169689Skan2005-04-04 Nathan Sidwell <nathan@codesourcery.com> 615918334Speter 6160169689Skan PR c++/20746 6161169689Skan * method.c (use_thunk): Protect covariant pointer return 6162169689Skan adjustments from NULL pointers. 616318334Speter 6164169689Skan2005-04-04 Jan Hubicka <jh@suse.cz> 616518334Speter 6166169689Skan * decl2.c (finish_objects): Revert my previous patch. 6167169689Skan (cp_finish_file): Likewise. 616818334Speter 6169169689Skan2005-04-03 Kazu Hirata <kazu@cs.umass.edu> 617018334Speter 6171169689Skan * pt.c: Fix comment typos. 617218334Speter 6173169689Skan2005-04-03 Nathan Sidwell <nathan@codesourcery.com> 617418334Speter 6175169689Skan PR c++/20723 6176169689Skan * pt.c (more_specialized_fn): Member functions are unordered wrt 6177169689Skan non-members. Conversion operators are unordered wrt other 6178169689Skan functions. 617918334Speter 6180169689Skan2005-04-01 Nathan Sidwell <nathan@codesourcery.com> 618118334Speter 6182169689Skan * call.c (add_template_candidates_real): Remove length parameter 6183169689Skan from fn_type_unification call. 6184169689Skan * class.c (resolve_address_of_overloaded_function): Likewise 6185169689Skan * cp-tree.h (fn_type_unification): Remove length parameter. 6186169689Skan * pt.c (get_bindings_overload): Remove. 6187169689Skan (get_bindings_real): Rename to ... 6188169689Skan (get_bindings): ... here. Remove length and strict 6189169689Skan parameters. Change return type flag to boolean. Remove original 6190169689Skan forwarding function. 6191169689Skan (determine_specialization): Adjust get_bindings call. 6192169689Skan (fn_type_unification): Remove length parameter. Adjust. 6193169689Skan (type_unification_real): Remove length parameter. Adjust. 6194169689Skan (resolve_overloaded_unification): Adjust get_bindings call. 6195169689Skan (try_one_overload): Simplify confusing cascaded if control flow. 6196169689Skan (unify): Remove length paramter from type_unification_real call. 6197169689Skan (most_specialized_instantiation): Adjust get_bindings calls. 6198169689Skan (most_specialized): Likewise. 619918334Speter 6200169689Skan2005-03-31 Nathan Sidwell <nathan@codesourcery.com> 620118334Speter 6202169689Skan PR c++/19203, implement DR 214 6203169689Skan * call.c (joust): Use more_specialized_fn. 6204169689Skan * cp-tree.h (DEDUCE_ORDER): Remove. 6205169689Skan (more_specialized): Replace with ... 6206169689Skan (more_specialized_fn): ... this. 6207169689Skan * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER 6208169689Skan case. 6209169689Skan (type_unification_real): Remove DEDUCE_ORDER case. 6210169689Skan (more_specialized): Replace with ... 6211169689Skan (more_specialized_fn): ... this. Implement DR 214. 6212169689Skan (most_specialized_instantiation): Use get_bindings_real directly. 621318334Speter 6214169689Skan2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net> 621518334Speter 6216169689Skan PR c++/18644 6217169689Skan * call.c (build_new_op): Remove check for -Wsynth. 621818334Speter 6219169689Skan2005-03-31 Jan Hubicka <jh@suse.cz> 622018334Speter 6221169689Skan * decl2.c (finish_objects): Mark ctor as needed. 6222169689Skan (cp_finish_file): Output variables only in nonunit-at-a-time. 622318334Speter 6224169689Skan2005-03-29 Richard Henderson <rth@redhat.com> 622518334Speter 6226169689Skan PR c/20519 6227169689Skan * decl.c (cp_complete_array_type): Rename from complete_array_type. 6228169689Skan Use the new complete_array_type in c-common.c. Update all callers. 6229169689Skan * cp-tree.h (cp_complete_array_type): Update to match. 623018334Speter 6231169689Skan2005-03-24 Geoffrey Keating <geoffk@apple.com> 623218334Speter 6233169689Skan * typeck.c (build_static_cast_1): Allow scalar_cast between 6234169689Skan any integral, floating, or enumeration type. 623518334Speter 6236169689Skan2005-03-24 Steven Bosscher <stevenb@suse.de> 623718334Speter 6238169689Skan * typeck.c (comptypes): First determine if the types are compatible 6239169689Skan from a target-independent point of view. Check target attributes 6240169689Skan last. 624118334Speter 6242169689Skan * class.c (build_base_path): 6243169689Skan (build_vbase_offset_vtbl_entries): 6244169689Skan (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN. 6245169689Skan * error.c (dump_expr): Likewise. 6246169689Skan * init.c (build_zero_init, expand_cleanup_for_base, 6247169689Skan build_vec_delete_1): Likewise. 6248169689Skan * mangle.c (write_integer_cst): Likewise. 6249169689Skan * method.c (thunk_adjust): Likewise. 6250169689Skan * pt.c (convert_nontype_argument, tsubst, unify): Likewise. 6251169689Skan * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise. 6252169689Skan * typeck.c (build_ptrmemfunc_access_expr, 6253169689Skan (get_member_function_from_ptrfunc): Likewise. 625418334Speter 6255169689Skan2005-03-23 Joseph S. Myers <joseph@codesourcery.com> 625618334Speter 6257169689Skan * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove. 625818334Speter 6259169689Skan2005-03-23 Joseph S. Myers <joseph@codesourcery.com> 626018334Speter 6261169689Skan * cp-tree.h (perform_integral_promotions): Remove. 6262169689Skan (default_conversion): Add. 626318334Speter 6264169689Skan2005-03-22 Mark Mitchell <mark@codesourcery.com> 626518334Speter 6266169689Skan * parser.c (cp_parser_warn_min_max): New function. 6267169689Skan (cp_parser_binary_expression): Use it. 6268169689Skan (cp_parser_assignment_operator_opt): Likewise. 6269169689Skan (cp_parser_operator): Likewise. 627018334Speter 6271169689Skan2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 627218334Speter 6273169689Skan PR c++/19980 6274169689Skan * decl.c (start_preparsed_function): Robustify. 627518334Speter 6276169689Skan2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 627718334Speter 6278169689Skan PR c++/20499 6279169689Skan * parser.c (cp_parser_class_head): Return NULL_TREE when 6280169689Skan encountering a redefinition. 628118334Speter 6282169689Skan2005-03-22 Nathan Sidwell <nathan@codesourcery.com> 628318334Speter 6284169689Skan PR c++/20465 6285169689Skan PR c++/20381 6286169689Skan * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a 6287169689Skan template. 628818334Speter 6289169689Skan2005-03-21 Paolo Carlini <pcarlini@suse.de> 629018334Speter 6291169689Skan PR c++/20461 6292169689Skan PR c++/20536 6293169689Skan * init.c (emit_mem_initializers): Don't crash on undefined 6294169689Skan types. 629518334Speter 6296169689Skan2005-03-21 Paolo Carlini <pcarlini@suse.de> 629718334Speter 6298169689Skan PR c++/20147 6299169689Skan * semantics.c (finish_stmt_expr_expr): Return immediately 6300169689Skan if error_operand_p (expr). 630118334Speter 6302169689Skan2005-03-21 Joseph S. Myers <joseph@codesourcery.com> 630318334Speter 6304169689Skan * cp-tree.h (lvalue_or_else, lvalue_p): New. 6305169689Skan * typeck.c (lvalue_or_else): New. Call lvalue_error. 630618334Speter 6307169689Skan2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 630818334Speter 6309169689Skan PR c++/20240 6310169689Skan * decl.c (decls_match): Compare context of VAR_DECL. 631118334Speter 6312169689Skan2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 631318334Speter 6314169689Skan PR c++/20333 6315169689Skan * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>: 6316169689Skan Check the return value of cp_parser_nested_name_specifier. 631718334Speter 6318169689Skan2005-03-18 Dale Johannesen <dalej@apple.com> 631918334Speter 6320169689Skan * cp/tree.c (cp_tree_equal): Handle SSA_NAME. 632118334Speter 6322169689Skan2005-03-18 Paolo Carlini <pcarlini@suse.de> 632318334Speter 6324169689Skan PR c++/20463 6325169689Skan * parser.c (cp_parser_diagnose_invalid_type_name): 6326169689Skan Check TYPE_BINFO (current_class_type) before attempting 6327169689Skan to emit inform messages. 632818334Speter 6329169689Skan2005-03-17 Paolo Carlini <pcarlini@suse.de> 633018334Speter 6331169689Skan PR c++/19966 6332169689Skan * cp-tree.h (grok_op_properties): Change return type to void. 6333169689Skan * decl.c (grok_op_properties): Return early - don't check the 6334169689Skan arity - in case of a static member or an operator that cannot 6335169689Skan be non-member; tidy a bit. 633618334Speter 6337169689Skan2005-03-17 Nathan Sidwell <nathan@codesourcery.com> 633818334Speter 6339169689Skan PR c++/20186 6340169689Skan * pt.c (contains_dependent_cast_p): Remove. 6341169689Skan (fold_non_dependent_expr): Don't use it. 6342169689Skan (value_dependent_expression_p): Use a switch statement. 6343169689Skan reference_exprs can be dependent. 634418334Speter 6345169689Skan2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 634618334Speter 6347169689Skan PR c++/4403 6348169689Skan PR c++/9783, DR433 6349169689Skan * name-lookup.c (pushtag): Skip template parameter scope when 6350169689Skan scope is ts_global. Don't push tag into template parameter 6351169689Skan scope. 6352169689Skan * pt.c (instantiate_class_template): Reorder friend class 6353169689Skan template substitution to handle non-dependent friend class 6354169689Skan that hasn't been previously declared. 635518334Speter 6356169689Skan2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 635718334Speter 6358169689Skan Friend class name lookup 5/n 6359169689Skan PR c++/1016 6360169689Skan * cp-tree.h (pushtag): Adjust declaration. 6361169689Skan * decl.c (lookup_and_check_tag): Call lookup_type_scope if 6362169689Skan lookup_name fails. 6363169689Skan (xref_tag): Adjust call to pushtag. Make hidden class visible. 6364169689Skan (start_enum): Adjust call to pushtag. 6365169689Skan * name-lookup.c (ambiguous_decl): Ignore hidden names. 6366169689Skan (qualify_lookup): Change return type to bool. 6367169689Skan (hidden_name_p): New function. 6368169689Skan (lookup_namespace_name, unqualified_namespace_lookup, 6369169689Skan lookup_name_real): Use it. 6370169689Skan (lookup_type_scope): Update comments. 6371169689Skan (maybe_process_template_type_declaration): Change parameter name 6372169689Skan from globalize to is_friend. 6373169689Skan (pushtag): Change globalize parameter of type int to tag_scope. 6374169689Skan Hide name if introduced by friend declaration. 6375169689Skan * name-lookup.h (hidden_name_p): Add declaration. 6376169689Skan * parser.c (cp_parser_lookup_name): Don't deal with hidden name 6377169689Skan here. 6378169689Skan * pt.c (push_template_decl_real): Make hidden class template 6379169689Skan visible. 6380169689Skan (lookup_template_class, instantiate_class_template): Adjust call 6381169689Skan to pushtag. 6382169689Skan * semantics.c (begin_class_definition): Likewise. 6383169689Skan * rtti.c (init_rtti_processing, build_dynamic_cast_1, 6384169689Skan tinfo_base_init, emit_support_tinfos): Use ts_current instead of 6385169689Skan ts_global. 638618334Speter 6387169689Skan2005-03-13 Mark Mitchell <mark@codesourcery.com> 638818334Speter 6389169689Skan PR c++/20157 6390169689Skan * pt.c (determine_specialization): Reject non-specializations. 639118334Speter 6392169689Skan2005-03-11 Per Bothner <per@bothner.com> 639318334Speter 6394169689Skan * cp-tree.h (struct cp_declarator): New id_loc field. 6395169689Skan * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's 6396169689Skan location using c_lex_with_flags, instead of input_location. 6397169689Skan (cp_parser_direct_declarator): Set declarator's id_loc from 6398169689Skan cp_token's id_loc. 639918334Speter 6400169689Skan2005-03-10 Jakub Jelinek <jakub@redhat.com> 640118334Speter 6402169689Skan PR c++/18384, c++/18327 6403169689Skan * decl.c (reshape_init_array): Use UHWI type for max_index_cst 6404169689Skan and index. Convert max_index to size_type_node if it isn't 6405169689Skan host_integerp (, 1). 640618334Speter 6407169689Skan2005-03-09 Mark Mitchell <mark@codesourcery.com> 640818334Speter 6409169689Skan PR c++/20208 6410169689Skan * pt.c (tsubst_decl): Apply array-to-pointer and 6411169689Skan function-to-pointer conversions to function arguments. 6412169689Skan (regenerate_decl_from_template): Likewise. 641318334Speter 6414169689Skan2005-03-09 Paolo Carlini <pcarlini@suse.de> 641518334Speter 6416169689Skan PR c++/16859 6417169689Skan * decl.c (complete_array_type): In pedantic mode, return 6418169689Skan 3 for an empty initializer list as the initializer for an 6419169689Skan array of unknown bound (8.5.1/4). 6420169689Skan (maybe_deduce_size_from_array_init): Fix final test to use 6421169689Skan the above. 642218334Speter 6423169689Skan2005-03-08 Nathan Sidwell <nathan@codesourcery.com> 642418334Speter 6425169689Skan PR c++/20186 6426169689Skan * pt.c (contains_dependent_cast_p): New. 6427169689Skan (fold_non_dependent_expr): Call it. 642818334Speter 6429169689Skan2005-03-08 Mark Mitchell <mark@codesourcery.com> 643018334Speter 6431169689Skan PR c++/20142 6432169689Skan * cp-tree.h (target_type): Remove. 6433169689Skan * decl.c (layout_var_decl): Remove #if 0'd code. 6434169689Skan (cp_finish_decl): Remove dead code. 6435169689Skan * init.c (build_vec_init): When determining whether or not the 6436169689Skan element type has an asignment operator, look through all array 6437169689Skan dimensions. 6438169689Skan * typeck.c (target_type): Remove. 643918334Speter 6440169689Skan2005-03-07 Mark Mitchell <mark@codesourcery.com> 644118334Speter 6442169689Skan * class.c (finish_struct_1): Do not warn about non-virtual 6443169689Skan destructors in Java classes. 644418334Speter 6445169689Skan2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 644618334Speter 6447169689Skan PR c++/19311 6448169689Skan * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF. 6449169689Skan * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR 6450169689Skan for OFFSET_TYPE. 6451169689Skan * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF. 6452169689Skan Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR. 6453169689Skan (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside 6454169689Skan template. 645518334Speter 6456169689Skan2005-03-02 Alexandre Oliva <aoliva@redhat.com> 645718334Speter 6458169689Skan * name-lookup.c (push_overloaded_decl): Don't error if the new 6459169689Skan decl matches the old one. 6460169689Skan * decl.c (redeclaration_error_message): Likewise. 646118334Speter 6462169689Skan2005-03-01 Per Bothner <per@bothner.com> 646318334Speter 6464169689Skan * decl.c (finish_function): Use SET_EXPR_LOCATION instead of 6465169689Skan unavailable annotate_with_file_line, if USE_MAPPED_LOCATION. 646618334Speter 6467169689Skan2005-03-01 Nathan Sidwell <nathan@codesourcery.com> 646818334Speter 6469169689Skan PR c++/20232 6470169689Skan * class.c (update_vtable_entry_for_fn): Don't crash on invalid 6471169689Skan covariancy. 647218334Speter 6473169689Skan * cp-tree.g (THUNK_TARGET): Expand comment. 6474169689Skan * method.c (use_thunk): Make sure we also use the target, if that 6475169689Skan is a thunk. 647618334Speter 6477169689Skan2005-02-27 Jakub Jelinek <jakub@redhat.com> 647818334Speter 6479169689Skan PR c++/20206 6480169689Skan * decl.c (cxx_comdat_group): Put thunks for 6481169689Skan TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same 6482169689Skan comdat group as the thunk target. 648318334Speter 6484169689Skan2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 648518334Speter 6486169689Skan * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c, 6487169689Skan parser.c: Fix comment typo(s). 648818334Speter 6489169689Skan2005-02-24 Jakub Jelinek <jakub@redhat.com> 649018334Speter 6491169689Skan PR c++/20175 6492169689Skan * decl.c (reshape_init): Don't warn about missing braces if STRING_CST 6493169689Skan initializes a char/wchar_t array. 649418334Speter 6495169689Skan2005-02-23 Mark Mitchell <mark@codesourcery.com> 649618334Speter 6497169689Skan PR c++/19878 6498169689Skan * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations 6499169689Skan with internal linkage. 650018334Speter 6501169689Skan2005-02-23 Alexandre Oliva <aoliva@redhat.com> 650218334Speter 6503169689Skan * decl.c (grokvardecl): Don't exempt anonymous types from having 6504169689Skan linkage for variables that have linkage other than "C". 650518334Speter 6506169689Skan2005-02-23 Kazu Hirata <kazu@cs.umass.edu> 650718334Speter 6508169689Skan * cp-objcp-common.h, error.c: Update copyright. 650918334Speter 6510169689Skan2005-02-22 Mark Mitchell <mark@codesourcery.com> 651118334Speter 6512169689Skan PR c++/20073 6513169689Skan * decl.c (start_decl_1): Don't clear TREE_READONLY. 6514169689Skan (cp_finish_decl): Likewise. 6515169689Skan (complete_vars): Call cp_apply_type_quals_to_decl. 6516169689Skan * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in 6517169689Skan cases where that's not valid. 651818334Speter 6519169689Skan PR c++/19991 6520169689Skan * init.c (integral_constant_value): Iterate if the value of a decl 6521169689Skan is itself a constant. 652218334Speter 6523169689Skan PR c++/20152 6524169689Skan * parser.c (cp_parser_class_head): Check for redefintions here. 6525169689Skan * semantics.c (begin_class_definition): Not here. 652618334Speter 6527169689Skan PR c++/20153 6528169689Skan * decl2.c (build_anon_union_vars): Add type parameter. 6529169689Skan (finish_anon_union): Pass it. 653018334Speter 6531169689Skan PR c++/20148 6532169689Skan * error.c (dump_expr): Do not print the body of a BIND_EXPR. 6533169689Skan Handle STATEMENT_LIST. 653418334Speter 6535169689Skan PR c++/19883 6536169689Skan * parser.c (cp_parser_direct_declarator): Always complain about 6537169689Skan non-constant array bounds when in a function scope. 6538169689Skan * semantics.c (finish_id_expression): Do not mark dependent names 6539169689Skan as non-constant. 654018334Speter 6541169689Skan2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu> 654218334Speter 6543169689Skan PR c++/19076 6544169689Skan PR c++/6628 6545169689Skan * cp-tree.h (cp_apply_type_quals_to_decl): Declared. 6546169689Skan * decl.c (grokdeclarator): Pedwarn about qualifying a function 6547169689Skan type. 6548169689Skan Add qualifiers when declaring a typedef of a function type. 6549169689Skan Member function pointers pick up the qualifiers of the typedef 6550169689Skan used to declare them. 6551169689Skan Don't complain about creating cv-qualified function types. 6552169689Skan Complain about qualified function typedefs that are used to 6553169689Skan declare non-static member functions or free functions. 6554169689Skan Use cp_apply_type_quals_to_decl. 6555169689Skan (start_preparsed_function): Use cp_apply_type_quals_to_decl. 6556169689Skan (grokclassfn): Use cp_apply_type_quals_to_decl. 6557169689Skan * error.c (dump_type_suffix): Print qualifiers for function 6558169689Skan types. 6559169689Skan * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl. 6560169689Skan (tsubst): When substituting a function type into a member 6561169689Skan pointer type, pass along the qualifiers. 6562169689Skan (unify): Unify member pointers to member function pointers. 6563169689Skan * tree.c (cp_build_qualified_type_real): Function types may be 6564169689Skan qualified. This includes restrict qualifiers. 6565169689Skan * typeck.c (cp_apply_type_quals_to_decl): New function to replace 6566169689Skan use of c_apply_type_quals_to_decl. Drops qualifiers that are being 6567169689Skan added to function types. 656818334Speter 6569169689Skan2005-02-20 Zack Weinberg <zack@codesourcery.com> 657018334Speter 6571169689Skan PR 18785 6572169689Skan * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to 6573169689Skan c_common_to_target_charset. Delete bogus comment. 657418334Speter 6575169689Skan2005-02-18 Richard Henderson <rth@redhat.com> 657618334Speter 6577169689Skan PR libstdc++/10606 6578169689Skan * except.c (do_get_exception_ptr): New. 6579169689Skan (expand_start_catch_block): Use it. 658018334Speter 6581169689Skan2005-02-19 Jakub Jelinek <jakub@redhat.com> 658218334Speter 6583169689Skan * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING 6584169689Skan if type is not error_mark_node. 658518334Speter 6586169689Skan2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org> 658718334Speter 6588169689Skan PR c++/19508 6589169689Skan * decl2.c (grokfield): Do not apply attributes to template parameters 6590169689Skan as they are ignored by tsubst anyway. 659118334Speter 6592169689Skan2005-02-18 Jakub Jelinek <jakub@redhat.com> 659318334Speter 6594169689Skan PR c++/19813 6595169689Skan * decl.c (start_decl_1): Clear TREE_READONLY flag if 6596169689Skan its type has TYPE_NEEDS_CONSTRUCTING. 6597169689Skan (complete_vars): Likewise. 659818334Speter 6599169689Skan2005-02-17 Alexandre Oliva <aoliva@redhat.com> 660018334Speter 6601169689Skan PR c++/20028 6602169689Skan * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a 6603169689Skan template along with TYPE_SIZE. 660418334Speter 6605169689Skan PR c++/20022 6606169689Skan * semantics.c (perform_deferred_access_checks): Use 6607169689Skan get_deferred_access_checks to get the top of the stack. 660818334Speter 6609169689Skan2005-02-15 Alexandre Oliva <aoliva@redhat.com> 661018334Speter 6611169689Skan PR c++/17788 6612169689Skan * class.c (add_implicitly_declared_members, check_field_decl) 6613169689Skan (check_field_decls, check_bases): Remove arguments, tests and 6614169689Skan assignments of cant_have_default_ctor-related variables. 661518334Speter 6616169689Skan2005-02-15 Alexandre Oliva <aoliva@redhat.com> 661718334Speter 6618169689Skan * decl2.c (mark_used): Set the source location of the used decl to 6619169689Skan the current input location here... 6620169689Skan * method.c (synthesize_method): ... not here. Set input_location 6621169689Skan from the decl instead. 662218334Speter 6623169689Skan2005-02-14 Nathan Sidwell <nathan@codesourcery.com> 662418334Speter 6625169689Skan PR c++/19608 6626169689Skan * parser.c (cp_parser_late_parsing_for_member): Use 6627169689Skan current_function_decl as scope to push to and from. 662818334Speter 6629169689Skan PR c++/19884 6630169689Skan * pt.c (check_explicit_specialization): Make sure namespace 6631169689Skan binding lookup found an overloaded function. 6632169689Skan (lookup_template_function): Just assert FNS is an overloaded 6633169689Skan function. 663418334Speter 6635169689Skan PR c++/19895 6636169689Skan * decl.c (grokdeclarator): Check for error mark node in ptrmem 6637169689Skan construction. 663818334Speter 6639169689Skan2005-02-14 Alexandre Oliva <aoliva@redhat.com> 664018334Speter 6641169689Skan PR c++/17816 6642169689Skan * decl.c (redeclaration_error_message): Report redefinition of 6643169689Skan pure virtual function. 664418334Speter 6645169689Skan2005-02-14 Nathan Sidwell <nathan@codesourcery.com> 664618334Speter 6647169689Skan PR c++/19891 6648169689Skan * class.c (build_simple_base_path): Build the component_ref 6649169689Skan directly. 6650169689Skan (update_vtable_entry_for_fn): Walk the covariant's binfo chain 6651169689Skan rather than using lookup_base. 6652169689Skan * search.c (dfs_walk_once): Add non-recursive assert check. 6653169689Skan * typeck.c (build_class_member_access_expr): It is possible for 6654169689Skan the member type to be both const and volatile. 665518334Speter 6656169689Skan2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 665718334Speter 6658169689Skan PR c++/14479 6659169689Skan PR c++/19487 6660169689Skan * pt.c (maybe_check_template_type): Remove. 6661169689Skan * cp-tree.h (maybe_check_template_type): Remove prototype. 6662169689Skan * name-lookup.c (maybe_process_template_type_declaration): Don't 6663169689Skan use maybe_check_template_type. 666418334Speter 6665169689Skan2005-02-11 Richard Henderson <rth@redhat.com> 666618334Speter 6667169689Skan PR c++/19632 6668169689Skan * pt.c (get_mostly_instantiated_function_type): Save and restore 6669169689Skan flag_access_control instead of push/pop_access_scope. 667050397Sobrien 6671169689Skan2005-02-10 Mark Mitchell <mark@codesourcery.com> 667250397Sobrien 6673169689Skan PR c++/19755 6674169689Skan * decl.c (reshape_init): Issue warnings about missing braces. 667518334Speter 6676169689Skan2005-02-11 Kazu Hirata <kazu@cs.umass.edu> 667718334Speter 6678169689Skan * cp-tree.def, except.c, ptree.c: Update copyright. 667918334Speter 6680169689Skan2005-02-09 Mark Mitchell <mark@codesourcery.com> 668118334Speter 6682169689Skan PR c++/19811 6683169689Skan * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before 6684169689Skan attempting name lookup. 668518334Speter 6686169689Skan * parser.c (cp_parser_unqualified_id): Initialize type_decl. 668718334Speter 6688169689Skan PR c++/19787 6689169689Skan * call.c (initialize_reference): Robustify. 669018334Speter 6691169689Skan PR ++/19732 6692169689Skan * decl.c (grokdeclarator): Check for invalid use of destructor 6693169689Skan names. 669418334Speter 6695169689Skan PR c++/19762 6696169689Skan * parser.c (cp_parser_unqualified_id): Avoid creating destructor 6697169689Skan names with invalid types. 669818334Speter 6699169689Skan PR c++/19826 6700169689Skan * parser.c (cp_parser_direct_declarator): Allow type-dependent 6701169689Skan expressions as array bounds. 670218334Speter 6703169689Skan PR c++/19739 6704169689Skan * parser.c (cp_parser_attributes_list): Allow empty lists. 670518334Speter 6706169689Skan2005-02-08 Mark Mitchell <mark@codesourcery.com> 670718334Speter 6708169689Skan PR c++/19733 6709169689Skan * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR. 6710169689Skan (check_bases): Give warnings about a base class with a 6711169689Skan non-virtual destructor, even if it is implicit. 6712169689Skan (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR. 6713169689Skan (maybe_warn_about_overly_private_class): Don't use 6714169689Skan TYPE_HAS_DESTRUCTOR. 6715169689Skan (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR. 6716169689Skan (check_for_override): Give it external linkage. 6717169689Skan (add_implicitly_declared_members): Generate destructors lazily. 6718169689Skan (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not 6719169689Skan TYPE_HAS_DESTRUCTOR. 6720169689Skan (check_bases_and_members): Call check_methods before 6721169689Skan check_field_decls. 6722169689Skan (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not 6723169689Skan TYPE_HAS_DESTRUCTOR. 6724169689Skan (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR. 6725169689Skan * cp-tree.def (PSEUDO_DTOR_EXPR): Document. 6726169689Skan * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove. 6727169689Skan (lang_type_class): Add lazy_destructor. 6728169689Skan (CLASSTYPE_LAZY_DESTRUCTOR): New macro. 6729169689Skan (CLASSTYPE_DESTRUCTORS): Robustify. 6730169689Skan (TYPE_HAS_DESTRUCTOR): Remove. 6731169689Skan (check_for_override): Declare. 6732169689Skan (build_vbase_delete): Remove. 6733169689Skan * cvt.c (convert_to_void): Issue errors about pseudo-destructor 6734169689Skan expressions. 6735169689Skan * decl.c (cxx_maybe_build_cleanup): Remove dead code. 6736169689Skan * except.c (dtor_nothrow): Lazily create destructors if necessary. 6737169689Skan (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 6738169689Skan * init.c (build_delete): Lazily create destructors, if necessary. 6739169689Skan (build_vbase_delete): Remove. 6740169689Skan * method.c (locate_dtor): Simplify. 6741169689Skan (implicitly_declare_fn): Add support for destructors. 6742169689Skan * parser.c (cp_parser_lookup_name): Lazily create destructors, if 6743169689Skan necessary. 6744169689Skan * pt.c (check_explicit_specialization): Don't use 6745169689Skan TYPE_HAS_DESTRUCTOR. 6746169689Skan (instantiate_class_template): Likewise. 6747169689Skan * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR. 6748169689Skan * rtti.c (emit_support_tinfos): Robustify. 6749169689Skan * search.c (lookup_fnfields_1): Lazily create destructors. 6750169689Skan * typeck.c (build_class_member_access_expr): Remove 6751169689Skan PSEUDO_DTOR_EXPR handling. 6752169689Skan (lookup_destructor): Likewise. 675318334Speter 6754169689Skan2005-02-08 Kazu Hirata <kazu@cs.umass.edu> 675518334Speter 6756169689Skan * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update 6757169689Skan copyright. 675818334Speter 6759169689Skan2005-02-07 Mark Mitchell <mark@codesourcery.com> 676018334Speter 6761169689Skan * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations 6762169689Skan on boolean variables. 6763169689Skan (cp_lexer_stop_debugging): Likewise. 676418334Speter 6765169689Skan2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org> 676618334Speter 6767169689Skan PR c++/17401 6768169689Skan * parser.c (cp_parser_pure_specifier): Emit a specific error 6769169689Skan message with an invalid pure specifier. 6770169689Skan * decl2.c (grok_function_init): Remove. 6771169689Skan (grokfield): An initializer for a method is a always a pure 6772169689Skan specifier. 677318334Speter 6774169689Skan2005-02-02 Matt Austern <austern@apple.com> 677518334Speter 6776169689Skan PR c++/19628 6777169689Skan * cp-tree.h (builtin_valid_in_constant_expr_p): Declare. 6778169689Skan * parser.c (cp_parser_postfix_expression): Accept function call in 6779169689Skan constant expression if builtin_valid_in_constant_expr_p is true 6780169689Skan for that function. 6781169689Skan * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly. 6782169689Skan * semantics.c (finish_id_expression): Accept function call in constant 6783169689Skan expression if builtin_valid_in_constant_expr_p is true for that 6784169689Skan function. 6785169689Skan * tree.c (builtin_valid_in_constant_expr_p): New. 678618334Speter 6787169689Skan2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 678818334Speter 6789169689Skan PR c++/17413 6790169689Skan * pt.c (check_instantiated_args): Improve error message. 6791169689Skan Fix logic when to print its second part. 679218334Speter 6793169689Skan2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 679418334Speter 6795169689Skan * cp-tree.h (complete_type_or_else): Remove macro. 6796169689Skan (complete_type_or_diagnostic): Rename to complete_type_or_else 6797169689Skan and remove last argument. 6798169689Skan * typeck.c (complete_type_or_diagnostic): Rename to 6799169689Skan complete_type_or_else and remove last argument. 680018334Speter 6801169689Skan2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 680218334Speter 6803169689Skan * cp-tree.h (commonparms): Remove prototype. 6804169689Skan (convert_arguments): Likewise. 6805169689Skan (PFN_FROM_PTRMEMFUNC): Remove. 6806169689Skan * typeck.c (commonparms): Make static. 6807169689Skan (convert_arguments): Add prototype. Make static. 6808169689Skan (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc. 680918334Speter 6810169689Skan2005-01-31 Mark Mitchell <mark@codesourcery.com> 681118334Speter 6812169689Skan * parser.c (cp_parser_primary_expression): Don't complain about 6813169689Skan floating-point literals in integral constant expressions when 6814169689Skan !pedantic. 681518334Speter 6816169689Skan2005-02-01 Alexandre Oliva <aoliva@redhat.com> 681718334Speter 6818169689Skan * parser.c (cp_parser_template_id): Revert comment patch too. 681918334Speter 6820169689Skan PR c++/18757 6821169689Skan PR c++/19366 6822169689Skan PR c++/19499 6823169689Skan * parser.c (cp_parser_template_id): Revert 2004-12-09's patch. 6824169689Skan Issue an error when creating the template id. 6825169689Skan * pt.c (fn_type_unification): Return early if the explicit 6826169689Skan template arg list is an error_mark_node. 682718334Speter 6828169689Skan2005-01-31 Mark Mitchell <mark@codesourcery.com> 682918334Speter 6830169689Skan * decl.c (build_enumerator): Do not issue duplicate error messages 6831169689Skan about invalid enumeration constants. 6832169689Skan * parser.c (cp_parser_non_integral_constant_expression): Always 6833169689Skan set parser->non_integral_constant_expression_p. 6834169689Skan (cp_parser_primary_expression): Add cast_p parameter. Issue 6835169689Skan errors about invalid uses of floating-point literals in 6836169689Skan cast-expressions. 6837169689Skan (cp_parser_postfix_expression): Add cast_p parameter. 6838169689Skan (cp_parser_open_square_expression): Pass it. 6839169689Skan (cp_parser_parenthesized_expression_list): Add cast_p parameter. 6840169689Skan (cp_parser_unary_expression): Likewise. 6841169689Skan (cp_parser_new_placement): Pass it. 6842169689Skan (cp_parser_direct_new_declarator): Likewise. 6843169689Skan (cp_parser_new_initializer): Likewise. 6844169689Skan (cp_parser_cast_expression): Add cast_p parameter. 6845169689Skan (cp_parser_binary_expression): Likewise. 6846169689Skan (cp_parser_question_colon_clause): Likewise. 6847169689Skan (cp_parser_assignment_expression): Likewise. 6848169689Skan (cp_parser_expression): Likewise. 6849169689Skan (cp_parser_constant_expression): If an integral constant 6850169689Skan expression is invalid, return error_mark_node. 6851169689Skan (cp_parser_expression_statement): Pass cast_p. 6852169689Skan (cp_parser_condition): Likewise. 6853169689Skan (cp_parser_iteration_statement): Likewise. 6854169689Skan (cp_parser_jump_statement): Likewise. 6855169689Skan (cp_parser_mem_initializer): Likewise. 6856169689Skan (cp_parser_template_argument): Likewise. 6857169689Skan (cp_parser_parameter_declaration): Likewise. 6858169689Skan (cp_parser_initializer): Likewise. 6859169689Skan (cp_parser_throw_expression): Likewise. 6860169689Skan (cp_parser_attribute_list): Likewise. 6861169689Skan (cp_parser_simple_cast_expression): Likewise. 6862169689Skan (cp_parser_functional_cast): Likewise. 6863169689Skan (cp_parser_late_parsing_default_args): Likewise. 6864169689Skan (cp_parser_sizeof_operand): Save/restore 6865169689Skan non_integral_constant_expression_p. 686618334Speter 6867169689Skan2005-01-31 Mike Stump <mrs@apple.com> 686818334Speter 6869169689Skan * parser.c (cp_lexer_new_main): Get the first token, first, before 6870169689Skan doing anything. 687118334Speter 6872169689Skan2005-01-31 Mark Mitchell <mark@codesourcery.com> 687318334Speter 6874169689Skan * decl.c (start_decl): Add missing parentheses. 687518334Speter 6876169689Skan2005-01-30 Mark Mitchell <mark@codesourcery.com> 687718334Speter 6878169689Skan PR c++/19555 6879169689Skan * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation. 6880169689Skan * decl.c (duplicate_decls): Do not discard 6881169689Skan DECL_IMPLICIT_INSTANTIATION when merging declarations. 6882169689Skan (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for 6883169689Skan variables that do not have DECL_USE_TEMPLATE. 688418334Speter 6885169689Skan PR c++/19395 6886169689Skan * decl.c (grokdeclarator): Refactor code so that qualified names 6887169689Skan are never allowed as the declarator in a typedef. 688818334Speter 6889169689Skan PR c++/19367 6890169689Skan * name-lookup.c (do_nonmember_using_decl): Avoid overloading 6891169689Skan builtin declarations. 689218334Speter 6893169689Skan PR c++/19457 6894169689Skan * call.c (convert_like_real): Inline call to 6895169689Skan dubious_conversion_warnings here. 6896169689Skan * cp-tree.h (dubious_conversion_warnings): Remove. 6897169689Skan * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before 6898169689Skan setting TREE_NEGATED_INT. 6899169689Skan * typeck.c (dubious_conversion_warnings): Remove. 690018334Speter 6901169689Skan PR c++/19349 6902169689Skan * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd 6903169689Skan memory. 690418334Speter 6905169689Skan2005-01-28 Mark Mitchell <mark@codesourcery.com> 690618334Speter 6907169689Skan PR c++/19253 6908169689Skan * parser.c (cp_parser_diagnose_invalid_type_name): Commit to 6909169689Skan tentative parses. 691018334Speter 6911169689Skan PR c++/19667 6912169689Skan * pt.c (redeclare_class_template): Robustify. 691318334Speter 6914169689Skan2005-01-27 Steven Bosscher <stevenb@suse.de> 691518334Speter 6916169689Skan * decl.c (finish_case_label): Use SWITCH_STMT accessor macros 6917169689Skan instead of SWITCH_EXPR ones. 6918169689Skan * pt.c (tsubst_expr): Likewise. 6919169689Skan * semantics.c (begin_switch_stmt, finish_switch_cond, 6920169689Skan finish_switch_stmt): Likewise. 692118334Speter 6922169689Skan2005-01-26 J"orn Rennecke <joern.rennecke@st.com> 692318334Speter 6924169689Skan PR c++/18370 6925169689Skan * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p. 692618334Speter 6927169689Skan2005-01-25 Andrew Pinski <pinskia@physics.uc.edu> 692818334Speter 6929169689Skan * class.c (abort_fndecl_addr): New variable. 6930169689Skan (build_vtbl_initializer): If we have a pure virtual function 6931169689Skan share the abort function's address. 6932169689Skan Include gt-cp-class.h at the end. 6933169689Skan * config-lang.in (gtfiles): Add cp/class.c. 693418334Speter 6935169689Skan2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 693618334Speter 6937169689Skan * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static. 6938169689Skan (pp_cxx_function_definition): Make static. 6939169689Skan * cxx-pretty-print.h (pp_cxx_statement): Remove prototype. 6940169689Skan (pp_cxx_function_definition): Likewise. 694118334Speter 6942169689Skan2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 694318334Speter 6944169689Skan * name-lookup.c (print_binding_level): Make static. 6945169689Skan (constructor_name_full): Make static inline. 6946169689Skan (current_decl_namespace): Make static. 6947169689Skan * name-lookup.h (constructor_name_full): Remove prototype. 6948169689Skan (print_binding_level): Likewise. 6949169689Skan (current_decl_namespace): Likewise. 695018334Speter 6951169689Skan2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 695218334Speter 6953169689Skan * decl.h (debug_bindings_indentation): Remove. 695418334Speter 6955169689Skan2005-01-23 Kazu Hirata <kazu@cs.umass.edu> 695618334Speter 6957169689Skan * typeck.c: Fix a comment typo. 695818334Speter 6959169689Skan2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org> 696018334Speter 6961169689Skan PR c++/19208 6962169689Skan * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr 6963169689Skan at least once. 6964169689Skan (tsubst): Use fold_decl_constant_value in place of a bare call to 6965169689Skan integral_constant_value. 696618334Speter 6967169689Skan2005-01-20 Kazu Hirata <kazu@cs.umass.edu> 696818334Speter 6969169689Skan * typeck.c (more_qualified_p): Remove. 6970169689Skan * cp-tree.h: Remove the corresponding prototype. 697118334Speter 6972169689Skan2005-01-19 Matt Austern <austern@apple.com> 697318334Speter 6974169689Skan * typeck.c (comptypes): Handle return code from objc_comptypes 6975169689Skan correctly. 697618334Speter 6977169689Skan2005-01-19 Kazu Hirata <kazu@cs.umass.edu> 697818334Speter 6979169689Skan * cp-tree.h, name-lookup.h: Remove unused prototypes. 698018334Speter 6981169689Skan2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 698218334Speter 6983169689Skan PR c++/19375 6984169689Skan * semantics.c (finish_id_expression): Disable access checking for 6985169689Skan already lookuped FIELD_DECL. 698618334Speter 6987169689Skan2005-01-18 Kazu Hirata <kazu@cs.umass.edu> 698818334Speter 6989169689Skan * decl.c (delete_block): Remove. 6990169689Skan * cp-tree.h: Remove the corresponding prototype. 699118334Speter 6992169689Skan * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data, 6993169689Skan walk_vtables_r, walk_vtables, walk_globals_r, walk_globals): 6994169689Skan Remove. 6995169689Skan * cp-tree.h: Remove the corresponding prototypes. 699618334Speter 6997169689Skan * tree.c (count_functions, bound_pmf_p, cp_is_overload_p, 6998169689Skan cp_update_decl_after_saving, name_p): Remove. 6999169689Skan * cp-tree.h: Remove the corresponding prototypes. 700018334Speter 7001169689Skan2005-01-18 Andrew Pinski <pinskia@physics.uc.edu> 700218334Speter 7003169689Skan PR c/19472 7004169689Skan * semantics.c (finish_asm_stmt): Strip nops off 7005169689Skan input memory operands. 700618334Speter 7007169689Skan2005-01-18 Kazu Hirata <kazu@cs.umass.edu> 700818334Speter 7009169689Skan * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c, 7010169689Skan typeck2.c: Update copyright. 701118334Speter 7012169689Skan2005-01-16 Kazu Hirata <kazu@cs.umass.edu> 701318334Speter 7014169689Skan * class.c (get_enclosing_class): Remove. 7015169689Skan * cp-tree.h: Remove the corresponding prototypes. 701618334Speter 7017169689Skan * cvt.c (convert_lvalue): Remove. 7018169689Skan * cp-tree.h: Remove the corresponding prototype. 701918334Speter 7020169689Skan * pt.c (tinst_for_decl): Remove. 7021169689Skan * cp-tree.h: Remove the corresponding prototypes. 702218334Speter 7023169689Skan * tree.c (hash_chainon): Remove. 7024169689Skan * cp-tree.h: Remove the corresponding prototypes. 702518334Speter 7026169689Skan2005-01-15 Jakub Jelinek <jakub@redhat.com> 702718334Speter 7028169689Skan PR c++/19263 7029169689Skan * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy 7030169689Skan of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified. 703118334Speter 7032169689Skan2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 703318334Speter 7034169689Skan * Make-lang.in (cp-warn): Don't append $(WERROR). 703518334Speter 7036169689Skan2005-01-10 Kazu Hirata <kazu@cs.umass.edu> 703718334Speter 7038169689Skan * cp-tree.h: Fix a comment typo. 703918334Speter 7040169689Skan2005-01-07 Nathan Sidwell <nathan@codesourcery.com> 704118334Speter 7042169689Skan PR c++/19298 7043169689Skan * pt.c (tsubst_qualified_id): Call convert_from_reference. 704418334Speter 7045169689Skan2005-01-06 Mark Mitchell <mark@codesourcery.com> 704618334Speter 7047169689Skan PR c++/19244 7048169689Skan * class.c (add_implicitly_declared_members): Remove dead code. 7049169689Skan * decl.c (grokfndecl): Add sfk parameter. Use it do set 7050169689Skan DECL_CONSTRUCTOR_P. 7051169689Skan (grokdeclarator): Adjust calls to grokfndecl. 7052169689Skan * method.c (implicitly_declare_fn): Improve documentation. 7053169689Skan * parser.c (cp_parser_direct_declarator): Do not consider a 7054169689Skan function to be a constructor if the containing class was 7055169689Skan originally anonymous. 705618334Speter 7057169689Skan2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 705818334Speter 7059169689Skan PR c++/17154 7060169689Skan * search.c (lookup_field_1): Handle using declaration in 7061169689Skan class template partial specialization. 706218334Speter 7063169689Skan2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 706418334Speter 7065169689Skan PR c++/19258 7066169689Skan * pt.c (push_access_scope): Handle friend defined in class. 7067169689Skan (pop_access_scope): Likewise. 706818334Speter 7069169689Skan2005-01-06 Nathan Sidwell <nathan@codesourcery.com> 707018334Speter 7071169689Skan PR c++/19270 7072169689Skan * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately. 7073169689Skan (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete 7074169689Skan array-new handling code. Use build_x_binary_op. 707518334Speter 7076169689Skan2005-01-05 Nathan Sidwell <nathan@codesourcery.com> 707718334Speter 7078169689Skan PR c++/19030 7079169689Skan * cp-tree.h (start_decl): Take pointer to pushed scope, not bool. 7080169689Skan * name-lookup.h (push_scope): Return pushed scope, not flag. 7081169689Skan * name-lookup.c (push_scope): Return scope that should be popped, 7082169689Skan not a flag. 7083169689Skan * decl.c (start_decl): Adjust. 7084169689Skan (grokfndecl): Adjust scope push and pop. 7085169689Skan * decl2.c (check_classfn): Likewise. 7086169689Skan * parser.c (cp_parser_condition, cp_parser_conversion_function_id, 7087169689Skan cp_parser_init_declarator, cp_parser_direct_declarator, 7088169689Skan cp_parser_class_specifier, cp_parser_class_head, 7089169689Skan cp_parser_lookup_name, 7090169689Skan cp_parser_constructor_declarator_p): Likewise. 7091169689Skan * pt.c (instantiate_class_template, 7092169689Skan resolve_typename_type): Likewise. 709318334Speter 7094169689Skan2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 709518334Speter 7096169689Skan PR c++/14136 7097169689Skan * parser.c (cp_parser_unqualified_id): Do not issue error message 7098169689Skan for typedef-name as destructor declarator when performing an 7099169689Skan uncommitted tentative parse. 710018334Speter 7101169689Skan2005-01-01 Steven Bosscher <stevenb@suse.de> 710218334Speter 7103169689Skan PR middle-end/17544 7104169689Skan * decl.c (finish_function): Fix comment. Annotate the compiler 7105169689Skan generated return with the current file name and line 0. 7106