1. 26 Oct, 2010 1 commit
    • Implement opaque-enum-specifiers for C++0x. · 90ecaf87
      gcc/
      	* tree.h (ENUM_IS_OPAQUE): New.
      	* dwarf2out.c (gen_enumeration_type_die): Use ENUM_IS_OPAQUE.
      gcc/cp/
      	* cp-tree.h (SET_OPAQUE_ENUM_P): New.
      	(OPAQUE_ENUM_P): New.
      	(ENUM_FIXED_UNDERLYING_TYPE_P): New.
      	(start_enum): Update prototype.
      	(finish_enum_value_list): New prototype.
      	* parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
      	"enum class" is used in an elaborated-type-specifier.
      	(cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
      	* decl.c (copy_type_enum): New.
      	(finish_enum_value_list): New, with code from finish_enum.
      	(finish_enum): A lot of code removed. Added a gcc_assert.
      	(start_enum): Add parameters enumtype and is_new.
      	Rewrite to work with opaque-enum-specifiers.
      	* pt.c (maybe_process_partial_specialization): Allow for template
      	specialization of enumerations, with a pedwarn.
      	(lookup_template_class): Update call to start_enum. Call to
      	SET_OPAQUE_ENUM_P.
      	(tsubst_enum): Call to begin_scope, finish_scope and
      	finish_enum_value_list.
      
      From-SVN: r165935
      Rodrigo Rivas Costa committed
  2. 24 Oct, 2010 1 commit
    • In gcc/cp/: 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com> · be8cf3b5
      In gcc/cp/:
      2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Removed Objective-C++ specific replacement of cxx_printable_name.
              * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
              to cxx_printable_name for both C++ and Objective-C++.
              * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
      
              * error.c (dump_decl): For Objective-C++, call
              objc_maybe_printable_name here ...
              * tree.c (cxx_printable_name_internal): ... instead of here.
              
      In gcc/objcp/:
      2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objcp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Do not define.
      
      In gcc/objc/:
      2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_build_keyword_decl): Updated comments.  Do not
              emit a warning that method parameter attributes are unimplemented.
              Instead, store them into DECL_ATTRIBUTES of the KEYWORD_DECL.
              (start_method_def): Copy attributes from each KEYWORD_DECL into
              the corresponding PARM_DECL.
              (objc_warn_deprecated_use): Removed.
              (build_objc_method_call): Call warn_deprecated_use, not
              objc_warn_deprecated_use.
              (objc_maybe_printable_name): Do not try to get the identifier name
              of DECLs that we don't recognize.  Immediately return NULL for them.
              (objc_printable_name): Removed C++-specific case, which is no
              longer used.  Updated comments.
              
      In gcc/testsuite/:
      2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/attributes/method-attribute-2.m: Updated test.  Method
              parameter attributes are now supported.
              * obj-c++.dg/attributes/method-attribute-2.m: Same change.
              * objc.dg/attributes/parameter-attribute-1.m: New test.
              * objc.dg/attributes/parameter-attribute-2.m: New test. 
              * obj-c++.dg/attributes/parameter-attribute-1.m: New test.
              * obj-c++.dg/attributes/parameter-attribute-2.m: New test.
      
      From-SVN: r165896
      Nicola Pero committed
  3. 23 Oct, 2010 1 commit
    • In gcc/cp/: 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com> · b8a18805
      In gcc/cp/:
      2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * tree.c (cxx_printable_name_internal): In Objective-C++, call
              objc_maybe_printable_name.
      
      In gcc/objc/:
      2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (OBJC_GEN_METHOD_LABEL): Updated comments.
              (objc_demangle): Return NULL if demangling can not be done because
              the string to demangle is not an Objective-C mangled method name.
              Be smarter in demangling method names so that at least for methods
              with no arguments we are able to almost always demangle '_' correctly.
              Updated comments.
              (objc_maybe_printable_name): New.
              (objc_printable_name): Call objc_maybe_printable_name.  If it
              returns NULL, call cxx_printable_name in Objective-C++.
      
      In gcc/testsuite/:
      2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/demangle-1.m: New test.
              * obj-c++.dg/demangle-1.mm: New test.
              * obj-c++.dg/demangle-2.mm: New test.
              * obj-c++.dg/demangle-3.mm: New test.
      
      In gcc/c-family/:
      2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-common.h (objc_maybe_printable_name): New.
              * stub-objc.c (objc_maybe_printable_name): New.
      
      From-SVN: r165887
      Nicola Pero committed
  4. 22 Oct, 2010 2 commits
  5. 21 Oct, 2010 1 commit
  6. 20 Oct, 2010 3 commits
    • In gcc/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> · 249a82c4
      In gcc/:
      2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * parser.c (c_parser_objc_method_type): Mark inline.  Return a
              bool instead of a tree.
              (c_parser_objc_method_decl): Added bool argument.  Updated call to
              objc_build_method_signature.
              (c_parser_objc_method_definition): Do not call
              objc_set_method_type.  Updated calls to c_parser_objc_method_type,
              c_parser_objc_method_decl and objc_start_method_definition.
              (c_parser_objc_methodproto): Do not call objc_set_method_type.
              Updated calls to c_parser_objc_method_type,
              c_parser_objc_method_decl and objc_add_method_declaration.
      
      In gcc/c-family/:
      2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-common.h (objc_set_method_type): Removed.
              (objc_add_method_declaration): Added boolean argument.
              (objc_start_method_definition): Same change.
              (objc_build_method_signature): Same change.
              * stub-objc.c (objc_set_method_type): Removed.
              (objc_add_method_declaration): Added boolean argument.
              (objc_start_method_definition): Same change.
              (objc_build_method_signature): Same change.
      
      In gcc/cp/:
      2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * parser.c (cp_parser_objc_method_type): Mark inline.  Return a
              bool instead of calling objc_set_method_type.
              (cp_parser_objc_method_signature): Updated calls to
              cp_parser_objc_method_type and to objc_build_method_signature.
              (cp_parser_objc_method_prototype_list): Updated calls to
              objc_add_method_declaration.  Use token->type to determine if it
              is a class method or not.
              (cp_parser_objc_method_definition_list): Same change.
      
      In gcc/objc/:
      2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.h (objc_inherit_code): Removed.
              * objc-act.c (objc_inherit_code): Removed.
              (objc_set_method_type): Removed.
              (objc_build_method_signature): Added is_class_method argument.
              Use it instead of the global objc_inherit_code variable.
              (objc_add_method_declaration): Same change.
              (objc_start_method_definition): Same change.
              (objc_generate_cxx_ctor_or_dtor): Updated call to
              objc_start_method_definition.  Do not call objc_set_method_type.
              (adjust_type_for_id_default): Mark as inline.
              (objc_synthesize_getter): Updated call to
              objc_start_method_definition.  Do not set objc_inherit_code.
              (objc_synthesize_setter): Updated call to
              objc_start_method_definition.  Do not set objc_inherit_code.
      
      From-SVN: r165741
      Nicola Pero committed
    • re PR c++/46056 ([C++0x] range-based for loop does not destruct iterators) · 30ca47e6
      	PR c++/46056
      	* parser.c (cp_convert_range_for): Call cp_finish_decl
      	instead of finish_expr_stmt.
      
      From-SVN: r165726
      Rodrigo Rivas Costa committed
    • In gcc/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> · 977e30bc
      In gcc/:
      2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-decl.c (c_write_global_declarations): Call
              objc_write_global_declarations when compiling Objective-C.
              * c-lang.c (finish_file): Removed.
      
      In gcc/c-family/:
      2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-common.h (finish_file): Removed.
              (objc_write_global_declarations): New.
              * c-opts.c (c_common_parse_file): Do not call finish_file.
              * stub-objc.c (objc_write_global_declarations): New.
      
      In gcc/cp/:
      2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * cp-lang.c (finish_file): Removed.
              * decl2.c (cp_write_global_declarations): Call
              objc_write_global_declarations when compiling Objective-C++.
      
      In gcc/objc/:
      2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-lang.c (finish_file): Removed.
              * objc-act.c (objc_finish_file): Renamed to
              objc_write_global_declarations.  Do not try to instantiate C++
              templates when compiling Objective-C++ as this is now
              automatically done before this function is called.  Do not check
              for syntax-only run or PCH generation as this is done by the
              callers.
              * objc-act.h (objc_finish_file): Removed.
      
      In gcc/objcp/:
      2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objcp-lang.c (finish_file): Removed.
      
      In gcc/testsuite/:
      2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.  Test adapted to
              not require Foundation and run with the GNU runtime as well.
      
              2006-03-13  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4439126
              * obj-c++.dg/template-8.mm: New.
      
      From-SVN: r165714
      Nicola Pero committed
  7. 19 Oct, 2010 1 commit
  8. 18 Oct, 2010 3 commits
    • In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> · da57d1b9
      In gcc/:
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented parsing @synthesize and @dynamic for Objective-C.
              * c-parser.c (c_parser_external_declaration): Recognize
              RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
              (c_parser_objc_at_synthesize_declaration): New.
              (c_parser_objc_at_dynamic_declaration): New.
      
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-parser.c (c_parser_objc_class_declaration): After finding an
              error, parse the whole declaration then reset parser->error.
      
      In gcc/cp/:
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented parsing @synthesize and @dynamic for Objective-C++.
              * parser.c (cp_parser_objc_method_definition_list): Recognize
              RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
              (cp_parser_objc_at_dynamic_declaration): New.
              (cp_parser_objc_at_synthesize_declaration): New.
      
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * parser.c (cp_parser_objc_identifier_list): Check the return
              value of cp_parser_identifier and react if it is error_mark_node.
      
      In gcc/objc/:
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented parsing @synthesize and @dynamic for
              Objective-C/Objective-C++.
              * objc-act.c (objc_add_synthesize_declaration): New.
              (objc_add_dynamic_declaration): New.
      
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (lookup_and_install_protocols): Return NULL if passed
              error_mark_node.
      
      In gcc/testsuite/:
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented parsing @synthesize and @dynamic for
              Objective-C/Objective-C++.
              * objc.dg/property/dynamic-1.m: New.
              * objc.dg/property/synthesize-1.m: New.
              * obj-c++.dg/property/dynamic-1.mm: New.
              * obj-c++.dg/property/synthesize-1.mm: New.
      
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/at-class-1.m: New.
              * objc.dg/at-class-1.mm: New.
      
      From-SVN: r165667
      Nicola Pero committed
    • In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> · e426b47b
      In gcc/:
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
              * c-parser.c (c_parser_typeof_specifier): Adapted to new parser
              the following Objective-C change:
      
              2005-10-07  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4204796
              * c-parse.in (typespec_nonreserved_nonattr): Remove volatile from
              'volatilized' type used in a typeof operator.
      
      In gcc/c-family/:
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
              
              2005-11-08  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4330422
              * c-common.h (objc_non_volatilized_type): New declaration
              * stub-objc.c (objc_non_volatilized_type): New stub.
      
      In gcc/cp/:
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
              
              Merge from apple/trunk branch on FSF servers.
              
              2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4451818
              * call.c (standard_conversion, implicit_conversion): Ignore
              'volatile' attribute of artificially volatized type in objc when
              evaluating various conversion weights.
      
              2005-11-08  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4330422
              * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
              artiificially 'volatized' type before doing pointer comparison.
              
      In gcc/objc/:
      2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
              
              2005-11-08  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4330422
              * objc/objc-act.c (objc_non_volatilized_type): New
      
              2005-10-07  Fariborz Jahanian <fjahanian@apple.com>
              
              Radar 4204796
              * objc-act.c (objc_build_volatilized_type): Build 'volatilzed'
              types with proper attribute set and correctly.
              (objc_volatilize_decl): Remove unneeded code.
              (objc_type_quals_match): Use the new attribute to check on
              'volatilzed' type.
              (hash_init): removed unneeded code.
              
      In gcc/testsuite/:
      2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
              
              Merge from 'apple/trunk' branch on FSF servers.
      
              2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4451818
              * obj-c++.dg/try-catch-16.mm: New.
              * obj-c++.dg/try-catch-17.mm: New.
      
              2005-11-08  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4330422
              * obj-c++.dg/try-catch-15.mm: New
      
              2005-10-07  Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4204796
              * obj-c++.dg/try-catch-12.mm: New
              * obj-c++.dg/try-catch-13.mm: New
              * obj-c++.dg/try-catch-14.mm: New
              * objc.dg/try-catch-11.m: New
              * objc.dg/try-catch-12.m: New
              * objc.dg/try-catch-13.m: New
      
      From-SVN: r165654
      Nicola Pero committed
    • re PR c/46015 (-Wunused-but-set-variable warns for arrays used in gotos) · 84628aa8
      	PR c/46015
      	* c-parser.c (c_parser_statement_after_labels): Call mark_exp_read
      	on computed goto argument.
      
      	* semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
      	goto destination.
      
      	* c-c++-common/Wunused-var-13.c: New test.
      
      From-SVN: r165643
      Jakub Jelinek committed
  9. 17 Oct, 2010 3 commits
    • In gcc/cp/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> · 131376b3
      In gcc/cp/:
      2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from apple/trunk branch on FSF servers.
      
              2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4516785
              * parser.c (cp_parser_simple_type_specifier): Don't lookup for
              objc object types if type is scope qualified.
      
      In gcc/testsuite/:
      2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
      
              2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4516785
              * obj-c++.dg/method-namespace-2.mm: New.
      
      From-SVN: r165602
      Nicola Pero committed
    • In gcc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> · 90fbfdc3
      In gcc/:
      2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
      
              2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4133425
              * c-decl.c (undeclared_variable): Issue diagnostic on
              private 'ivar' access.
      
      In gcc/c-family/:
      2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
      
              2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4133425
              * c-common.h (objc_diagnose_private_ivar): New decl.
              * stub-objc.c (objc_diagnose_private_ivar): New stub.
      
      In gcc/cp/:
      2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from apple/trunk branch on FSF servers.
      
              2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4133425
              * lex.c (unqualified_name_lookup_error): Issue diagnostic
              for private 'ivar' access.
      
      In gcc/objc/:
      2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
      
              2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4133425
              * objc-act.c (objc_diagnose_private_ivar): New.
      
      In gcc/testsuite/:
      2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Merge from 'apple/trunk' branch on FSF servers.
      
              2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
      
              Radar 4133425
              * objc.dg/private-1.m: Test modified.
              * obj-c++.dg/private-1.mm: Test modified.
      
      From-SVN: r165601
      Nicola Pero committed
    • add parse support for @package to ObjC* · c37d8c30
      gcc/c-family:
      	
      	* c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
      	* c-common.h (enum rid): Add RID_AT_PACKAGE.
      	(objc_ivar_visibility_kind): New enum.
      	(objc_set_visibility): Adjust prototype to use visibility enum.
      	* stub-objc.c (objc_set_visibility): Adjust stub to use 
      	visibility enum.
      
      gcc/objc:
      
      	* objc-act.c: Rename 'objc_public_flag' to  objc_ivar_visibility and
      	make its type 'objc_ivar_visibility_kind'.  
      	(objc_start_class_interface): Update to use visibility enum.
      	(objc_start_class_implementation): Likewise.
      	(objc_set_visibility): Update to use visibility enum, warn that 
      	@package is handle as per @public.
      	(add_instance_variable): Handle OBJC_IVAR_VIS_PACKAGE.
      	* objc-act.h: Rename 'objc_public_flag' to  objc_ivar_visibility and
      	make its type 'objc_ivar_visibility_kind'.
      
      gcc/cp:
      
      	* parser.c (cp_parser_objc_visibility_spec): Update to use visibility 
      	enum, and handle @package.
      
      gcc:
      
      	* c-parser.c (c_parser_objc_class_instance_variables): Update to use 
      	visibility enum, and handle @package.
      
      gcc/testsuite:
      
      	* objc.dg/fsf-package-0.m: New.
      	* obj-c++.dg/fsf-package-0.m: New.
      
      From-SVN: r165585
      Iain Sandoe committed
  10. 15 Oct, 2010 1 commit
  11. 14 Oct, 2010 3 commits
    • add @property to ObjC* · 668ea4b1
      	merge from FSF apple 'trunk' branch. 
      	2006 Fariborz Jahanian <fjahanian@apple.com>
      	
      	Radars 4436866, 4505126, 4506903, 4517826
      
      gcc/c-family: 
      
      	* c-common.c (c_common_resword): Define @property and its attributes.
      	* c-common.h: Define property attribute enum entries.
      	(OBJC_IS_PATTR_KEYWORD): New.
      	(objc_property_attribute_kind): New enum.
      	Declare objc_set_property_attr (), objc_add_property_variable (),
      	objc_build_getter_call () and objc_build_setter_call ().
      	* stub-objc.c (objc_set_property_attr): New stub.
      	(objc_add_property_variable): Likewise.
      	(objc_build_getter_call): Likewise.
      	(objc_build_setter_call) Likewise.
      
      gcc:
      
      	* c-parser.c (c_parser, objc_property_attr_context) New flag.
      	(c_lex_one_token): Handle property attributes.
      	(c_parser_external_declaration): Handle @property.
      	(c_parser_declaration_or_fndef): Warn on invalid attributes before
      	@alias, @class, @end and @property objc keywords.
      	(c_parser_objc_methodprotolist): Handle @property.
      	(c_parser_objc_property_attrlist): New.
      	(c_parser_objc_at_property): New.
      	* c-typeck.c (build_component_ref): Handle CLASS.property syntax.
      	(build_modify_expr): Likewise.
      
      gcc/cp:
      
      	* typeck.c (finish_class_member_access_expr): Handle CLASS.property
      	syntax. 
      	(cp_build_modify_expr): Likewise.
      	* parser.c (cp_parser_objc_method_prototype_list): Handle @property.
      	(cp_parser_objc_method_definition_list): Likewise.
      	(cp_parser_objc_property_decl): New.
      	(cp_parser_objc_property_attrlist): New.
      	(cp_parser_objc_at_property): New.
      
      gcc/objc:
      
      	* objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): New.
      	property_readonly, property_getter, property_setter, property_ivar,
      	property_copies, in_objc_property_setter_name_context: New vars.
      	(objc_set_property_attr): New.
      	(objc_add_property_variable): New.
      	(lookup_property_in_list): New.
      	(lookup_property): New.
      	(objc_build_getter_call): New.
      	(objc_setter_func_call): New.
      	(get_selector_from_reference): New.
      	(objc_build_setter_call): New.
      	(is_property): New.
      	(build_property_reference): New.
      	(objc_finish_message_expr): Detect readonly property and warn.
      	(objc_build_property_ivar_name): New.
      	(objc_build_property_setter_name): New.
      	(objc_gen_one_property_datum): New.
      	(objc_process_getter_setter): New.
      	(objc_synthesize_getter): New.
      	(objc_synthesize_setter): New.
      	(objc_gen_property_data): New.
      	(finish_class): Generate property data.
      	(comp_proto_with_proto): Separated from ...
      	(match_proto_with_proto): ... New.
      	(objc_lookup_ivar): Handle properties.
      	* objc-tree.def (PROPERTY_DECL): New tree code.
      	* objc-act.h: CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS update size.
      	(METHOD_PROPERTY_CONTEXT): New.
      	(PROPERTY_NAME): New.
      	(PROPERTY_GETTER_NAME): New.
      	(PROPERTY_SETTER_NAME): New.
      	(PROPERTY_IVAR_NAME): New.
      	(PROPERTY_READONLY): New.
      	(PROPERTY_COPIES): New.
      	(TOTAL_CLASS_RAW_IVARS): New.
      	(CLASS_PROPERTY_DECL): New.
      	(IMPL_PROPERTY_DECL): New.
      	* objc-lang.c (objc_init_ts): Update fields for property_decl.
      
      gcc/objcp:
      
      	* objcp-lang.c (objcxx_init_ts): Update for property_decl.
      
      From-SVN: r165479
      Iain Sandoe committed
    • re PR c++/44561 (using nullptr_t with -flto/-fwhopr causes ICE: tree code… · 1e85e720
      re PR c++/44561 (using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams)
      
      2010-10-14  Richard Guenther  <rguenther@suse.de>
      
      	PR lto/44561
      	* tree.def (NULLPTR_TYPE): New tree code.
      	* dbxout.c (dbxout_type): Handle NULLPTR_TYPE.
      	* dwarf2out.c (is_base_type): Likewise.
      	(gen_type_die_with_usage): Likewise.
      	* sdbout.c (plain_type_1): Likewise.
      	* tree.c (build_int_cst_wide): Likewise.
      	* gimple.c (gimple_types_compatible_p_1): NULLPTR_TYPE types
      	are equal.
      
      	cp/
      	* cp-tree.h (NULLPTR_TYPE_P): Adjust.
      	* decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
      	use build_int_cst.
      	* error.c (dump_type): Handle NULLPTR_TYPE.
      	(dump_type_prefix): Likewise.
      	(dump_type_suffix): Likewise.
      	* mangle.c (write_type): Likewise.
      	* name-lookup.c (arg_assoc_type): Likewise.
      	* rtti.c (typeinfo_in_lib_p): Likewise.
      	* pt.c (tsubst): Likewise.
      
      	* g++.dg/lto/20101010-3_0.C: New testcase.
      	* g++.dg/lto/20101010-4_0.C: Likewise.
      
      From-SVN: r165462
      Richard Guenther committed
    • re PR c++/45984 (ICE: canonical types differ for identical types) · 8943989d
      	PR c++/45984
      	* class.c (fixup_attribute_variants): New fn.
      	* cp-tree.h: Declare it.
      	* pt.c (instantiate_class_template): Call it.
      	* semantics.c (begin_class_definition): Call it.
      
      From-SVN: r165443
      Jason Merrill committed
  12. 13 Oct, 2010 2 commits
  13. 11 Oct, 2010 4 commits
    • re PR c++/45562 (ICE: SIGSEGV in cp_build_unary_op (typeck.c:5083) with… · 7c663eb0
      re PR c++/45562 (ICE: SIGSEGV in cp_build_unary_op (typeck.c:5083) with -std=gnu++0x -fipa-cp-clone -fcompare-debug)
      
      2010-10-11  Martin Jambor  <mjambor@suse.cz>
      
      	PR c++/45562
      	* cp/cp-tree.h (current_class_ref): Check that cp_function_chain is
      	non-NULL.
      	* cp/call.c (build_cxx_call): Likewise.
      
      From-SVN: r165330
      Martin Jambor committed
    • pt.c (tsubst_default_argument): Handle DEFAULT_ARG. · e90b1c4a
      	* pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
      	(tsubst_default_arguments): Only do this once for cloned fns.
      	(tsubst): Use typedef_variant_p.  Handle LANG_TYPE.  Don't
      	handle expressions.
      	(tsubst_expr): Avoid calling tsubst_expr for non-expressions.
      	(tsubst_copy_and_build): Likewise.
      	(tsubst_initializer_list): Likewise.
      	(tsubst_copy): Change default to gcc_unreachable.  Handle
      	OVERLOAD and PTRMEM_CST.
      
      From-SVN: r165307
      Jason Merrill committed
    • re PR lto/45959 (ICE: tree code 'template_type_parm' is not supported in gimple… · 9c3c8ad7
      re PR lto/45959 (ICE: tree code 'template_type_parm' is not supported in gimple streams with -flto/-fwhopr)
      
      	PR lto/45959
      	PR lto/45960
      	* pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
      
      From-SVN: r165306
      Jason Merrill committed
    • Build compiler checksum from object files v2 · d6d5951a
      gcc/
      
      2010-10-07  Andi Kleen  <ak@linux.intel.com>
      
      	* Makefile.in (MOSTLYCLEANFILES): Remove cc1*dummy, add
      	checksum-options.
      	(checksum-options): Add.
      	(cc1-dummy): Remove.
      	(cc1-checksum): Change to run checksum over object files
      	and options only.
      	* dummy-checksum.c: Remove.
      	* genchecksum.c: Update copyright.
      	(usage): Allow multiple arguments.
      	(BLOCKSIZE): Add.
      	(dosum): Change for incremental checksum. Remove C output.
      	(main): Iterate over all argument files. Add C output.
      
      gcc/cp
      
      2010-10-07  Andi Kleen  <ak@linux.intel.com>
      
      	* Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
      	(cc1plus-dummy): Remove.
      	(cc1plus-checksum): Change to run checksum over object files
              and options only.
      
      gcc/objc
      
      2010-10-07  Andi Kleen  <ak@linux.intel.com>
      
      	* Make-lang.in (cc1obj-dummy): Remove.
      	(cc1obj-checksum): Change to run checksum over object files
              and options only.
      
      gcc/objcp
      
      2010-10-07  Andi Kleen  <ak@linux.intel.com>
      
      	* Make-lang.in (cc1objplus-dummy): Remove.
      	(cc1objplus-checksum): Change to run checksum over object files
              and options only.
      
      From-SVN: r165305
      Andi Kleen committed
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 03 Oct, 2010 1 commit
  20. 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
  21. 29 Sep, 2010 1 commit
    • 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