X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fobjc%2FChangeLog;h=09cc1f6f98468cac3f9260c54fc6775e8f08ff3c;hb=40ec327c484f09c7fc9c11e5633101cfc391683c;hp=61c5a961c3d27b7c06f24e7284129bc4f0d36ffa;hpb=1ef143b60593f2ea5cc4096ce679c6a35fa1b338;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 61c5a961c3d..09cc1f6f984 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,336 @@ +2010-12-08 Nicola Pero + + * objc-act.c (objc_build_throw_stmt): Check that the argument of + @throw is an object and emit an error if not. + +2010-12-08 Nicola Pero + + * objc-act.c (objc_finish_foreach_loop): Use error_at() instead of + error() when printing an error about the iterating variable or + collection not being an object. + +2010-12-06 Nicola Pero + + * objc-act.c (objc_finish_foreach_loop): Mark the + object_expression as used. + +2010-12-06 Nicola Pero + + * objc-act.c: Include c-family/c-objc.h. + * objc-lang.c: Same change. + * Make-lang.in (objc/objc-act.o): Depend on + c-family/c-objc.h. + (objc/objc-lang.o): Same change. + * config-lang.in (gtfiles): Added c-family/c-objc.h. + +2010-12-02 Joseph Myers + + * lang-specs.h: Don't handle -ftraditional. + +2010-12-02 Nicola Pero + + * objc-act.c (objc_build_throw_stmt): Return error_mark_node and + not NULL_TREE when a @throw is used outside of a @catch block. + +2010-11-30 Nicola Pero + + * 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. + +2010-11-29 Nicola Pero + Mike Stump + + Allow 'make check-objc -j2' + * Make-lang.in (lang_checks_parallelized): New. + (check_objc_parallelize): New. + +2010-11-29 Nicola Pero + + * 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. + +2010-11-29 Nicola Pero + + * objc-act.c (objc_maybe_build_component_ref): Removed TODO. + +2010-11-29 Nicola Pero + + * 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. + +2010-11-29 Nicola Pero + + * objc-act.c (objc_demangle): Return immediately if the string is + too short. Detect names that do not need demangling, and return + them unchanged. + +2010-11-27 Nicola Pero + + 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. + +2010-11-27 Nicola Pero + + * 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. + +2010-11-25 Nicola Pero + + * 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. + +2010-11-23 Nicola Pero + + 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. + +2010-11-22 Joseph Myers + + * objc-act.c (write_symbols): Don't declare here. + +2010-11-22 Nicola Pero + + PR objc/41108 + * objc-act.c (objc_generate_write_barrier): Added assert to make sure + this function is only called with the next runtime. + +2010-11-20 Jakub Jelinek + + PR c/46547 + * objc-act.c (in_late_binary_op): Remove. + +2010-11-19 Nicola Pero + + * 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. + +2010-11-19 Nicola Pero + + * 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. + +2010-11-17 Nicola Pero + + * 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. + +2010-11-15 Nicola Pero + + * 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. + +2010-11-15 Nicola Pero + + * 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. + +2010-11-14 Nicola Pero + + * 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'. + +2010-11-13 Nicola Pero + + * 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. + +2010-11-11 Nicola Pero + + * 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). + (objc_add_synthesize_declaration_for_property): Check that the + property to synthesize and the instance variable to use have the + same type. + +2010-11-10 Joseph Myers + + * objc-act.c (objc_init): Use %' in diagnostic. + (objc_set_method_opt): Remove trailing '.' from diagnostic. + +2010-11-10 Joseph Myers + + * objc-act.c (dump_base_name): Don't declare here. + +2010-11-08 Nicola Pero + + * 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. + +2010-11-08 Nicola Pero + + * 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. + +2010-11-08 Nicola Pero + + * 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. + +2010-11-06 Nicola Pero + + Fixed using the Objective-C 2.0 dot-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. + +2010-11-06 Iain Sandoe + + 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. + +2010-11-04 Nicola Pero + + Fixed using the Objective-C 2.0 dot-syntax with class names. + * objc-act.c (objc_build_class_component_ref): New. + +2010-11-03 Nicola Pero + + * 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. + 2010-11-03 Nicola Pero Implemented -fobjc-std=objc1 flag. @@ -563,7 +896,7 @@ (objc_push_parm): Rebuild the PARM_DECL if its type has been decayed. -2010-09-28 Nicola Pero +2010-09-28 Nicola Pero * objc-act.c (encode_type): Fixed encoding enums with the next runtime.