aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
AgeCommit message (Collapse)AuthorFilesLines
2011-04-10Remove doubled up words.Mike Stump1-1/+1
From-SVN: r172247
2011-04-06tm.texi.in: Document C target hooks as separate from general target hooks.Joseph Myers3-2/+8
* doc/tm.texi.in: Document C target hooks as separate from general target hooks. * doc/tm.texi: Regenerate. * genhooks.c (struct hook_desc): Add docname field. (HOOK_VECTOR_1, DEFHOOKPOD, DEFHOOK, DEFHOOK_UNDOC). Initialize docname field. (hook_array): Include c-target.def. (emit_documentation): Use docname field in output. (emit_init_macros): Take docname argument. Only emit definitions for hooks matching docname. (main): Expect additional arguments in all cases. Pass argument to emit_init_macros. * target.def: Move initial macro definitions and comments to target-hooks-macros.h. (gcc_targetcm): Move to c-family/c-target.def. * target.h (targetcm): Move declaration to c-family/c-target.h. * targhooks.c (default_handle_c_option): Move to c-family/c-opts.c. * targhooks.h (default_handle_c_option): Move declaration to c-family/c-common.h. * target-hooks-macros.h: New file. * config.gcc (target_has_targetcm): Define and use to add to c_target_objs and cxx_target_objs. * config/default-c.c: New file. * config/darwin-c.c: Include c-target.h and c-target-def.h instead of target.h and target-def.h. (TARGET_HANDLE_C_OPTION, targetcm): Define later in file. (darwin_objc_construct_string, darwin_cfstring_ref_p, darwin_check_cfstring_format_arg): Make static. (TARGET_OBJC_CONSTRUCT_STRING_OBJECT, TARGET_STRING_OBJECT_REF_TYPE_P, TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): Define here. * config/darwin-protos.h (darwin_objc_construct_string, darwin_cfstring_ref_p, darwin_check_cfstring_format_arg): Don't declare. * config/darwin.h (TARGET_OBJC_CONSTRUCT_STRING_OBJECT, TARGET_STRING_OBJECT_REF_TYPE_P, TARGET_CHECK_STRING_OBJECT_FORMAT_ARG, TARGET_HAS_TARGETCM): Remove. * config/t-darwin (darwin-c.o): Update dependencies. * system.h (TARGET_HAS_TARGETCM): Poison. * Makefile.in (TARGET_H): Update. (TARGET_DEF, C_TARGET_DEF, C_TARGET_H, C_TARGET_DEF_H): Define. (c-family/c-format.o, c-family/c-opts.o): Update dependencies. (default-c.o): New target. (s-target-hooks-def-h): Pass "Target Hook" string to genhooks. (c-family/c-target-hooks-def.h, s-c-target-hooks-def-h): New targets. (s-tm-texi): Pass -d option to genhooks. Also test timestamp on c-target.def. (build/genhooks.o): Update dependencies. c-family: * c-target-def.h: New file. * c-target.def: New file. * c-target.h: New file. * c-common.c (targetcm): Don't define here. * c-common.h (default_handle_c_option): Declare. * c-format.c: Include c-target.h instead of target.h. * c-opts.c: Include c-target.h instead of target.h. Explicitly include tm.h. (default_handle_c_option): Move from targhooks.c. objc: * objc-act.c: Include c-target.h instead of target.h. * Make-lang.in (objc/objc-act.o): Update dependencies. From-SVN: r172035
2011-03-06lang-specs.h: Match -save-temps* instead of -save-temps.Joseph Myers2-6/+10
cp: * lang-specs.h: Match -save-temps* instead of -save-temps. objc: * lang-specs.h: Match -save-temps* instead of -save-temps. objcp * lang-specs.h: Match -save-temps* instead of -save-temps. From-SVN: r170715
2011-02-26Implemented encoding property types for new ObjC ABIsNicola Pero2-21/+58
From-SVN: r170516
2011-02-23Removed conflict in usage of TYPE_LANG_SLOT_0 between Objective-C and CNicola Pero3-6/+8
From-SVN: r170436
2011-02-22Fixed check for flexible array members used in Objective-C instance variablesNicola Pero2-24/+102
From-SVN: r170412
2011-02-22* Make-lang.in (check_objc_parallelize): Refine for 4 processor machines.Mike Stump2-2/+5
From-SVN: r170391
2011-02-20Fixed ChangeLog dates of my last two commitsNicola Pero1-2/+2
From-SVN: r170344
2011-02-20Reverted usage of TARGET_64BIT for code generation for GNU Objective-C runtimeNicola Pero3-19/+26
From-SVN: r170343
2011-02-20Fixed Objective-C dotsyntax with a constant type right-hand sideNicola Pero2-27/+55
From-SVN: r170342
2011-02-19Updated commentsNicola Pero3-285/+336
From-SVN: r170308
2011-02-19Updated comments in objc-act.cNicola Pero2-3/+25
From-SVN: r170299
2011-02-19Updated comments - no change in codeNicola Pero7-52/+76
From-SVN: r170298
2011-02-19Do no emit GNU metadata if there is nothing to put into itNicola Pero2-5/+22
From-SVN: r170292
2011-02-18Added support for the 64-bit Apple Objective-C runtimeIain Sandoe13-4613/+11460
From-SVN: r170260
2011-01-17In gcc/objc/: 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-1/+7
In gcc/objc/: 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47314 * objc-act.c (finish_objc): When calling check_duplicates to check duplicated instance methods, set 'is_class' to 0, not 1. In gcc/testsuite/: 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47314 * objc.dg/selector-warn-1.m: New. * obj-c++.dg/selector-warn-1.mm: New. From-SVN: r168934
2011-01-14re PR target/19162 (ICE while building libobjc's sendmsg.c)Mike Stump1-0/+1
PR 19162 * objc-act.c (generate_struct_by_value_array): Do not output a definition for struct_forward_array. From-SVN: r168824
2011-01-14objc-act.c (generate_struct_by_value_array): Do not output a definition for ↵Ben Elliston2-9/+6
struct_forward_array. 2011-01-14 Ben Elliston <bje@au.ibm.com> * objc-act.c (generate_struct_by_value_array): Do not output a definition for struct_forward_array. From-SVN: r168823
2011-01-08update gcc/objc/Changelog copyright years.Iain Sandoe1-1/+2
From-SVN: r168603
2011-01-08objc-act.c (objc_finish_foreach_loop): Mark collection expression as read.Iain Sandoe2-0/+7
gcc/objc: * objc-act.c (objc_finish_foreach_loop): Mark collection expression as read. gcc/testsuite: * objc.dg/foreach-1.m: Add "-Wall" to flags. From-SVN: r168602
2011-01-03Update Copyright years for files modified in 2010.Jakub Jelinek4-5/+5
From-SVN: r168438
2011-01-02Fix a typo.H.J. Lu2-1/+5
2011-01-02 H.J. Lu <hongjiu.lu@intel.com> * objc-act.c (check_that_protocol_is_defined): Fix a typo. From-SVN: r168400
2011-01-02In gcc/objc/: 2011-01-02 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-4/+27
In gcc/objc/: 2011-01-02 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (check_that_protocol_is_defined): New. (lookup_protocol): Call check_that_protocol_is_defined. In gcc/testsuite/: 2011-01-02 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/protocol-forward-1.m: Removed TODO. * objc.dg/protocol-forward-2.m: New. * obj-c++.dg/protocol-forward-2.mm: Removed TODO. * obj-c++.dg/protocol-forward-2.mm: New. From-SVN: r168398
2010-12-30Fixed typo in one of my last changelog entriesNicola Pero1-1/+1
From-SVN: r168357
2010-12-30In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-7/+34
In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_types_are_equivalent): Fixed comparing protocol lists. Check them two-ways to fix comparisons when one protocol implements the other one, or when one list contains duplicated protocols. In gcc/testsuite/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/method-conflict-3.m: New. * objc.dg/method-conflict-4.m: New. * obj-c++.dg/method-conflict-3.m: New. * obj-c++.dg/method-conflict-4.mm: New. From-SVN: r168356
2010-12-30In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-35/+107
In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_add_method): When emitting an error because a method with the same name but conflicting types is found in the same class or category interface, print a note with the location of the original method. Also, improved the error message to clearly state that the conflict is due to conflicting types, and produce it for protocols as well. Emit an error if two identical methods are declared in a protocol, but one is @required and the other one is @optional. When In gcc/testsuite/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/class-extension-3.m: Updated. * objc.dg/method-1.m: Updated. * objc.dg/method-conflict-1.m: New. * objc.dg/method-conflict-2.m: New. * obj-c++.dg/class-extension-3.mm: Updated. * obj-c++.dg/method-8.mm: Updated. * obj-c++.dg/method-conflict-1.mm: New. * obj-c++.dg/method-conflict-2.mm: New. From-SVN: r168350
2010-12-30In gcc/objc/: 2010-12-30 Nicola Pero <nicola@nicola.brainstorm.co.uk>Nicola Pero2-0/+14
In gcc/objc/: 2010-12-30 Nicola Pero <nicola@nicola.brainstorm.co.uk> * objc-act.c (start_class): Warn when a class attribute is ignored. (objc_declare_protocols): Warn when a protocol attribute in a protocol forward-declaration is ignored. (start_protocol): Warn when a protocol attribute is ignored. In gcc/testsuite/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/attributes/class-attribute-3.m: New. * objc.dg/attributes/proto-attribute-4.m: New. * obj-c++.dg/attributes/class-attribute-3.mm: New. * obj-c++.dg/attributes/proto-attribute-4.mm: New. From-SVN: r168337
2010-12-29In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-2/+17
In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_set_method_opt): Tidy up error messages. In particular, explicitly mention whether the error is due to the @optional or @required keyword instead of mentioning "@optional/@required". In gcc/testsuite/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/enhanced-proto-2.m: Updated. * obj-c++.dg/enhanced-proto-2.mm: Updated. From-SVN: r168327
2010-12-29In gcc/objc/: 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-22/+61
In gcc/objc/: 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47118 * objc-act.c (objc_build_synchronized): Check the argument of @synchronized and emit an appropriate error if it is not a valid Objective-C object. Deal gracefully with that case. Updated comments and variable names. In gcc/testsuite/: 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47118 * objc.dg/sync-3.m: New. * obj-c++.dg/sync-3.mm: New. From-SVN: r168326
2010-12-29In gcc/c-family/: 2010-12-29 Nicola Pero <nicola@nicola.brainstorm.co.uk>Nicola Pero4-28/+87
In gcc/c-family/: 2010-12-29 Nicola Pero <nicola@nicola.brainstorm.co.uk> PR objc/47075 * c-objc.h (objc_finish_message_expr): Added argument to prototype. In gcc/objc/: 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47075 * objc-act.h (PROPERTY_REF_DEPRECATED_GETTER): New. * objc-tree.def (PROPERTY_REF): Increased the number of operands from 3 to 4. * objc-act.c (objc_finish_message_expr): Added optional argument allowing to return the deprecated method prototype for deprecated methods, instead of immediately emitting the deprecation warning. (objc_maybe_build_component_ref): Do not warn for a deprecated property. When building the getter call, get the deprecated method prototype from objc_finish_message_expr() and put it into the PROPERTY_REF. (objc_build_class_component_ref): Same change. (finish_class): Mark the getter and setter as deprecated if they are generated from a deprecated property. (objc_gimplify_property_ref): If the getter is deprecated, emit a deprecation warning. (objc_build_setter_call, objc_build_message_expr, objc_finish_foreach_loop): Updated call to objc_finish_message_expr. In gcc/objcp/: 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com> * objcp-lang.c (objcp_tsubst_copy_and_build): Update call to objc_finish_message_expr. In gcc/testsuite/: 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47075 * objc.dg/property/at-property-deprecated-1.m: Updated. * objc.dg/property/at-property-deprecated-2.m: New. * objc.dg/property/dotsyntax-deprecated-1.m: New. * obj-c++.dg/property/at-property-deprecated-1.mm: Updated. * obj-c++.dg/property/at-property-deprecated-2.mm: New. * obj-c++.dg/property/dotsyntax-deprecated-1.mm: New. From-SVN: r168315
2010-12-29In gcc/objc/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-18/+54
In gcc/objc/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47076 * objc-act.c (lookup_protocol): Added 'definition_required' argument. If 'definition_required', and the protocol is not defined, emit a warning. (objc_declare_protocols): Updated call to lookup_protocol. (start_protocol): Same change. (check_protocol_recursively): Same change. (objc_build_protocol_expr): Same change. (lookup_and_install_protocols): Added definition_required argument. Pass it to lookup_protocol. (objc_get_protocol_qualified_type): Updated call to lookup_and_install_protocols. (start_class): Updated calls to lookup_and_install_protocols; pass true to 'definition_required' to get the warnings. (start_protocol): Updated calls to lookup_and_install_protocols. In gcc/testsuite/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47076 * objc.dg/protocol-forward-1.m: New. * obj-c++.dg/protocol-forward-1.mm: New. * objc.dg/attributes/proto-attribute-2.m: Updated. * objc.dg/class-protocol-1.m: Updated. * obj-c++.dg/attributes/proto-attribute-2.mm: Updated. * obj-c++.dg/class-protocol-1.mm: Updated. From-SVN: r168307
2010-12-28In gcc/objc/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-0/+22
In gcc/objc/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_start_category_interface): Produce an error if a class extension is found after the class @implementation. In gcc/testsuite/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/class-extension-4.m: New. * obj-c++.dg/class-extension-4.mm: New. From-SVN: r168294
2010-12-28In gcc/testsuite/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-2/+9
In gcc/testsuite/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47073 * objc.dg/incomplete-type-1.m: New test. In gcc/objc/: 2010-12-28 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47073 * objc-act.c (encode_method_prototype): Fixed both location and format string of error "type %qT does not have a known size". From-SVN: r168285
2010-12-26In gcc/testsuite/: 2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-1/+5
In gcc/testsuite/: 2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/pr44509.m: New. In gcc/objc/: 2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com> * config-lang.in (gtfiles): Added c-family/c-cppbuiltin.c. In gcc/objcp/: 2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com> * config-lang.in (gtfiles): Added c-family/c-cppbuiltin.c. From-SVN: r168254
2010-12-22c-aux-info.c (gen_formal_list_for_type): Use prototype_p.Nathan Froyd2-1/+5
gcc/ * c-aux-info.c (gen_formal_list_for_type): Use prototype_p. * c-decl.c (diagnose_arglist_conflict): Likewise. (diagnose_mismatched_decls, merge_decls): Likewise. (c_builtin_function, c_builtin_function_ext_scope): Likewise. (start_decl, start_function): Likewise. * c-tree.h (C_DECL_ISNT_PROTOTYPED): Likewise. * config/ia64/ia64.h (INIT_CUMULATIVE_ARGS): Likewise. * config/mep/mep.c (mep_validate_interrupt): Likewise. * config/pa/pa.h (INIT_CUMULATIVE_ARGS): Likewise. * config/rs6000/rs6000.c (init_cumulative_args): Likewise. * config/sh/sh.c (sh_init_cumulative_args): Likewise. * config/sparc/sparc.c (init_cumulative_args): Likewise. * dwarf2out.c (add_prototyped_attribute): Likewise. (gen_subprogram_die): Likewise. * ipa-type-escape.c (check_function_parameter_and_return_types): Likewise. (check_call): Likewise. * tree-ssa.c (useless_type_conversion_p): Likewise. gcc/ada/ * gcc-interface/utils.c (handle_nonnull_attribute): Use prototype_p. (handle_sentinel_attribute): Likewise. gcc/c-family/ * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute): Use prototype_p. gcc/cp/ * decl.c (decls_match, duplicate_decls): Use prototype_p. * pt.c (push_template_decl_real): Likewise. gcc/lto/ * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute): Use prototype_p. gcc/objc/ * objc-act.c (next_sjlj_build_enter_and_setjmp): Use prototype_p. From-SVN: r168181
2010-12-18In gcc/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-20/+26
In gcc/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_objc_try_catch_finally_statement): Call objc_maybe_warn_exceptions. (c_parser_objc_synchronized_statement): Call objc_maybe_warn_exceptions. In gcc/cp/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_try_catch_finally_statement): Call objc_maybe_warn_exceptions. (cp_parser_objc_synchronized_statement): Same change. In gcc/c-family/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com> * c-objc.h (objc_maybe_warn_exceptions): New. * stub-objc.c (objc_maybe_warn_exceptions): New. In gcc/objc/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_init): Call using_eh_for_cleanups. (objc_init_exceptions): Renamed to objc_maybe_warn_exceptions. Do not call using_eh_for_cleanups. (objc_begin_try_stmt): Do not call objc_init_exceptions. (objc_build_throw_stmt): Updated call to objc_maybe_warn_exceptions. In gcc/testsuite/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/fobjc-exceptions-1.m: Updated. * objc.dg/fobjc-exceptions-2.m: New. * objc.dg/fobjc-exceptions-3.m: New. * obj-c++.dg/fobjc-exceptions-1.mm: New. * obj-c++.dg/fobjc-exceptions-2.mm: New. * obj-c++.dg/fobjc-exceptions-3.mm: New. From-SVN: r168032
2010-12-18objc-act.c (objc_eh_personality): Select personality name on runtime.Iain Sandoe2-16/+42
gcc/objc: * objc/objc-act.c (objc_eh_personality): Select personality name on runtime. (objc_init_exceptions): New. (objc_begin_try_stmt): Use objc_init_exceptions. (objc_build_throw_stmt): Likewise. gcc/testsuite: * fobjc-exceptions.m: Update dg-error syntax. From-SVN: r168020
2010-12-10In gcc/: 2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-64/+156
In gcc/: 2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_objc_class_definition): Recognize Objective-C 2.0 class extensions. In gcc/cp/: 2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_superclass_or_category): Recognize Objective-C 2.0 class extensions. Added iface_p and is_class_extension arguments. (cp_parser_objc_class_interface): Updated call to cp_parser_objc_superclass_or_category. (cp_parser_objc_class_implementation): Same change. In gcc/objc/: 2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_in_class_extension): New. (objc_start_category_interface): If -fobjc-std=objc1 was specified, produce an error if a class extension is used. (objc_finish_interface): Reset objc_in_class_extension to false. (objc_add_property_declaration): Allow a class extension to extend readonly properties in the main @interface to be readwrite. (start_class): Added code to deal with class extensions. In that case, return the existing interface after adding any additional protocols to it and setting objc_in_class_extension to true. (continue_class): If in a class extension, do not generate the instance variable template. In gcc/testsuite/: 2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/class-extension-1.m: New. * objc.dg/class-extension-2.m: New. * objc.dg/class-extension-3.m: New. * objc.dg/property/at-property-26.m: New. * objc.dg/property/at-property-27.m: New. * objc.dg/property/at-property-28.m: New. * obj-c++.dg/class-extension-1.mm: New. * obj-c++.dg/class-extension-2.mm: New. * obj-c++.dg/class-extension-3.mm: New. * obj-c++.dg/property/at-property-26.mm: New. * obj-c++.dg/property/at-property-27.mm: New. * obj-c++.dg/property/at-property-28.mm: New. From-SVN: r167680
2010-12-08In gcc/objc/: 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-0/+13
In gcc/objc/: 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_build_throw_stmt): Check that the argument of @throw is an object and emit an error if not. In gcc/testsuite/: 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/exceptions-7.m: New. * obj-c++.dg/exceptions-7.mm: New. * obj-c++.dg/exceptions-3.mm: Adjust for new C++ messages. * obj-c++.dg/exceptions-5.mm: Same change. From-SVN: r167615
2010-12-08In gcc/objc/: 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-2/+8
In gcc/objc/: 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com> * 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. In gcc/testsuite/: 2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/foreach-6.m: Updated location of error messages. * objc.dg/foreach-7.m: Same change. From-SVN: r167610
2010-12-06In gcc/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-0/+17
In gcc/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_for_statement): Use c_fully_fold() instead of c_process_expr_stmt() for the iterating and collection expressions of an Objective-C fast enumeration loop. In gcc/objc/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_finish_foreach_loop): Mark the object_expression as used. In gcc/testsuite/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/foreach-8.m: New. From-SVN: r167518
2010-12-06In gcc/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero5-3/+14
In gcc/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * c-family/c-common.h: Removed the declarations of all the objc_ callbacks, and moved them into c-objc.h. Removed objc_ivar_visibility_kind and moved it into c-objc.h. * c-family/c-objc.h: New file. * c-family/c-common.c: Include c-objc.h. * c-family/c-format.c: Same change. * c-family/stub-objc.c: Same change. * c-decl.c: Include c-family/c-objc.h. * c-parser.c: Same change. * c-typeck.c: Same change. * c-config-lang.in (gtfiles): Added c-family/c-objc.h. * Makefile.in (c-decl.o): Depend on c-family/c-objc.h. (c-parser.o): same change. (c-typeck.o): Same change. (c-family/c-format.o): Same change. (c-family/stub-objc.o): Same change. (c-family/c-common.o): Same change. (PLUGIN_HEADERS): Added c-family/c-objc.h. In gcc/cp/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * call.c: Include c-family/c-objc.h. * decl.c: Same change. * decl2.c: Same change. * error.c: Same change. * lex.c: Same change. * parser.c: Same change. * pt.c: Same change. * semantics.c: Same change. * typeck.c: Same change. * Make-lang.in (cp/decl.o): Depend on c-family/c-objc.h. (cp/decl2.o): Same change. (cp/call.o): Same change. (cp/error.o): Same change. (cp/lex.o): Same change. (cp/parser.o): Same change. (cp/pt.o): Same change. (cp/semantics.o): Same change. (cp/typeck.o): Same change. * config-lang.in (gtfiles): Added c-family/c-objc.h. In gcc/objc/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * 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. In gcc/objcp/: 2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com> * config-lang.in (gtfiles): Added c-family/c-objc.h. * Make-lang.in (objcp/objcp-act.o): Depend on c-family/c-objc.h. (objcp/objcp-lang.o): Same change. (objcp/objcp-decl.o): Same change. * objcp-lang.c: Include c-family/c-objc.h. * objcp-decl.c: Same change. From-SVN: r167481
2010-12-02gcc.c (trad_capable_cpp, [...]): Don't handle -ftraditional.Joseph Myers2-5/+9
* gcc.c (trad_capable_cpp, default_compilers): Don't handle -ftraditional. objc: * lang-specs.h: Don't handle -ftraditional. From-SVN: r167385
2010-12-02In gcc/objc/: 2010-12-02 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-1/+6
In gcc/objc/: 2010-12-02 Nicola Pero <nicola.pero@meta-innovation.com> * 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. In gcc/cp/: 2010-12-02 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_throw_statement): Use cp_parser_expression, not cp_parser_assignment_expression, to parse the argument of a @throw. In gcc/testsuite/: 2010-12-02 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/exceptions-6.m: New. * obj-c++.dg/exceptions-6.mm: New. From-SVN: r167364
2010-11-30In gcc/c-family/: 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero3-90/+56
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
2010-11-29Allow 'make check-objc -j2'Nicola Pero2-0/+13
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
2010-11-29In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-3/+12
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
2010-11-29In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-5/+6
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
2010-11-29In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-32/+102
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
2010-11-29In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-0/+22
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