1. 08 Oct, 2010 1 commit
    • Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h. · a75bfaa6
      	* Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h.
      	(TREE_H): Include $(FLAGS_H) instead of options.h.
      	(opts-common.o): Depend on $(FLAGS_H) instead of options.h.
      	* c-objc-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      	* common.opt (flag_complex_method, flag_evaluation_order,
      	flag_ira_algorithm, flag_ira_region, flag_warn_unused_result): New
      	Variable declarations.
      	* configure.ac (tm_include_list): Include flags.h instead of
      	options.h.
      	* configure: Regenerate.
      	* flags.h: Condition out contents for target libraries.  Include
      	options.h at end of file.
      	(flag_complex_method, flag_ira_algorithm, flag_ira_region,
      	flag_evaluation_order, flag_warn_unused_result): Remove.
      	* gcc.c (main): Intialize global_options with global_options_init.
      	* langhooks-def.h (lhd_init_options_struct): Declare.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      	(LANG_HOOKS_INITIALIZER): Include LANG_HOOKS_INIT_OPTIONS_STRUCT.
      	* langhooks.c (lhd_init_options_struct): New.
      	* langhooks.h (struct lang_hooks): Add init_options_struct.
      	Update comment on init_options.
      	* optc-gen.awk: Generate initializer for global_options_init, not
      	global_options.
      	* opth-gen.awk: Condition out structure declarations for target
      	libraries.  Declare global_options_init.
      	* opts-common.c: Include flags.h instead of options.h.
      	* opts.c (flag_warn_unused_result): Remove.
      	(read_cmdline_options): Take gcc_options parameters.  Pass them to
      	read_cmdline_option.
      	(initial_lang_mask, initial_min_crossjump_insns,
      	initial_max_fields_for_field_sensitive,
      	initial_loop_invariant_max_bbs_in_loop): Define at file scope.
      	(init_options_once): New.  Split out of decode_options.
      	(init_options_struct): New.  Split out of decode_options.
      	(decode_cmdline_options_to_array_default_mask): New.
      	(default_options_optimization): New.  Split out of decode_options.
      	(decode_options): Move most code to other functions.  Update call
      	to read_cmdline_options.
      	(finish_options): New.  Split out of decode_options.
      	* opts.h (decode_options): Add gcc_options parameters.
      	(init_options_once, init_options_struct,
      	decode_cmdline_options_to_array_default_mask): New.
      	* toplev.c (flag_complex_method, flag_ira_algorithm,
      	flag_ira_region, flag_evaluation_order): Remove.
      	(general_init): Use global_options_init for initial flag values
      	for global_dc.
      	(toplev_main): Call init_options_once, init_options_struct,
      	lang_hooks.init_options_struct,
      	decode_cmdline_options_to_array_default_mask and
      	lang_hooks.init_option before decode_options.  Update arguments to
      	decode_options.
      	* tree.h: Include flags.h instead of options.h.
      
      ada:
      	* gcc-interface/misc.c (gnat_init_options_struct): New.  Split out
      	from gnat_init_options.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      c-family:
      	* c-common.c (parse_optimize_options): Call
      	decode_cmdline_options_to_array_default_mask before
      	decode_options.  Update arguments to decode_options.
      	* c-common.h (c_common_init_options_struct): Declare.
      	* c-opts.c (c_common_init_options_struct): New.  Split out from
      	c_common_init_options.
      
      cp:
      	* cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      fortran:
      	* f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      	* gfortran.h (gfc_init_options_struct): Declare.
      	* options.c (gfc_init_options_struct): New.  Split out from
      	gfc_init_options.
      
      java:
      	* lang.c (java_init_options_struct): New.  Split out from
      	java_init_options.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      lto:
      	* lto-lang.c (lto_init_options): Change to
      	lto_init_options_struct.  Update parameters.
      	(LANG_HOOKS_INIT_OPTIONS): Don't define.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      From-SVN: r165189
      Joseph Myers committed
  2. 07 Oct, 2010 3 commits
    • In gcc/testsuite/: 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com> · c154b3d8
      In gcc/testsuite/:
      2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * obj-c++.dg/encode-10.mm: New testcase.
      
      In gcc/cp/:
      2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
              tcc_expression.
              * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
              AT_ENCODE_EXPR.
              * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
              * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
              (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
              (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
              * parser.c (cp_parser_objc_encode_expression): Updated comment.
      
      From-SVN: r165138
      Nicola Pero committed
    • In gcc/cp/: 2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk> · 3cfa8f82
      In gcc/cp/:
      2010-10-07  Nicola Pero  <nicola@nicola.brainstorm.co.uk>
      
              Merge from apple/trunk branch on FSF servers.
      
              2006-04-26  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4508851
              * parser.c (cp_parser_objc_interstitial_code): Recognize
              and parse RID_NAMESPACE keyword.
      
      In gcc/testsuite/:
      2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
      
              2006-04-26  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4508851
              * obj-c++.dg/method-namespace-1.mm: New.
      
      From-SVN: r165125
      Nicola Pero committed
    • fix cut & paste error in cp/parser and add testscases in case of fture error. · 4e4edb3b
      gcc/cp:
      
      	parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
      	finding ellipsis, before checking for attributes.
      
      testsuite:
      
      	* objc.dg/attributes/method-attribute-3.m: New.
      	* obj-c++.dg/attributes/method-attribute-3.mm: New.
      
      From-SVN: r165109
      Iain Sandoe committed
  3. 06 Oct, 2010 2 commits
    • In gcc/cp/: 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com> · b67bc44c
      In gcc/cp/:
      2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from apple/trunk branch on FSF servers.
              * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
              longer existing gcc/c-common.def.
              
              2005-12-14  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4278774
              * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
              * parser.c (cp_parser_objc_encode_expression): Build a templatized 
              parse tree for @encode(T).
      
              2005-12-14  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4278774
              * c-common.def: Add new expression code AT_ENCODE_EXPR.
              
      In gcc/testsuite/:
      2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
              
              2005-12-14  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4278774
              * obj-c++.dg/encode-9.mm: New.
      
      From-SVN: r165067
      Nicola Pero committed
    • re PR c++/45908 ([C++0x] ICE involving decltype: in tree_low_cst, at tree.h:4114) · ccd2b322
      	PR c++/45908
      	* typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
      	code folding offsetof-like computations.
      
      From-SVN: r165031
      Eric Botcazou committed
  4. 05 Oct, 2010 2 commits
    • In gcc/: 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com> · a26d8862
      In gcc/:
      2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-parser.c (c_parser_objc_method_definition): Updated comment.
      
      In gcc/cp/:
      2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              PR objc++/31125
              * parser.c (cp_parser_objc_class_interface): If no identifier
              follows an @interface token, stop parsing the interface after
              printing an error.
              (cp_parser_objc_class_implementation): If no identifier follows an
              @implementation token, stop parsing the implementation after
              printing an error.
      
      2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              PR objc++/23707
              * parser.c (cp_parser_objc_method_keyword_params): If the required
              colon is not found while parsing parameters, stop parsing them.
      
      2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              PR objc++/31126
              * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
              @end after detecting it.  Print an error if @end is found without
              a '}'.
              (cp_parser_objc_method_prototype_list): Do not eat the EOF after
              detecting it.  Fixed reading the next token when continuing
              because of an error in a method signature.  Print an error if EOF
              is found without an '@end'.
              (cp_parser_objc_method_definition_list): Same change.
      
      2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from apple/trunk branch on FSF servers:
      
              2005-10-17  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4290840
              * parser.c (cp_parser_objc_method_keyword_params): Check for valid
              method parameters and issue error.
              (cp_parser_objc_method_definition_list): Check for invalid tokens
              which cannot start a function definition.
      
              2005-10-14  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4294425
              * parser.c (cp_parser_objc_message_args): Check for missing message
              arguments and syntax error.
      
              2005-10-13  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4261146
              * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
              looking for '}'.
      
              2005-08-15  Ziemowit Laski  <zlaski@apple.com>
      
              Radar 4093475
              * parser.c (cp_parser_objc_interstitial_code): Catch stray
              '{' and '}' tokens and issue appropriate errors.
      
              2005-08-02  Ziemowit Laski  <zlaski@apple.com>
      
              Radar 4185810
              (cp_parser_statement_seq_opt): In addition to '}' and
              end-of-file, a statement sequence may also be terminated
              by a stray '@end'.
      
      In gcc/objc/:
      2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
      
              2005-10-17  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4290840
              * objc-act.c (objc_start_method_definition): Check for error_mark_node for
              the selector name and make a quick exit.
      
      In gcc/testsuite/:
      2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              PR objc++/28050
              * obj-c++.dg/syntax-error-10.mm: New.
      
      2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              PR objc++/23707
              * obj-c++.dg/syntax-error-9.mm: New.
      
      2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              PR objc++/31126
              * obj-c++.dg/syntax-error-8.mm: New.
      
      2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
      
              2005-10-17  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4290840
              * obj-c++.dg/syntax-error-7.mm: New
      
              2005-10-14  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4294425
              * obj-c++.dg/syntax-error-6.mm: New
      
              2005-10-13  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4261146
              * obj-c++.dg/syntax-error-5.mm: New
      
              2005-08-15  Ziemowit Laski  <zlaski@apple.com>
      
              Radar 4093475
              * obj-c++.dg/syntax-error-[3-4].mm: New.
      
              2005-08-02  Ziemowit Laski  <zlaski@apple.com>
      
              Radar 4185810
              * obj-c++.dg/syntax-error-[1-2].mm: New.
      
      From-SVN: r164997
      Nicola Pero committed
    • opts-common.c (handle_option, [...]): Add diagnostic_context parameter. · 1ebe4b4f
      	* opts-common.c (handle_option, handle_generated_option,
      	read_cmdline_option, set_option): Add diagnostic_context
      	parameter.  Update calls among these functions.
      	(set_option): Don't use global_dc.
      	* opts.c (read_cmdline_options): Pass global_dc to
      	read_cmdline_option.
      	(decode_options): Pass global_dc to enable_warning_as_error.
      	(common_handle_option): Pass global_dc to enable_warning_as_error.
      	(enable_warning_as_error): Add diagnostic_context parameter.
      	Document parameters.  Don't use global_dc.  Pass
      	diagnostic_context parameter to handle_generated_option.
      	* opts.h (set_option, handle_option, handle_generated_option,
      	read_cmdline_option, enable_warning_as_error): Add
      	diagnostic_context parameter.
      	* Makefile.in (lto-opts.o): Update dependencies.
      	* coretypes.h (struct diagnostic_context, diagnostic_context):
      	Declare here.
      	* diagnostic.h (diagnostic_context): Don't declare typedef here.
      	* gcc.c (process_command): Pass global_dc to read_cmdline_option.
      	* langhooks-def.h (struct diagnostic_context): Don't declare here.
      	(lhd_print_error_function, lhd_initialize_diagnostics): Declare
      	using diagnostic_context typedef.
      	* langhooks.c (lhd_initialize_diagnostics): Declare using
      	diagnostic_context typedef.
      	* langhooks.h (struct diagnostic_context): Don't declare here.
      	(initialize_diagnostics, print_error_function): Declare using
      	diagnostic_context typedef.
      	* lto-opts.c: Include diagnostic.h.
      	(lto_reissue_options): Pass global_dc to set_option.  Pass
      	DK_UNSPECIFIED not 0.
      	* plugin.c (plugins_internal_error_function): Declare using
      	diagnostic_context typedef.
      	* plugin.h (struct diagnostic_context): Don't declare here.
      	(plugins_internal_error_function): Declare using
      	diagnostic_context typedef.
      
      c-family:
      	* c-common.h (struct diagnostic_context): Don't declare here.
      	(c_common_initialize_diagnostics): Declare using
      	diagnostic_context typedef.
      	* c-opts.c (c_common_handle_option): Pass global_dc to
      	handle_generated_option.
      
      cp:
      	* cp-tree.h (cxx_print_error_function,
      	cxx_initialize_diagnostics): Declare using diagnostic_context
      	typedef.
      
      From-SVN: r164991
      Joseph Myers committed
  5. 04 Oct, 2010 2 commits
    • Mark linker Makefile rules for job server build · a90163e9
      -fwhopr=jobserver requires telling GNU make that the linker (= lto)
      rules support job server, so that the necessary jobserver
      information is passed through.
      
      Add + to all the executable targets that run LTO for this purpose.
      
      This improves build performance with a -fwhopr=jobserver
      bootstrap (or BUILD_CONFIG=bootstrap-lto) significantly.
      
      I didn't change Ada because that apparently doesn't support LTO.
      
      Passes bootstrap and test suite. Ok to commit?
      
      gcc/
      
      2010-10-04  Andi Kleen <ak@linux.intel.com>
      
      	* Makefile.in (xgcc, cpp, cc1, collect2, lto-wrapper, gcov,
              gcov-dump, cc1-dummy, genprog, build/gcov-iov):
              Add + to build rule.
      
      gcc/cp/
      
      2010-10-04  Andi Kleen <ak@linux.intel.com>
      
      	* Make-lang.in (g++, cc1plus): Add + to build rule.
      
      gcc/fortran/
      
      2010-10-04  Andi Kleen <ak@linux.intel.com>
      
      	* Make-lang.in (gfortran, f951): Add + to build rule.
      
      gcc/java/
      
      2010-10-04  Andi Kleen <ak@linux.intel.com>
      
      	* Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
              Add + to build rule.
      
      gcc/lto/
      
      2010-10-04  Andi Kleen <ak@linux.intel.com>
      
      	* Make-lang.in (lto1): Add + to build rule.
      
      gcc/objc/
      
      2010-10-04  Andi Kleen <ak@linux.intel.com>
      
      	* Make-lang.in (cc1obj-dummy, cc1obj): Add + to build rule.
      
      gcc/objcp/
      
      2010-10-04  Andi Kleen <ak@linux.intel.com>
      
      	* Make-lang.in (cc1objplus-dummy, cc1objplus): Add + to build rule.
      
      More plus fixes
      
      From-SVN: r164949
      Andi Kleen committed
    • tree.c (decl_storage_duration): New. · b95ca513
      	* tree.c (decl_storage_duration): New.
      	* cp-tree.h: Declare it.
      	(duration_kind): Return values.
      
      From-SVN: r164944
      Jason Merrill committed
  6. 03 Oct, 2010 1 commit
  7. 30 Sep, 2010 2 commits
    • add @optional/@required to prto lists · 92902b1b
      add @optional/@required to prto lists
      gcc:
      
      	* c-parser.c (c_parser_objc_methodprotolist): Amend preceding comment,
      	parse @optional/@required and set the flags as appropriate.
      
      gcc/c-family:
      
            * c-common.c: Add two new entries for @optional
             and @required keywords.
      
      	merge from FSF 'apple/trunk' branch.
      	2006-01-30  Fariborz Jahanian <fjahanian@apple.com>
      
             Radar 4386773
             * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
             objective-c keywords.
             (objc_set_method_opt): New declaration.
             * stub-objc.c (objc_set_method_opt): New stub.
      
      gcc/cp:
      
      	merge from FSF 'apple/trunk' branch.
      	2006-01-30  Fariborz Jahanian <fjahanian@apple.com>
      
      	Radar 4386773
      	* cp/parser.c (cp_parser_objc_interstitial_code): For
             @optional/@required set the optional/required flag.
      
      gcc/objc:
      
      	merge from FSF 'apple/trunk' branch.
      	2006-01-30  Fariborz Jahanian <fjahanian@apple.com>
      
             Radar 4386773
             * objc/objc-act.c (objc_set_method_opt): New function.
             (objc_start_protocol, objc_finish_interface): Reset
             objc_method_optional_flag flag.
             (objc_add_method_declaration): Pass on the new
             flag to objc_add_method.
             (objc_add_method): Add optional methods to new chain in
             the protocol class.
             * objc/objc-act.h (CLASS_OPTIONAL_CLS_METHODS,
             CLASS_OPTIONAL_NST_METHODS): New macros accessing a protocol
             class's optional method chains.
      
      testsuite:
      
      	merge from FSF 'apple/trunk' branch.
      	2006-01-30  Fariborz Jahanian <fjahanian@apple.com>
      
             Radar 4386773
             * objc.dg/enhanced-proto-1.m: New.
             * objc.dg/enhanced-proto-2.m: New.
             * obj-c++.dg/enhanced-proto-1.mm: New
             * obj-c++.dg/enhanced-proto-2.mm: New.
      
      From-SVN: r164754
      Iain Sandoe committed
    • In gcc/c-family/: 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com> · 49b91f05
      In gcc/c-family/:
      2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
              Objective-C/Objective-C++ keywords.
      
      In gcc/cp/:
      2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
              and indentation when finding an Objective-C++ CPP_AT_NAME token.
      
      In gcc/:
      2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-parser.c (c_lex_one_token): When finding a CPP_AT_NAME
              Objective-C token, map RID_CLASS to RID_AT_CLASS and similar.
              (c_parser_external_declaration): Use RID_AT_CLASS
              instead of RID_CLASS.
              (c_parser_objc_class_declaration): Same change.
              (c_parser_objc_try_catch_statement): Use RID_AT_TRY instead of
              RID_TRY and RID_AT_CATCH instead of RID_CATCH.
              (c_parser_objc_class_instance_variables): Use RID_AT_PRIVATE
              instead of RID_PRIVATE, RID_AT_PROTECTED instead of RID_PROTECTED
              and RID_AT_PUBLIC instead of RID_PUBLIC.
              (c_parser_statement_after_labels): Use RID_AT_TRY instead of
              RID_TRY and RID_AT_CATCH instead of RID_CATCH.
      
      From-SVN: r164744
      Nicola Pero committed
  8. 29 Sep, 2010 2 commits
    • tree.h (SCOPE_FILE_SCOPE_P): New macro. · 725214ac
      2010-09-29  Richard Guenther  <rguenther@suse.de>
      
      	* tree.h (SCOPE_FILE_SCOPE_P): New macro.
      	(DECL_FILE_SCOPE_P): Use it.
      	(TYPE_FILE_SCOPE_P): New macro.
      
              cp/
      	* cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
      	(CP_TYPE_CONTEXT): Similar.
      	(FROB_CONTEXT): Frob global_namespace to the global
      	TRANSLATION_UNIT_DECL.
      	* decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
      	set DECL_CONTEXT of global_namespace to it.
      	(start_decl): Use CP_DECL_CONTEXT and test TYPE_P
      	instead of zeroing context.
      	(cp_finish_decl): Use DECL_FILE_SCOPE_P.
      	(grokfndecl): Likewise.
      	(start_preparsed_function): Likewise.
      	* name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
      	(namespace_binding): Use SCOPE_FILE_SCOPE_P.
      	* pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
      	(is_specialization_of_friend): Use CP_DECL_CONTEXT.
      	(push_template_decl_real): Likewise.
      	(tsubst_friend_class): Likewise.  Adjust context comparisons.
      	(instantiate_class_template): Use CP_TYPE_CONTEXT.
      	(tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
      	* cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
      	SCOPE_FILE_SCOPE_P.
      
      From-SVN: r164719
      Richard Guenther committed
    • decl.c (get_atexit_node): Fix typo. · 085c1b47
      2010-09-29  Yao Qi  <yao@codesourcery.com>
      
              * decl.c (get_atexit_node): Fix typo.
      
      From-SVN: r164718
      Yao Qi committed
  9. 28 Sep, 2010 4 commits
    • tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic. · 4e9ca9b0
      	* tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
      	(real_lvalue_p): Take const_tree.
      	* cp-tree.h: Adjust.
      	* typeck.c (lvalue_or_else): Make temporary arg a permerror.
      	(cp_build_addr_expr_1): Likewise.
      
      From-SVN: r164704
      Jason Merrill committed
    • add parsing for ObjC* method & method parm attributes · f7e71da5
      gcc/cp:
      	
      	Partially merged from apple/trunk branch on FSF servers:
      	2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
      	Radar 3803157 (method attributes)
      
      	* parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
      	(cp_parser_objc_method_tail_params_opt): Likewise.
      	(cp_parser_objc_method_signature): Likewise.
      	(cp_parser_objc_method_maybe_bad_prefix_attributes): New.
      	(cp_parser_objc_method_prototype_list): Handle attributes.
      	(cp_parser_objc_method_definition_list): Likewise.
      
      gcc/objc:
      	
      	* objc-act.c (objc_add_method_declaration): Handle attributes.
      	(objc_start_method_definition): Likewise.
      	(objc_generate_cxx_ctor_or_dtor): Pass NULL attributes to ctor/dtor.
      	(objc_build_keyword_decl): Handle attributes.
      
      gcc:
      
      	* c-parser.c (c_parser_declaration_or_fndef): Diagnose incorrect prefix
      	attributes on methods.
      	 (c_parser_objc_method_definition): Handle attributes.
      	(c_parser_objc_methodproto): Likewise.
      	(c_parser_objc_maybe_method_attributes): New.
      	(c_parser_objc_method_decl): Handle attributes, add a similar diagnostic
      	to ObjC++ for a missing definition.
      
      gcc/c-family:
      	
      	* c-common.h: Update declarations to include attributes.
      	* stub-objc.c: Likewise.
      
      testsuite:
      
      	* objc.dg/attributes/method-attribute-1.m: New.
      	* objc.dg/attributes/method-attribute-2.m: New.
      
      	* obj-c++.dg/attributes/method-attribute-1.m: New.
      	* obj-c++.dg/attributes/method-attribute-2.m: New.
      
      From-SVN: r164702
      Iain Sandoe committed
    • Hookize TARGET_UNWIND_INFO et al. · f0a0390e
      From-SVN: r164701
      Richard Henderson committed
    • add ObjC* class, category and protocol attribute parsers · c165dca7
      gcc/c-family:
      
      	* c-common.h (objc_start_class_interface): Adjust prototype.
      	(objc_start_category_interface): Likewise.
      	(objc_start_protocol): Likewise.
      	* stub-objc.c (objc_start_protocol): Adjust for extra argument.
      	(objc_start_class_interface): Likewise.
      	(objc_start_category_interface): Likewise.
      
      gcc/objc:
      
      	* objc-act.c (objc_start_class_interface): Handle and ignore attributes.
      	(objc_start_category_interface): Likewise.
      	(objc_start_protocol): Likewise.
      
      gcc/cp:
      
      	* parser.c (cp_parser_objc_valid_prefix_attributes): New.
      	(cp_parser_declaration): Parse prefix attributes for ObjC++.
      	(cp_parser_objc_protocol_declaration): Handle attributes.
      	(cp_parser_objc_class_interface): Likewise.
      	(cp_parser_objc_declaration): Likewise.
      
      gcc:
      
      	* c-parser.c (c_parser_objc_class_definition): Adjust prototype.
      	(c_parser_objc_protocol_definition): Likewise.
      	(c_parser_external_declaration): Provide dummy attribute arguments.
      	(c_parser_declaration_or_fndef): Parse prefix attributes for ObjC.
      	(c_parser_objc_class_definition): Handle attributes.
      	(c_parser_objc_protocol_definition): Likewise.
      
      gcc/testsuite:
      
      	* objc.dg/attributes: New.
      	* objc.dg/attributes/attributes.exp: New.
      	* objc.dg/attributes/class-attribute-1.m: New.
      	* objc.dg/attributes/class-attribute-2.m: New
      	* objc.dg/attributes/categ-attribute-1.m: New
      	* objc.dg/attributes/categ-attribute-2.m: New
      	* objc.dg/attributes/proto-attribute-1.m: New
      
      	* obj-c++.dg/attributes: New.
      	* obj-c++.dg/attributes/attributes.exp: New
      	* obj-c++.dg/attributes/class-attribute-1.mm: New
      	* obj-c++.dg/attributes/class-attribute-2.mm: New
      	* obj-c++.dg/attributes/categ-attribute-1.mm: New
      	* obj-c++.dg/attributes/categ-attribute-2.mm: New
      	* obj-c++.dg/attributes/proto-attribute-1.mm: New
      
      From-SVN: r164700
      Iain Sandoe committed
  10. 27 Sep, 2010 3 commits
    • Require lvalues as specified by the standard. · 93c0e0bb
      	* typeck.c (lvalue_or_else): Use real_lvalue_p.
      	(cp_build_addr_expr_1): Split out of cp_build_unary_op.
      	(cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
      	(decay_conversion, get_member_function_from_ptrfunc): Adjust.
      	(build_x_unary_op, build_reinterpret_cast_1): Adjust.
      	(build_const_cast_1): Adjust.
      	* cp-tree.h: Declare new fns.
      	* call.c (build_this, convert_like_real, build_over_call): Adjust.
      	(initialize_reference): Adjust.
      	* class.c (build_base_path, convert_to_base_statically): Adjust.
      	(build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
      	* cvt.c (build_up_reference, convert_to_reference): Adjust.
      	* decl.c (register_dtor_fn): Adjust.
      	* decl2.c (build_offset_ref_call_from_tree): Adjust.
      	* except.c (initialize_handler_parm): Adjust.
      	* init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
      	* rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
      	* tree.c (stabilize_expr): Adjust.
      
      From-SVN: r164666
      Jason Merrill committed
    • In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com> · b581b85b
      In gcc/:
      2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.  Removed small
              change in build_conditional_expr that had been added when fixing
              PR objc/27377 and which did the same check in a less complete way.
      
              2005-12-15  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4229905
              * c-typeck.c (build_conditional_expr): Call objc_have_common_type when
              looking for objective-c common pointer types.
      
              2005-06-22  Ziemowit Laski  <zlaski@apple.com>
      
              Radar 4154928
              * c-typeck.c (build_conditional_expr): For two ObjC pointer types,
              use their ObjC common type.
      
      In gcc/c-family:
      2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
      
              2005-12-15  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4229905
              * c-common.h (objc_have_common_type): New declaration.
              * stub-objc.c (objc_have_common_type): New stub.
      
              2005-06-22  Ziemowit Laski  <zlaski@apple.com>
      
              Radar 4154928
              * c-common.h (objc_common_type): New prototype.
              * stub-objc.c (objc_common_type): New stub.
      
      In gcc/objc/:
      2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
      
              2005-12-15  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4229905
              * objc-act.c (objc_have_common_types): New function.
      
              2005-06-22  Ziemowit Laski  <zlaski@apple.com>
      
              Radar 4154928
              * objc-act.c (objc_common_type): New function.
      
      In gcc/cp/:
      2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from apple/trunk branch on FSF servers:
      
              2005-12-15  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4229905
              * typeck.c (composite_pointer_type): Call objc_have_common_type
              when comparing two objective-c pointer types.
      
              2005-06-22  Ziemowit Laski  <zlaski@apple.com>
      
              Radar 4154928
              * call.c (standard_conversion): Allow for a pointer conversion
              between any two ObjC pointer types.
              * typeck.c (composite_pointer_type): Determine common type
              for two ObjC pointer types.
      
      In gcc/testsuite/:
      2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.  Renamed
              const-str-12.m to constr-str-12b.m to avoid conflicts.
      
              2005-12-15  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4229905
              * obj-c++.dg/warn5.mm: New
      
              2005-06-22  Ziemowit Laski  <zlaski@apple.com>
      
              Radar 4154928
              * obj-c++.dg/const-str-12.mm: New.
              * objc.dg/const-str-12.m: New.
      
      From-SVN: r164655
      Nicola Pero committed
  11. 24 Sep, 2010 3 commits
    • lto-symtab.c (lto_symtab_entry_def): Add guessed field. · 051f8cc6
      	* lto-symtab.c (lto_symtab_entry_def): Add guessed field.
      	(lto_symtab_resolve_symbols): Set it.
      	(lto_symtab_merge_decls_1): Do not compute used_from_object_file;
      	store resolution field in cgraph/varpool.
      	* cgraph.c (cgraph_same_body_alias, cgraph_add_thunk): Return node.
      	(cgraph_get_node_or_alias, cgraph_get_node_or_alias): Constify.
      	(cgraph_dump_node): Drop used_from_object_file.
      	(cgraph_clone_node, cgraph_create_virtual_clone): Likewise.
      	(cgraph_function_body_availability): Use decl_replaceable_p.
      	(cgraph_make_node_local): Set resolution to LDPR_PREVAILING_DEF_IRONLY.
      	(cgraph_can_remove_if_no_direct_calls_and_refs): Use
      	cgraph_used_from_object_file_p.
      	(cgraph_will_be_removed_from_program_if_no_direct_calls): Use
      	cgraph_used_from_object_file_p.
      	(resolution_used_from_other_file_p): New functoin.
      	(cgraph_used_from_object_file_p): New predicate.
      	* cgraph.h: Include plugin-api.h
      	(struct cgraph_local_info): Remove used_from_object_file.
      	(struct cgraph_node): Add resolution field.
      	(struct varpool_node): Likewise; remove used_from_object_file;
      	reove const_value_known.
      	(cgraph_get_node, cgraph_get_node_or_alias, cgraph_node,
      	cgraph_same_body_alias, cgraph_add_thunk): Update prototypes.
      	(resolution_used_from_other_file_p, cgraph_used_from_object_file_p,
      	varpool_used_from_object_file_p): Declare.
      	(varpool_get_node, varpool_extra_name_alias): Update prototype.
      	* tree.h (DECL_REPLACEABLE_P): Remove.
      	(decl_replaceable_p, decl_binds_to_current_def_p): Declare.
      	* final.c (rest_of_clean_state): Use decl_binds_to_current_def_p.
      	* lto-cgraph.c (lto_output_node, lto_output_varpool_node,
      	input_overwrite_node, input_node, input_varpool_node): Stream
      	resolution.
      	* expr.c (expand_expr_real_1): Use const_value_known_p
      	* ipa.c (ipa_discover_readonly_nonaddressable_var): Do not set
      	const_value_known.
      	(cgraph_externally_visible_p): Use cgraph_used_from_object_file_p.
      	(function_and_variable_visibility): Set resolution for local vars
      	and functions.
      	use varpool_used_from_object_file_p.
      	* varasm.c (resolution_to_local_definition_p, resolution_local_p): New
      	static functions.
      	(default_binds_local_p_1): Use resolutoin info.
      	(decl_binds_to_current_def_p, decl_replaceable_p): New functions.
      	* varpool.c (varpool_get_node): Constify.
      	(const_value_known_p): Do not use vnode->const_value_known;
      	use decl_replaceable_p.
      	(varpool_finalize_decl): Do not set const_value_known.
      	(cgraph_variable_initializer_availability): Use decl_replaceable_p
      	(varpool_extra_name_alias): Return new node.
      	(varpool_used_from_object_file_p): New function.
      
      	* decl.c (finish_function): Use decl_replaceable_p
      	* method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias.
      
      	* lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
      
      From-SVN: r164610
      Jan Hubicka committed
    • decl.c (compute_array_index_type): Remember type dependence of array bound. · 3fdb8851
      	* decl.c (compute_array_index_type): Remember type dependence of
      	array bound.
      	* pt.c (dependent_type_p_r): Don't recompute it here.
      
      From-SVN: r164598
      Jason Merrill committed
    • error.c (dump_expr): Print conversion between reference and pointer to the same type as "*" or "&". · 75d980ab
      	* error.c (dump_expr) [CASE_CONVERT]: Print conversion between
      	reference and pointer to the same type as "*" or "&".
      
      From-SVN: r164597
      Jason Merrill committed
  12. 23 Sep, 2010 1 commit
    • In gcc/: · 19dc6d01
              * c-typeck.c (convert_arguments): Use warning 'too many arguments
              to method [methodname]' for an Objective-C method instead of the
              less satisfactory 'too many arguments to function' (with no method
              name).
      In gcc/cp/:
              * typeck.c (warn_args_num): Use warning 'too many arguments to
              method [methodname]' for an Objective-C method instead of the less
              satisfactory 'too many arguments to function' (with no method
              name).
      In gcc/testsuite/:
              * obj-c++.dg/too-many-args.mm: New file.
              Merge from 'apple/trunk' branch on FSF servers.
      
              2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4491608
              * objc.dg/too-many-args.m: New
      
      From-SVN: r164573
      Nicola Pero committed
  13. 21 Sep, 2010 1 commit
  14. 18 Sep, 2010 1 commit
  15. 15 Sep, 2010 5 commits
  16. 13 Sep, 2010 1 commit
  17. 11 Sep, 2010 1 commit
    • Implement range-based for-statements. · f9132eb7
      	* cp-tree.def (RANGE_FOR_STMT): New.
      	* cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
      	(cp_convert_range_for): Declare.
      	* pt.c (tsubst_expr): Add RANGE_FOR_STMT.
      	(tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
      	* semantics.c (begin_range_for_stmt): New.
      	(finish_range_for_decl): New.
      	(finish_for_stmt): Accept also RANGE_FOR_STMT.
      	(perform_koenig_lookup): Add extra argument include_std.
      	* parser.c (cp_parser_c_for): New with code from
      	cp_parser_iteration_statement().
      	(cp_parser_range_for): New.
      	(cp_convert_range_for): New.
      	(cp_parser_iteration_statement): Add range-for support.
      	(cp_parser_condition): Adjust comment.
      	(cp_parser_postfix_expression): perform_koenig_lookup takes extra
      	argument.
      	* dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
      	* cxx-pretty-print.c: Likewise.
      	* lex.c (cxx_init): Likewise.
      	* name-lookup.c (lookup_function_nonclass): Add extra argument
      	include_std.
      	(lookup_arg_dependent): Likewise.
      	* name-lookup.h: Likewise.
      
      From-SVN: r164211
      Rodrigo Rivas Costa committed
  18. 10 Sep, 2010 3 commits
  19. 09 Sep, 2010 1 commit
  20. 07 Sep, 2010 1 commit
    • cp-tree.h (build_enumerator): Add new location_t parameter. · 4cc2a722
      	* cp-tree.h (build_enumerator): Add new location_t parameter.
      	(build_lang_decl_loc): New function.
      	* decl.c (build_enumerator): New parameter loc. Use it when calling
      	build_decl. Replace build_lang_decl with build_lang_decl_loc.
      	* pt.c (tsubst_enum): Adjust call to build_enumerator.
      	* parser.c (cp_parser_enumerator_definition): Ditto.
      	* lex.c (build_lang_decl_loc): New function.
      
      From-SVN: r163959
      Arnaud Charlet committed