1. 02 Dec, 2010 2 commits
  2. 30 Nov, 2010 1 commit
    • In gcc/c-family/: 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com> · 6c39e757
      In gcc/c-family/:
      2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c-common.h (objc_finish_function): New.
      	(objc_non_volatilized_type): Removed.
      	(objc_type_quals_match): Removed.
      	* stub-objc.c (objc_finish_function): New.
      	(objc_non_volatilized_type): Removed.
      	(objc_type_quals_match): Removed.
      	
      In gcc/objc/:
      2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_build_volatilized_type): Removed.
      	(objc_non_volatilized_type): Removed.
      	(objc_type_quals_match): Removed.
      	(local_variables_to_volatilize): New.
      	(objc_volatilize_decl): Add the decl to volatilize to
      	local_variables_to_volatilize, but don't volatilize it yet.
      	(objc_finish_function): New.
      	* objc-act.h (local_variables_to_volatilize): New.
      
      In gcc/cp/:
      2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* decl.c (finish_function): Call objc_finish_function when
      	compiling Objective-C++.
      	* call.c (standard_conversion): Do not call
      	objc_non_volatilized_type().
      	(implicit_conversion): Same change.
      	* typeck.c (comp_ptr_ttypes_real): Same change.
      
      In gcc/:
      2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c-decl.c (finish_function): Call objc_finish_function in
      	Objective-C.
      	* c-typeck.c (convert_for_assignment): Do not call
      	objc_type_quals_match().
      
      From-SVN: r167318
      Nicola Pero committed
  3. 29 Nov, 2010 5 commits
    • Allow 'make check-objc -j2' · 094fd2dd
      2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
      	    Mike Stump  <mikestump@comcast.net>
      
      	Allow 'make check-objc -j2'
      	* Make-lang.in (lang_checks_parallelized): New.
      	(check_objc_parallelize): New.
      
      Co-Authored-By: Mike Stump <mikestump@comcast.net>
      
      From-SVN: r167277
      Nicola Pero committed
    • In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com> · 98cf223c
      In gcc/objc/:
      2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (start_class): When a class is reimplemented,
      	generate an error and avoid adding the class to the list of
      	implemented classes again, but do not return error_mark_node.
      
      In gcc/testsuite/:
      2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc.dg/duplicate-class-1.m: New.
      	* obj-c++.dg/duplicate-class-1.mm: New.
      
      From-SVN: r167270
      Nicola Pero committed
    • In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com> · d402edc1
      In gcc/objc/:
      2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_maybe_build_component_ref): Removed TODO.
      
      In gcc/testsuite/:
      2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc.dg/property/dotsyntax-21.m
      	* obj-c++.dg/property/dotsyntax-21.mm
      
      From-SVN: r167269
      Nicola Pero committed
    • In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com> · 437c2322
      In gcc/objc/:
      2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_eh_runtime_type): Avoid ICE if error_mark_node
      	is passed as argument.
      	(objc_begin_catch_clause): Added code to deal with an
      	error_mark_node or NULL_TREE argument.  Improved checks for
      	invalid arguments.  Added code to traverse typedefs.
      
      In gcc/testsuite/:
      2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc.dg/exceptions-1.m: New.
      	* objc.dg/exceptions-2.m: New.
      	* objc.dg/exceptions-3.m: New.
      	* objc.dg/exceptions-4.m: New.
      	* objc.dg/exceptions-5.m: New.
      	* obj-c++.dg/exceptions-1.mm: New.
      	* obj-c++.dg/exceptions-2.mm: New.
      	* obj-c++.dg/exceptions-3.mm: New.
      	* obj-c++.dg/exceptions-4.mm: New.
      	* obj-c++.dg/exceptions-5.mm: New.
      
      In gcc/cp/:
      2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* parser.c (cp_parser_objc_try_catch_finally_statement): Parse
      	@catch(...)  and pass NULL_TREE to objc_begin_catch_clause() in
      	that case.  Improved error recovery.  Reorganized code to be
      	almost identical to c_parser_objc_try_catch_finally_statement.
      
      In gcc/:
      2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c-parser.c (c_parser_objc_try_catch_statement): Renamed to
      	c_parser_objc_try_catch_finally_statement for consistency with the
      	C++ parser.  Parse @catch(...) and pass NULL_TREE to
      	objc_begin_catch_clause() in that case.  Improved error recovery.
      	Reorganized code to be almost identical to
      	cp_parser_objc_try_catch_finally_statement.
      
      From-SVN: r167233
      Nicola Pero committed
    • In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com> · 5944a6dc
      In gcc/objc/:
      2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_demangle): Return immediately if the string is
      	too short.  Detect names that do not need demangling, and return
      	them unchanged.
      
      From-SVN: r167231
      Nicola Pero committed
  4. 27 Nov, 2010 2 commits
    • In gcc/objc/: 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com> · 2dd24dbd
      In gcc/objc/:
      2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented optional properties.
              * objc-act.h (PROPERTY_OPTIONAL): New.
              * objc-act.c (objc_add_property_declaration): Set
              PROPERTY_OPTIONAL if appropriate.
              (finish_class): When generating definitions of setter and getter
              methods associated with a property for a protocol, mark them as
              optional if the property is optional.
              (maybe_make_artificial_property_decl): Added 'getter_name'
              argument.  Set PROPERTY_OPTIONAL.
              (objc_maybe_build_component_ref): Updated calls to
              maybe_make_artificial_property_decl.  Added code for optional,
              readonly properties.
              (objc_build_class_component_ref): Updated call to
              maybe_make_artificial_property_decl.
      
      In gcc/testsuite/:
      2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/at-property-24.m: New.
              * objc.dg/property/at-property-25.m: New.
              * obj-c++.dg/property/at-property-24.mm: New.
              * obj-c++.dg/property/at-property-25.mm: New.
      
      From-SVN: r167197
      Nicola Pero committed
    • In gcc/objc/: 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com> · a693d3a8
      In gcc/objc/:
      2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_build_struct): Fixed loops that save and
              restore TYPE_OBJC_INFO to iterate over all variants of the type; a
              special case for the current type is then no longer required.
              Duplicate TYPE_LANG_SPECIFIC for each type before restoring
              TYPE_OBJC_INFO.
              (objc_get_protocol_qualified_type): Updated comments.
      
      In gcc/testsuite/:
      2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/protocol-qualifier-1.m: New.
              * objc.dg/protocol-qualifier-2.m: New.
              * obj-c++.dg/protocol-qualifier-1.mm: New.
              * obj-c++.dg/protocol-qualifier-2.mm: New.
      
      From-SVN: r167195
      Nicola Pero committed
  5. 25 Nov, 2010 1 commit
    • In gcc/objc/: 2010-11-25 Nicola Pero <nicola.pero@meta-innovation.com> · 24e1ee32
      In gcc/objc/:
      2010-11-25  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_build_struct): Install TYPE_OBJC_INTERFACE
      	after finish_struct, not before, otherwise it may be wiped out by
      	it.  This fixes spurious warnings when a class has more than 15
      	instance variables.
      
      In gcc/testsuite/:
      2010-11-25  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc.dg/ivar-problem-1.m: New.
      	* obj-c++.dg/ivar-problem-1.mm: New.
      
      From-SVN: r167151
      Nicola Pero committed
  6. 23 Nov, 2010 1 commit
    • In gcc/objc/: 2010-11-23 Nicola Pero <nicola.pero@meta-innovation.com> · 59a09598
      In gcc/objc/:
      2010-11-23  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              PR objc/24358
              * lang-specs.h: Added objective-c-cpp-output.  Mapped .mi to
              objective-c-cpp-output instead of objc-cpp-output.  Print a
              deprecation note every time objc-cpp-output is requested.
      
      In gcc/objcp/:
      2010-11-23  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              PR objc/24358
              * lang-specs.h: Print a deprecation note every time
              objc++-cpp-output is requested.
      
      From-SVN: r167073
      Nicola Pero committed
  7. 22 Nov, 2010 2 commits
    • common.opt (exit_after_options, [...]): New Variable entries. · 0576d21f
      	* common.opt (exit_after_options, write_symbols, debug_info_level,
      	use_gnu_debug_info_extensions): New Variable entries.
      	(fprofile-dir=): Use Var.
      	* flag-types.h (enum debug_info_level): Rename to enum
      	debug_info_levels.
      	* flags.h (write_symbols, debug_info_level,
      	use_gnu_debug_info_extensions): Remove declarations.
      	* opts.c (exit_after_options, write_symbols, debug_info_level):
      	Remove.
      	(set_struct_debug_option): Make static variables const.
      	(use_gnu_debug_info_extensions): Remove.
      	(set_debug_level, print_filtered_help, print_specific_help,
      	fast_math_flags_set_p): Take gcc_options parameters and use them
      	in place of global variables.
      	(print_filtered_help): Make new_help non-static.
      	(print_specific_help): Update call to print_filtered_help.
      	(common_handle_option): Update calls to print_specific_help.  Use
      	gcc_options structure for more settings.  Make --help table
      	const.  Don't handle OPT_fprofile_dir_ here.  Update calls to
      	set_debug_level.
      	* toplev.c (profile_data_prefix): Remove.
      	* toplev.h (profile_data_prefix, exit_after_options): Remove
      	declarations.
      	(fast_math_flags_set_p): Update prototype.
      	* cppbuiltin.c (define_builtin_macros_for_compilation_flags):
      	Update call to fast_math_flags_set_p.
      
      objc:
      	* objc-act.c (write_symbols): Don't declare here.
      
      From-SVN: r167064
      Joseph Myers committed
    • In gcc/objc/: 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com> · d925c9eb
      In gcc/objc/:
      2010-11-22  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              PR objc/41108
              * objc-act.c (objc_generate_write_barrier): Added assert to make sure
              this function is only called with the next runtime.
      
      From-SVN: r167054
      Nicola Pero committed
  8. 20 Nov, 2010 1 commit
  9. 19 Nov, 2010 4 commits
    • re PR c/46547 (internal compiler error when converting a complex to a bool) · fb330359
      	PR c/46547
      	* objc-act.c (in_late_binary_op): Remove.
      
      From-SVN: r166964
      Jakub Jelinek committed
    • In gcc/objc/: 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com> · d4e72c58
      In gcc/objc/:
      2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_start_class_interface): Do not warn that class
              attributes are unimplemented.  Pass the attributes to start_class.
              (objc_start_category_interface): Updated call to start_class.
              (objc_start_class_implementation): Same change.
              (objc_start_category_implementation): Same change.
              (objc_build_class_component_ref): Warn if the class is deprecated.
              (build_private_template): Mark the template as deprecated if the
              class is deprecated.
              (start_class): Added 'attributes' argument.  Emit a warning if
              using a deprecated class as superclass of a class, or original
              class of a category.  Recognize the 'deprecated' attribute when
              starting and interface, and mark the interface with
              TREE_DEPRECATED if present.  Store attributes in the interface.
              
      In gcc/testsuite/:
      2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/attributes/class-attribute-1.m: Rewritten.
              * objc.dg/attributes/class-attribute-2.m: Same change.
              * obj-c++.dg/attributes/class-attribute-1.mm: Same change.
              * obj-c++.dg/attributes/class-attribute-2.mm: Same change.
              * objc.dg/fobjc-std-1.m: Updated.
              * obj-c++.dg/fobjc-std-1.mm: Updated.
      
      From-SVN: r166963
      Nicola Pero committed
    • Fixed email in my last ChangeLog entry · 3be0ac86
      From-SVN: r166940
      Nicola Pero committed
    • In gcc/: 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com> · 6b192a09
      In gcc/:
      2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-parser.c (c_parser_objc_protocol_definition): Pass attributes
              to objc_declare_protocols.
      
      In gcc/c-family/:
      2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-common.h (objc_declare_protocols): Added additional argument.
              * stub-objc.c (objc_declare_protocol): Same change.
              
      In gcc/cp/:
      2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * parser.c (cp_parser_objc_protocol_declaration): Pass attributes
              to objc_declare_protocols.
      
      In gcc/objc/:
      2010-11-19  Nicola Pero  <nicola@nicola.brainstorm.co.uk>
      
              * objc-act.c (lookup_protocol): Added 'warn_if_deprecated'
              argument.  If it is 'true' and the protocol is deprecated, emit a
              deprecation warning.
              (objc_start_protocol): Do not warn that protocol attributes are
              unimplemented.  Pass the attributes to start_protocol.
              (start_protocol): Added attributes argument.  Recognize the
              'deprecated' attribute and mark the protocols with TREE_DEPRECATED
              if present.  Store attributes in the protocol.
              (objc_declare_protocols): Added 'attributes' argument.  Recognize
              the 'deprecated' attribute and mark the protocols with
              TREE_DEPRECATED if present.  Store attributes in the protocol.
              Updated call to lookup_protocol.
              (objc_build_protocol_expr): Updated call to lookup_protocol.
              (check_protocol_recursively): Same change.
              (lookup_and_install_protocols): Same change.
              * objc-act.h: Updated comments.
              
      In gcc/testsuite/:
      2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/attributes/proto-attribute-1.m: Updated.
              * objc.dg/attributes/proto-attribute-2.m: New.
              * objc.dg/attributes/proto-attribute-3.m: New.
              * obj-c++.dg/attributes/proto-attribute-1.mm: Updated.
              * obj-c++.dg/attributes/proto-attribute-2.mm: New.
              * obj-c++.dg/attributes/proto-attribute-3.mm: New.
      
      From-SVN: r166938
      Nicola Pero committed
  10. 17 Nov, 2010 1 commit
    • In gcc/objc/: 2010-11-17 Nicola Pero <nicola.pero@meta-innovation.com> · 354d8ce1
      In gcc/objc/:
      2010-11-17  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (lookup_method_in_protocol_list): Search methods in
              PROTOCOL_OPTIONAL_CLS_METHODS / PROTOCOL_OPTIONAL_NST_METHODS if
              they are not found in PROTOCOL_CLS_METHODS / PROTOCOL_NST_METHODS.
      
      In gcc/testsuite/:
      2010-11-17  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/protocol-optional-1.m: New.
              * obj-c++.dg/protocol-optional-1.mm: New.
      
      From-SVN: r166847
      Nicola Pero committed
  11. 15 Nov, 2010 2 commits
    • In gcc/objc/: 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com> · b6cfe8ac
      In gcc/objc/:
      2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_build_setter_call): New.
              (objc_maybe_build_modify_expr): Rewritten to build a compound
              statement.
              (objc_build_incr_expr_for_property_ref): Updated calls to
              objc_maybe_build_modify_expr to call objc_build_setter_call
              instead.  Use build_modify_expr () instead of build2 (MODIFY_EXPR,
              ...).  Use convert () instead of build1 (NOP_EXPR, ...).  Use
              TREE_NO_WARNING on the final compound statement to silence C++
              warnings.
      
      In gcc/testsuite/:
      2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/dotsyntax-18.m: New.
              * objc.dg/property/dotsyntax-19.m: New.
              * objc.dg/property/dotsyntax-20.m: New.
              * obj-c++.dg/property/dotsyntax-18.mm: New.
              * obj-c++.dg/property/dotsyntax-19.mm: New.     
              * obj-c++.dg/property/dotsyntax-20.mm: New.
              * objc.dg/property/dotsyntax-4.m: Removed some unused variables and code.
              * objc.dg/property/dotsyntax-6.m: Same change.
              * objc.dg/property/dotsyntax-16.m: Same change. 
              * objc.dg/property/dotsyntax-17.m: Same change.
              * obj-c++.dg/property/dotsyntax-4.mm: Same change.
              * obj-c++.dg/property/dotsyntax-6.mm: Same change.
              * obj-c++.dg/property/dotsyntax-16.mm: Same change. 
              * obj-c++.dg/property/dotsyntax-17.mm: Same change.
              * objc.dg/property/at-property-22.m: Added missing casts.
              * obj-c++.dg/property/at-property-22.mm: Same change.
      
      From-SVN: r166779
      Nicola Pero committed
    • In gcc/: 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com> · 925e8657
      In gcc/:
      2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-typeck.c (build_unary_op): Use
              objc_build_incr_expr_for_property_ref to build the pre/post
              increment/decrement of an Objective-C property ref, and skip the
              lvalue_or_else check in that case.
      
      In gcc/c-family/:
      2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * c-common.h (objc_build_incr_expr_for_property_ref): New.
              * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
      
      In gcc/cp/:
      2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * typeck.c (cp_build_unary_op): Use
              objc_build_incr_expr_for_property_ref to build the pre/post
              increment/decrement of an Objective-C property ref.
      
      In gcc/objc/:
      2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_build_incr_expr_for_property_ref): New.
              (objc_create_temporary_var): Moved it towards the beginning of the
              file so that objc_build_incr_expr_for_property_ref can use it.
      
      In gcc/testsuite/:
      2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/dotsyntax-16.m: New.
              * objc.dg/property/dotsyntax-17.m: New.
              * obj-c++.dg/property/dotsyntax-16.mm: New.
              * obj-c++.dg/property/dotsyntax-17.mm: New.
              * objc.dg/property/at-property-10.m: Uncommented using 'x++'
              syntax with properties, which now works.
              * obj-c++.dg/property/at-property-10.mm: Same change.
      
      From-SVN: r166763
      Nicola Pero committed
  12. 14 Nov, 2010 1 commit
    • In gcc/objc/: 2010-11-14 Nicola Pero <nicola.pero@meta-innovation.com> · 8926bd5d
      In gcc/objc/:
      2010-11-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_add_property_declaration): Check that the decl
              we received from the parser is a FIELD_DECL; reject array and
              bitfield properties.  Convert the warning when a property is
              readonly and a setter is specified into an error.  Convert errors
              when a property declaration does not match a property declaration
              in a superclass into warnings.
              (objc_add_synthesize_declaration_for_property): Use
              DECL_BIT_FIELD_TYPE to determine the type of an instance variable
              if it is a bitfield.  Throw an error if we are asked to synthesize
              setters/getters for a bitfield instance variable but the property
              is not appropriate - it must be assign and nonatomic.  If the
              property is readonly, allow the instance variable type to be a
              specialization of the property type.
              (objc_type_valid_for_messaging): Fixed returning 'false' for a
              Class qualified with a protocol when the 'accept_classes' argument
              is 'false'.
      
      In gcc/testsuite/:
      2010-11-14  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/at-property-21.m: New.
              * objc.dg/property/at-property-22.m: New.
              * objc.dg/property/at-property-23.m: New.       
              * objc.dg/property/synthesize-9.m: New.
              * objc.dg/property/synthesize-10.m: New.
              * objc.dg/property/synthesize-11.m: New.        
              * obj-c++.dg/property/at-property-21.mm: New.
              * obj-c++.dg/property/at-property-22.mm: New.
              * obj-c++.dg/property/at-property-23.mm: New.   
              * obj-c++.dg/property/synthesize-9.mm: New.
              * obj-c++.dg/property/synthesize-10.mm: New.
              * obj-c++.dg/property/synthesize-11.mm: New.    
      
              * objc.dg/property/at-property-4.m: Updated to match new compiler
              where some errors have been converted into warnings and vice versa.
              * objc.dg/property/at-property-16.m: Same change.
              * objc.dg/property/at-property-18.m: Same change.
              * objc.dg/property/property-neg-5.m: Same change.
              * obj-c++.dg/property/at-property-4.mm: Same change.
              * obj-c++.dg/property/at-property-16.mm: Same change.
              * obj-c++.dg/property/at-property-18.mm: Same change.
              * obj-c++.dg/property/property-neg-5.mm: Same change.
              
              * obj-c++.dg/property/dynamic-2.mm: Enable tests that were
              commented out because of testsuite problems; I found out that
              using dg-warning instead of dg-message gets them to work.
              * obj-c++.dg/property/property-neg-3.mm: Same change.
              * obj-c++.dg/property/synthesize-6.mm: Same change.
              * obj-c++.dg/property/at-property-5.mm: Same change.    
              * obj-c++.dg/property/at-property-14.mm: Same change.   
              * obj-c++.dg/property/at-property-18.mm: Same change.
              * obj-c++.dg/property/at-property-16.mm: Same change (in this file,
              some tests still do not work due to some other testsuite issue).
      
      From-SVN: r166730
      Nicola Pero committed
  13. 13 Nov, 2010 1 commit
    • In gcc/objc/: 2010-11-13 Nicola Pero <nicola.pero@meta-innovation.com> · 5a2a6eb0
      In gcc/objc/:
      2010-11-13  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_get_protocol_qualified_type): detect cases
              where we are asked to attach a protocol to something which is not
              an Objective-C object type, and produce an error.
      
      In gcc/testsuite/:
      2010-11-13  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc/compile/20060406-1.m: Fixed testcase not to try to qualify
              a pointer to an arbitrary C struct with an Objective-C protocol.
              Test various valid uses of typedef with Objective-C objects and
              protocols instead.
              * objc.dg/invalid-type-1.m: New.
              * obj-c++.dg/invalid-type-1.m: New.
      
      From-SVN: r166709
      Nicola Pero committed
  14. 11 Nov, 2010 2 commits
    • In gcc/objc/: 2010-11-11 Nicola Pero <nicola.pero@meta-innovation.com> · 10e34e6e
      In gcc/objc/:
      2010-11-11  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_add_property_declaration): Check that the type
              of a property and of an inherited property match.
              (objc_maybe_build_component_ref): Tidied up indentation and
              comments.
              (objc_common_type): Added new type of check (-5).  If an unknown
              class is involved in a comparison, try to look up its interface.
              (objc_add_synthesize_declaration_for_property): Check that the
              property to synthesize and the instance variable to use have the
              same type.
      
      In gcc/testsuite/:
      2010-11-11  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/at-property-20.m: New.
              * objc.dg/property/synthesize-8.m: New.
              * obj-c++.dg/property/at-property-20.m: New.
              * obj-c++.dg/property/synthesize-8.mm: New.
      
      From-SVN: r166612
      Nicola Pero committed
  15. 10 Nov, 2010 2 commits
    • cfgloop.c (verify_loop_structure): Use %' in diagnostics. · d8a07487
      	* cfgloop.c (verify_loop_structure): Use %' in diagnostics.  Start
      	diagnostics with lowercase letters.
      	* cgraphunit.c (verify_cgraph_node): Start diagnostics with
      	lowercase letters.
      	* collect2.c (maybe_run_lto_and_relink): Remove trailing '.' from
      	diagnostic.
      	* config/alpha/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic.
      	* config/arm/arm.c (arm_get_pcs_model): Start diagnostics with
      	lowercase letters.
      	* config/arm/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic.
      	Remove trailing ' ' from diagnostic.
      	* config/avr/avr.c (print_operand_address): Start diagnostic with
      	a lowercase letter and remove trailing '.'.
      	* config/avr/avr.opt (mpmem-wrap-around): Fix typo in help text.
      	* config/bfin/bfin.c (bfin_option_override): Start diagnostics
      	with lowercase letters.  Use %' in diagnostics.  Remove trailing
      	'.' from diagnostics.
      	(bfin_handle_longcall_attribute): Use %' in diagnostic.
      	* config/cris/cris.c (cris_split_movdx,
      	cris_expand_pic_call_address): Start diagnostics with lowercase
      	letters.
      	(cris_asm_output_label_ref): Use %' in diagnostic.
      	* config/cris/cris.h (ASM_SPEC): Start diagnostic with a lowercase
      	letter.
      	* config/crx/crx.h (FUNCTION_PROFILER): Start diagnostic with a
      	lowercase letter.
      	* config/darwin-c.c (version_as_macro): Start diagnostic with a
      	lowercase letter.
      	* config/darwin-driver.c (darwin_default_min_version): Use %' in
      	diagnostic.
      	* config/host-darwin.c (darwin_gt_pch_use_address): Use %' in
      	diagnostic.
      	* config/i386/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic.
      	* config/i386/host-cygwin.c (cygwin_gt_pch_get_address): Use %' in
      	diagnostics.
      	* config/i386/i386.c (ix86_option_override_internal): Write
      	diagnostic as a single sentence without trailing '.'.  Use %' in
      	diagnostics.
      	(ix86_function_sseregparm, classify_argument): Start diagnostics
      	with lowercase letters.
      	(ix86_expand_prologue): Use %' in diagnostic.
      	* config/i386/i386.h (CC1_CPU_SPEC_1): Remove trailing '.' from
      	diagnostic.
      	* config/i386/nwld.h (LINK_SPEC): Start diagnostic with a
      	lowercase letter.
      	* config/i386/winnt.c (i386_pe_determine_dllimport_p): Use %' in
      	diagnostic.
      	* config/ia64/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic.
      	* config/ia64/ia64.opt (msched-max-memory-insns-hard-limit): Avoid
      	'`' in help text.
      	* config/lm32/lm32.c (lm32_print_operand): Start diagnostic with a
      	lowercase letter.
      	* config/mep/mep.c (mep_validate_vliw): Start diagnostics with
      	lowercase letters.
      	* config/microblaze/microblaze.c (microblaze_handle_option):
      	Remove trailing '.' from diagnostic.
      	(print_operand): Start diagnostic with a lowercase letter.
      	* config/pa/pa-hpux10.h (LINK_SPEC): Start diagnostics with
      	lowercase letters.  Avoid '`' in diagnostics.
      	* config/pa/pa-hpux11.h (LINK_SPEC): Start diagnostics with
      	lowercase letters.  Avoid '`' in diagnostics.
      	* config/pa/pa64-hpux.h (LINK_SPEC): Start diagnostics with
      	lowercase letters.  Avoid '`' in diagnostics.
      	* config/picochip/picochip.c (picochip_option_override,
      	picochip_emit_save_register, picochip_function_arg,
      	picochip_output_label, picochip_output_internal_label,
      	picochip_asm_output_opcode, picochip_output_cbranch,
      	picochip_output_compare, picochip_output_branch,
      	picochip_get_vliw_alu_id): Remove trailing '.' and '\n' from
      	diagnostics. Start diagnostics with lowercase letters.  Use %' in
      	diagnostics.
      	* config/rs6000/rs6000.c (rs6000_option_override_internal): Use
      	"SPE" capitalization.  Start diagnostic with a lowercase letter.
      	(rs6000_handle_option): Start diagnostics with lowercase letters.
      	(def_builtin): Remove trailing '.' from diagnostic.
      	(rs6000_savres_routine_name): Start diagnostic with a lowercase
      	letter.
      	* config/rs6000/sysv4.h (LINK_OS_FREEBSD_SPEC): Avoid '`' in
      	diagnostic.
      	* config/rx/rx.c (rx_handle_option): Start diagnostic with a
      	lowercase letter.
      	* config/s390/s390.c (s390_option_override) Start diagnostics with
      	lowercase letters.  Use %' in diagnostic.
      	* config/sh/sh.c (sh_output_mi_thunk): Start diagnostics with
      	lowercase letters.
      	* config/sh/symbian-base.c (sh_symbian_mark_dllimport): Use %' in
      	diagnostic.
      	* config/sh/symbian-c.c (sh_symbian_is_dllimported): Use %' in
      	diagnostic.
      	* config/sh/symbian-cxx.c (sh_symbian_is_dllimported): Use %' in
      	diagnostic.
      	* config/sparc/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic.
      	* config/spu/spu.c (spu_option_override): Start diagnostics with
      	lowercase letters.  Use %qs for quoting in diagnostics.
      	(spu_check_builtin_parm): Remove trailing '.' from diagnostics.
      	Use %wd instead of HOST_WIDE_INT_PRINT_DEC in diagnostic .
      	* config/v850/v850.c (construct_save_jarl): Remove trailing '\n'
      	from diagnostic.
      	* convert.c (convert_to_integer, convert_to_vector): Use %' in
      	diagnostics.
      	* dbgcnt.c (dbg_cnt_process_opt): Start diagnostic with lowercase
      	letter and use "cannot" spelling.
      	* expmed.c (extract_fixed_bit_field): Start diagnostic with
      	lowercase letter and format as a single sentence without '.'.
      	* ggc-common.c (write_pch_globals, gt_pch_save, gt_pch_restore):
      	Use %' in diagnostics.
      	* ggc-page.c (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read):
      	Use %' in diagnostics.
      	* ggc-zone.c (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read):
      	Use %' in diagnostics.
      	* graph.c (clean_graph_dump_file): Use %' in diagnostic.
      	* graphite-poly.c (graphite_read_scop_file): Start diagnostics
      	with lowercase letters and remove tailing '.' and '\n'.
      	* lto-cgraph.c (input_profile_summary): Start diagnostic with
      	lowercase letter and remove trailing '.'.
      	(input_cgraph): Start diagnostics with lowercase letters and
      	remove trailing '\n'.
      	* opts.c (finish_options, common_handle_option): Start diagnostics
      	with lowercase letters and remove trailing '.'.  Fix typo in
      	diagnostic.
      	* passes.c (position_pass): Start diagnostic with lowercase
      	letter.	
      	* plugin.c (add_new_plugin, parse_plugin_arg_opt,
      	register_callback, try_init_one_plugin): Start diagnostics with
      	lowercase letters.
      	* reload1.c (spill_failure): Use %' in diagnostic.
      	(gen_reload): Start diagnostic with a lowercase letter.
      	* stor-layout.c (place_field): Start diagnostic with a lowercase
      	letter.
      	* toplev.c (open_auxiliary_file): Use %' in diagnostic.
      	* tree-cfg.c (verify_expr, verify_types_in_gimple_reference,
      	verify_gimple_call, verify_gimple_phi, verify_eh_throw_stmt_node):
      	Start diagnostics with lowercase letters, remove trailing '.' and
      	use %' in diagnostics.
      	* tree-ssa.c (verify_def): Remove trailing '.' from diagnostic.
      	(verify_ssa): Don't split diagnostic across two error calls.
      	Spell out "number" and use %' in diagnostic.
      	* value-prof.c (visit_hist, check_counter): Start diagnostics with
      	lowercase letters.
      
      c-family:
      	* c-common.c (handle_mode_attribute): Use %' and word "signedness"
      	in diagnostic.
      	* c-opts.c (c_common_parse_file): Start diagnostics with lowercase
      	letter.
      	* c-pragma.c (handle_pragma_target, handle_pragma_optimize):
      	Remove trailing '.' from diagnostics.
      	* c.opt (Wwrite-strings_: Avoid '`' in help text.
      
      cp:
      	* cvt.c (cp_convert_to_pointer): Use %' in diagnostic.
      	* decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator):
      	Use %' in diagnostics.
      	* decl2.c (check_classfn): Use %' in diagnostic.
      	* init.c (build_java_class_ref): Use %' in diagnostic.
      	(build_delete): Remove trailing '.' from diagnostic.
      	* method.c (do_build_copy_assign, walk_field_subobs): Use %' in
      	diagnostics.
      	* name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic.
      	* parser.c (cp_parser_exception_specification_opt): Remove
      	trailing '.' from diagnostic.
      	(cp_parser_objc_interstitial_code): Use %qs for quoting in
      	diagnostic.
      	* pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in
      	diagnostic.
      	* repo.c (reopen_repo_file_for_write): Use %' in diagnostic.
      
      fortran:
      	* trans-array.c (gfc_trans_deferred_array): Use "front-end"
      	spelling in diagnostic.
      	* trans.c (gfc_allocate_array_with_status): Add missing space in
      	diagnostic.
      
      java:
      	* expr.c (expand_java_field_op): Use %' in diagnostic.
      	* jcf-parse.c (java_parse_file): Use %' in diagnostics.
      	* jvspec.c (lang_specific_driver): Use %' in diagnostic.
      	* lang.c (java_post_options): Use %' in diagnostics.
      
      lto:
      	* lto.c (lto_resolution_read): Start diagnostics with lowercase
      	letters and remove trailing '.'.
      	(lto_file_finalize): Start diagnostic with a lowercase letter.
      
      objc:
      	* objc-act.c (objc_init): Use %' in diagnostic.
      	(objc_set_method_opt): Remove trailing '.' from diagnostic.
      
      From-SVN: r166570
      Joseph Myers committed
    • common.opt (flag_excess_precision_cmdline, [...]): New Variable declarations. · d5478783
      	* common.opt (flag_excess_precision_cmdline, flag_generate_lto,
      	warn_larger_than, larger_than_size, warn_frame_larger_than,
      	frame_larger_than_size, flag_gen_aux_info, flag_shlib,
      	default_visibility, flag_tls_default): New Variable declarations.
      	(aux-info, auxbase, dumpbase, dumpdir, falign-functions=,
      	falign-jumps=, falign-labels=, falign-loops=, o, v): Use Var.
      	(v): Declare as Common and document here.
      	* flags.h (default_visibility, flag_generate_lto,
      	warn_larger_than, larger_than_size, warn_frame_larger_than,
      	frame_larger_than_size, flag_gen_aux_info, flag_pedantic_errors,
      	flag_shlib, flag_excess_precision_cmdline): Remove.
      	(set_Wstrict_aliasing): Update prototype.
      	* gcc.c (verbose_flag): Remove.
      	(driver_handle_option): Add diagnostic_context parameter.  Don't
      	handle OPT_v explicitly here.  Set verbose_flag to 1 rather than
      	incrementing it.
      	* opts-common.c (handle_option): Pass dc to handler.
      	* opts.c (warn_larger_than, larger_than_size,
      	warn_frame_larger_than, frame_larger_than_size,
      	default_visibility): Remove.
      	(common_handle_option): Add diagnostic_context parameter.
      	(set_fast_math_flags, set_unsafe_math_optimizations_flags): Add
      	gcc_options parameters.
      	(lang_handle_option, target_handle_option, read_cmdline_options,
      	decode_options): Add diagnostic_context parameters.
      	(finish_options): Access option state through opts pointer where
      	possible.
      	(common_handle_option): Access option state through opts pointer
      	where possible.  Do not set local static variable verbose.  Do not
      	explicitly handle OPT_v, OPT_Wstrict_aliasing_,
      	OPT_Wstrict_overflow_, OPT_Wunused, OPT_auxbase, OPT_dumpbase,
      	OPT_dumpdir, OPT_falign_functions_, OPT_falign_jumps_,
      	OPT_falign_labels_, OPT_falign_loops_, OPT_fira_verbose_, OPT_o or
      	OPT_fwhopr_.  Do not explicitly set .opt file variables for
      	OPT_aux_info or OPT_pedantic_errors.  Use dc for diagnostic
      	context.
      	(set_Wstrict_aliasing): Add gcc_options parameter.
      	* opts.h (struct cl_option_handler_func): Add diagnostic_context
      	parameter to handler.
      	(decode_options): Add diagnostic_context parameter.
      	* toplev.c (dump_base_name, dump_dir_name, aux_base_name,
      	asm_file_name, flag_generate_lto, flag_gen_aux_info,
      	aux_info_file_name, flag_shlib, flag_tls_default,
      	flag_excess_precision_cmdline, flag_pedantic_errors): Remove.
      	(toplev_main): Pass global_dc to decode_options.
      	* toplev.h (dump_base_name, dump_dir_name, aux_base_name,
      	aux_info_file_name, asm_file_name): Remove.
      	* tree.h (flag_tls_default): Remove.
      
      c-family:
      	* c-common.c (parse_optimize_options): Pass global_dc to
      	decode_options.
      	* c-opts.c (c_common_handle_option): Pass &global_options to
      	set_Wstrict_aliasing.
      	* c.opt (v): Don't mark Common or document here.
      
      fortran:
      	* cpp.c (asm_file_name): Don't declare here.
      
      objc:
      	* objc-act.c (dump_base_name): Don't declare here.
      
      From-SVN: r166565
      Joseph Myers committed
  16. 08 Nov, 2010 3 commits
    • In gcc/objc/: 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com> · d36dba07
      In gcc/objc/:
      2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_add_dynamic_declaration_for_property): Do not
              search for the @property declation only in the current context,
              but also in inherited properties.  Do not mark the original
              PROPERTY_DECL in the @interface or @protocol with
              PROPERTY_DYNAMIC.
              (check_methods): To check if a method is associated with a
              @dynamic property, search for the property in IMPL_PROPERTY_DECL.
              (check_accessible_methods): Same change.
              * objc-act.h: Updated comment.
      
      In gcc/testsuite/:
      2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/dynamic-4.m: New.
              * objc.dg/property/dynamic-5.m: New.
              * objc.dg/property/dynamic-6.m: New.    
              * obj-c++.dg/property/dynamic-4.mm: New.
              * obj-c++.dg/property/dynamic-5.mm: New.
              * obj-c++.dg/property/dynamic-6.mm: New.
      
      2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/dotsyntax-13.m: New.
              * objc.dg/property/dotsyntax-14.m: New.
              * objc.dg/property/dotsyntax-15.m: New. 
              * objc.dg/property/synthesize-7.m: New.
              * obj-c++.dg/property/dotsyntax-13.mm: New.
              * obj-c++.dg/property/dotsyntax-14.mm: New.
              * obj-c++.dg/property/dotsyntax-15.mm: New.     
              * obj-c++.dg/property/synthesize-7.mm: New.
      
      From-SVN: r166457
      Nicola Pero committed
    • In gcc/objc/: 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com> · 4741888d
      In gcc/objc/:
      2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_add_synthesize_declaration_for_property):
              Iterate over IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when
              checking for an existing @synthesize or @dynamic declaration.
              Search for an inherited @property declaration if none is found in
              the local interface.  If the required instance variable does not
              exist, return instead of trying to continue to prevent a compiler
              crash later.  Check that the instance variable is not already
              being used by another @synthesize.
              (objc_add_dynamic_declaration_for_property): Iterate over
              IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when checking for an
              existing @synthesize or @dynamic declaration.
              (objc_synthesize_getter): Search for the getter declaration in
              protocols and superclasses as well.
              (objc_synthesize_setter): Search for the setter declaration in
              protocols and superclasses as well.
      
      In gcc/testsuite/:
      2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/synthesize-3.m: New.
              * objc.dg/property/synthesize-4.m: New.
              * objc.dg/property/synthesize-5.m: New.
              * objc.dg/property/synthesize-6.m: New.
              * obj-c++.dg/property/synthesize-3.mm: New.
              * obj-c++.dg/property/synthesize-4.mm: New.
              * obj-c++.dg/property/synthesize-5.mm: New.
              * obj-c++.dg/property/synthesize-6.mm: New.
      
      From-SVN: r166456
      Nicola Pero committed
    • In gcc/objc/: 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com> · 4ca5d2a7
      In gcc/objc/:
      2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (lookup_property): When checking categories, also
              check the protocols attached to each.
              (objc_add_property_declaration): Determine the
              PROPERTY_SETTER_NAME and PROPERTY_GETTER_NAME here.  Tidied up
              error message.  Search for an existing property declaration with
              the same name which would be inherited from the class hiearchy,
              and produce an error if it has incompatible attributes.
              (check_methods): Changed second parameter.  If the method is a
              getter or setter for a property, do not warn if it is inherited as
              opposed to implemented directly in the class.
              (check_protocol): Updated calls to check_methods.
              (finish_class): Do not determine the PROPERTY_SETTER_NAME and
              PROPERTY_GETTER_NAME here; this is now done earlier, in
              objc_add_property_declaration.
              * objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Added comments.
      
      In gcc/testsuite/:
      2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/at-property-5.m: Updated test.       
              * objc.dg/property/at-property-16.m: New.
              * objc.dg/property/at-property-17.m: New.
              * objc.dg/property/at-property-18.m: New.
              * objc.dg/property/at-property-19.m: New.       
              * objc.dg/property/dotsyntax-12.m: New
              * objc.dg/protocol-inheritance-1.m: New.
              * objc.dg/protocol-inheritance-2.m: New.
              * obj-c++.dg/property/at-property-5.mm: Updated test.
              * obj-c++.dg/property/at-property-16.mm: New.
              * obj-c++.dg/property/at-property-17.mm: New.
              * obj-c++.dg/property/at-property-18.mm: New.
              * obj-c++.dg/property/at-property-19.mm: New.   
              * obj-c++.dg/protocol-inheritance-1.mm: New.
              * obj-c++.dg/protocol-inheritance-2.mm: New.
              * obj-c++.dg/property/dotsyntax-12.mm: New.
      
      From-SVN: r166455
      Nicola Pero committed
  17. 06 Nov, 2010 2 commits
    • In gcc/objc/: 2010-11-05 Nicola Pero <nicola.pero@meta-innovation.com> · a9625a91
      In gcc/objc/:
      2010-11-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Fixed using the Objective-C 2.0 syntax with self and super.
              * objc-act.c (OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS): New.
              (maybe_make_artificial_property_decl): Added 'implementation'
              argument.  Use OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS when
              looking up getters or setters for a class.  If an implementation
              is specified, search it as well for a getter or setter.
              (objc_maybe_build_component_ref): Updated calls to
              maybe_make_artificial_property_decl; added code to deal with
              'self' and 'super' and with methods declared locally in the
              implementation.  Store the getter call expression in the
              PROPERTY_REF instead of throwing it away.
              (objc_build_class_component_ref): Updated calls to
              maybe_make_artificial_property_decl, and store the getter call
              expression in PROPERTY_REF instead of throwing it away.
              (lookup_method_static): Implemented
              OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS option.
              (objc_gimplify_property_ref): Do not build the getter method call
              here; instead use the one stored in the PROPERTY_REF.  If it's not
              there, produce helpful error messages.
              * objc-tree.def (PROPERTY_REF): Increased the number of operands
              from 2 to 3.  Updated comments.
              * objc-act.h (PROPERTY_REF_GETTER_CALL): New.
      
      In gcc/testsuite/:
      2010-11-05  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Fixed using the Objective-C 2.0 dot-syntax with self and super.
              * objc.dg/property/dotsyntax-5.m: New.
              * objc.dg/property/dotsyntax-6.m: New.
              * objc.dg/property/dotsyntax-7.m: New.
              * objc.dg/property/dotsyntax-8.m: New.
              * objc.dg/property/dotsyntax-9.m: New.
              * objc.dg/property/dotsyntax-10.m: New.
              * objc.dg/property/dotsyntax-11.m: New.
              * obj-c++.dg/property/dotsyntax-5.mm: New.
              * obj-c++.dg/property/dotsyntax-6.mm: New.
              * obj-c++.dg/property/dotsyntax-7.mm: New.
              * obj-c++.dg/property/dotsyntax-8.mm: New.
              * obj-c++.dg/property/dotsyntax-9.mm: New.
              * obj-c++.dg/property/dotsyntax-10.mm: New.
              * obj-c++.dg/property/dotsyntax-11.mm: New.
      
      From-SVN: r166402
      Nicola Pero committed
    • NS/CF String format syntax parsing. · 91ebb981
      gcc:
      
      	PR target/44981
      	* doc/extend.tex (format): Document NSString extension.
      	(format_arg): Likewise.
      	(Darwin Format Checks): New section.
      	* doc/tm.texi: Document string object hooks (generated).
      	* doc/tm.texi.in (TARGET_OBJC_CONSTRUCT_STRING_OBJECT) Rename.
      	(TARGET_STRING_OBJECT_REF_TYPE_P): New.
      	(TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): New.
      	* target.def (objc_construct_string_object): Rename, amend 
      	documentation.
      	(string_object_ref_type_p): New hook.
      	(check_string_object_format_arg): New hook.
      	* c-parser.c (c_parser_attributes): Allow objective-c class names as
      	attribute identifiers.
      	* config/darwin-c.c (darwin_cfstring_ref_p): New.
      	(darwin_check_cfstring_format_arg): New.
      	(darwin_additional_format_types): New.
      	* config/darwin-protos.h (darwin_cfstring_ref_p) New.
      	(darwin_check_cfstring_format_arg): New.
      	* config/darwin.h (TARGET_OBJC_CONSTRUCT_STRING_OBJECT) Renamed.
      	(TARGET_STRING_OBJECT_REF_TYPE_P): New.
      	(TARGET_N_FORMAT_TYPES): New.
      	(TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): New.
      
      gcc/c-family:
      
      	PR target/44981
      	* c-format.c (format_type): New type gcc_objc_string_format_type.
      	(valid_stringptr_type_p): New.
      	(handle_format_arg_attribute): Use valid_stringptr_type_p ().
      	(check_format_string): Pass expected type, use 
      	valid_stringptr_type_p (), check that the format string types are
      	consistent with the format specification.
      	(decode_format_attr): Warn if NSString is used outside objective-c.
      	(format_types_orig): Add NSString.
      	(format_name): New.
      	(format_flags): New.
      	(check_format_arg): Handle format strings requiring an external parser.
      	first_target_format_type: New variable.
      	(handle_format_attribute): Set up first_target_format_type, pass the
      	expected format arg string type to check_format_string().
      	* c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL):  New flag.
      	* stub-objc.c (objc_string_ref_type_p): New.
      	(objc_check_format_arg): New.
      
      gcc/objc:
      
      	PR target/44981
      	* objc-act.c (objc_build_string_object): Amend for renamed hook.
      	(objc_string_ref_type_p): New.
      	(objc_check_format_arg): New.
      
      gcc/testsuite:
      
      	PR target/44981
      	* gcc.dg/darwin-cfstring-format-1.c: New.
      	* gcc.dg/warn-nsstring.c: New.
      	* objc.dg/fsf-nsstring-format-1.m: New.
      	* obj-c++.dg/fsf-nsstring-format-1.mm: New.
      	* obj-c++.dg/torture/strings/const-cfstring-1.mm: Update for darwin10
      	linker warning.
      
      From-SVN: r166398
      Iain Sandoe committed
  18. 04 Nov, 2010 1 commit
    • In gcc/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com> · bede2adc
      In gcc/:
      2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Fixed using the Objective-C 2.0 dot-syntax with class names.
              * c-parser.c (c_parser_next_token_starts_declspecs): In
              Objective-C, detect Objective-C 2.0 dot-syntax with a class name.
              (c_parser_next_token_starts_declaration): Same.
              (c_parser_postfix_expression): Parse the Objective-C 2.0
              dot-syntax with a class name.
      
      In gcc/cp/:
      2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Fixed using the Objective-C 2.0 dot-syntax with class names.
              * parser.c (cp_parser_primary_expression): Recognize Objective-C
              2.0 dot-syntax with class names and process it.
              (cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax
              with class names.
              (cp_parser_class_name): Same change.
              (cp_parser_simple_type_specifier): Tidied comments.
      
      In gcc/c-family/:
      2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Fixed using the Objective-C 2.0 dot-syntax with class names.
              * c-common.h (objc_build_class_component_ref): New.
              * stub-objc.c (objc_build_class_component_ref): New.
      
      In gcc/objc/:
      2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Fixed using the Objective-C 2.0 dot-syntax with class names.
              * objc-act.c (objc_build_class_component_ref): New.
      
      In gcc/testsuite/:
      2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Fixed using the Objective-C 2.0 dot-syntax with class names.
              * objc.dg/property/dotsyntax-3.m: New.
              * objc.dg/property/dotsyntax-4.m: New.
              * obj-c++.dg/property/dotsyntax-3.mm: New.
              * obj-c++.dg/property/dotsyntax-4.mm: New.
      
              * objc.dg/fobjc-std-1.m: Added test for warnings when the
              Objective-C 2.0 dot-syntax is used with class names.
              * obj-c++.dg/fobjc-std-1.mm: Same change.
      
      From-SVN: r166333
      Nicola Pero committed
  19. 03 Nov, 2010 3 commits
    • In gcc/c-family/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com> · 9a179d01
      In gcc/c-family/:
      2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* c.opt (Wproperty-assign-default): New option.
      
      In gcc/objc/:
      2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc-act.c (objc_add_dynamic_declaration): Allow @dynamic in a
      	category.
      	(objc_type_valid_for_messaging): Added 'accept_classes' argument;
      	if set to 'true', return 'true' for Class objects.  Do not remove
      	more than on pointer indirection.
      	(objc_add_property_declaration): Only warn about 'assign'
      	semantics for Objective-C objects if warn_property_assign_default;
      	and do not warn if the property is readonly or if the type is a Class.
      	(objc_finish_foreach_loop): Updated calls to
      	objc_type_valid_for_messaging.
      	
      In gcc/testsuite/:
      2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
      
      	* objc.dg/property/dynamic-2.m: Updated for the fact that @dynamic
      	is now allowed in categories.
      	* obj-c++.dg/property/dynamic-2.mm: Same change.
      	* objc.dg/property/dynamic-3.m: New.
      	* obj-c++.dg/property/dynamic-3.mm: New.
      	* objc.dg/property/at-property-14.m: New.
      	* objc.dg/property/at-property-15.m: New.
      	* obj-c++.dg/property/at-property-14.mm: New.
      	* obj-c++.dg/property/at-property-15.mm: New.	
      
      	* objc.dg/foreach-6.m: Added a few more tests for valid and
      	invalid iterating variables and collections.
      
      From-SVN: r166287
      Nicola Pero committed
    • In gcc/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com> · 22d8d616
      In gcc/:
      2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented -fobjc-std=objc1 flag.
              * doc/invoke.texi (Option Summary): Document -fobjc-std=objc1
              option.
              * doc/standards.texi (Standards): Updated the section on
              Objective-C; mention support for Objective-C 2.0 features and the
              new -fstd-objc=objc1 flag to disable them.
      
      In gcc/c-family/:
      2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented -fobjc-std=objc1 flag.
              * c.opt (fobjc-std=objc1): New option.
      
      In gcc/objc/:
      2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented -fobjc-std=objc1 flag.
              * objc-act.c (objc_start_class_interface): If attributes are
              specified when flag_objc1_only is set, print an error.
              (objc_start_category_interface): Same change.
              (objc_start_protocol): Same change.
              (objc_add_method_declaration): Same change.
              (objc_start_method_definition): Same change.
              (objc_build_keyword_decl): Same change.
              (objc_set_method_opt): If flag_objc1_only is set, print an error.
              (objc_add_property_declaration): Same change.
              (objc_add_synthesize_declaration): Same change.
              (objc_add_dynamic_declaration): Same change.
              (objc_finish_foreach_loop): Same change.
              (objc_maybe_build_component_ref): If flag_objc1_only is set,
              return immediately.
      
      In gcc/testsuite/:
      2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented -fobjc-std=objc1 flag.
              * objc.dg/fobjc-std-1.m: New.
              * obj-c++.dg/fobjc-std-1.mm: New.
      
      From-SVN: r166246
      Nicola Pero committed
    • In gcc/objc/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com> · 43236c26
      In gcc/objc/:
      2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (maybe_make_artificial_property_decl): New.
              (objc_maybe_build_component_ref): Call
              maybe_make_artificial_property_decl if a property can not be
              found.  Do not call objc_finish_message_expr if
              PROPERTY_HAS_NO_GETTER.
              * objc-act.h Updated comments.
              (PROPERTY_HAS_NO_GETTER): New.
              (PROPERTY_HAS_NO_SETTER): New.
              * objc-tree.def: Updated comment.
      
      In gcc/testsuite/:
      2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/dotsyntax-1.m: New.
              * objc.dg/property/dotsyntax-2.m: New.
              * obj-c++.dg/property/dotsyntax-1.mm: New.
              * obj-c++.dg/property/dotsyntax-2.mm: New.
      
      From-SVN: r166237
      Nicola Pero committed
  20. 01 Nov, 2010 3 commits
    • In gcc/c-family/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com> · 2debdb4f
      In gcc/c-family/:
      2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented format and noreturn attributes for Objective-C methods.
              * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
              attribute for Objective-C methods.
      
      In gcc/objc/:
      2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented format and noreturn attributes for Objective-C methods.
              * objc-act.c (objc_start_method_definition): If method attributes
              are specified emit a warning and ignore them.
              (build_objc_method_call): Moved deprecation warnings from here ...
              (objc_finish_message_expr): to here.  Do not emit deprecation
              warnings if the receiver is of type 'id'.
              (really_start_method): Install 'deprecation' and 'noreturn'
              attributes.
              (objc_decl_method_attributes): Carefully filter out the list of
              attributes, allowing only "noreturn", "format", "sentinel" and
              "deprecated".  In the case of "format", adjust the arguments.
              Always process the attributes in the same way no matter if
              "sentinel" is in the list or not.
      
      In gcc/testsuite/:
      2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented format and noreturn attributes for Objective-C methods.
              * objc.dg/attributes/method-attribute-2.m: Updated warnings.
              * objc.dg/attributes/method-deprecated-1.m: New.
              * objc.dg/attributes/method-deprecated-2.m: New.
              * objc.dg/attributes/method-deprecated-3.m: New.
              * objc.dg/attributes/method-noreturn-1.m: New.
              * objc.dg/attributes/method-sentinel-1.m: New.
              * objc.dg/attributes/method-format-1.m: New.
              * obj-c++.dg/attributes/method-attribute-2.mm: Updated warnings.
              * obj-c++.dg/attributes/method-deprecated-1.mm: New.
              * obj-c++.dg/attributes/method-deprecated-2.mm: New.
              * obj-c++.dg/attributes/method-deprecated-3.mm: New.
              * obj-c++.dg/attributes/method-noreturn-1.mm: New.
              * obj-c++.dg/attributes/method-sentinel-1.mm: New.
              * obj-c++.dg/attributes/method-format-1.mm: New.
      
      From-SVN: r166153
      Nicola Pero committed
    • In gcc/objc/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com> · 8f78939b
      In gcc/objc/:
      2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc-act.c (objc_maybe_build_component_ref): Warn about using
              deprecated properties.
              (objc_maybe_printable_name): Support PROPERTY_DECL.
              
      In gcc/testsuite/:
      2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              * objc.dg/property/at-property-deprecated-1.m: New.
              * obj-c++.dg/property/at-property-deprecated-1.mm: New.
      
      From-SVN: r166147
      Nicola Pero committed
    • In gcc/objc/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com> · 8f07a2aa
      In gcc/objc/:
      2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented Objective-C 2.0 property accessors. 
              * objc-act.h (enum objc_tree_index): Added OCTI_GET_PROPERTY_DECL,
              OCTI_SET_PROPERTY_DECL, OCTI_COPY_STRUCT_DECL,
              OCTI_GET_PROPERTY_STRUCT_DECL and OCTI_SET_PROPERTY_STRUCT_DECL.
              (objc_getProperty_decl): New.
              (objc_setProperty_decl): New.
              (objc_copyStruct_decl): New.
              (objc_getPropertyStruct_decl): New.
              (objc_setPropertyStruct_decl): New.
              * objc-act.c (build_objc_property_accessor_helpers): New.
              (synth_module_prologue): Call
              build_objc_property_accessor_helpers.
              (lookup_ivar): New.
              (objc_synthesize_getter): Implemented synthesizing getters that
              work with properties that are not nonatomic, assign properties.
              (objc_synthesize_setter): Implemented synthesizing setters that
              work with properties that are not nonatomic, assign properties.
      
      In gcc/testsuite/:      
      2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
      
              Implemented Objective-C 2.0 property accessors.
              * objc.dg/property/at-property-6.m: Use nonatomic properties to
              avoid testing more complex accessors in this testcase which is not
              about them.
              * objc.dg/property/at-property-7.m: Same change.
              * objc.dg/property/at-property-8.m: Same change.
              * objc.dg/property/at-property-9.m: Same change.
              * objc.dg/property/at-property-10.m: Same change.
              * objc.dg/property/at-property-11.m: Same change.
              * obj-c++.dg/property/at-property-6.mm: Same change.
              * obj-c++.dg/property/at-property-7.mm: Same change.
              * obj-c++.dg/property/at-property-8.mm: Same change.
              * obj-c++.dg/property/at-property-9.mm: Same change.
              * obj-c++.dg/property/at-property-10.mm: Same change.
              * obj-c++.dg/property/at-property-11.mm: Same change.
              * objc.dg/property/at-property-12.m: New.
              * objc.dg/property/at-property-13.m: New.
              * obj-c++.dg/property/at-property-12.mm: New.
              * obj-c++.dg/property/at-property-13.mm: New.
      
      From-SVN: r166143
      Nicola Pero committed