diff options
author | Nicola Pero <nicola.pero@meta-innovation.com> | 2010-11-27 10:06:59 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2010-11-27 10:06:59 +0000 |
commit | 2dd24dbdfeed75a433307948e6083c78d7181f53 (patch) | |
tree | 3286544b1f9262f2a2f7654ba7439ed2294ca00d /gcc/objc/objc-act.h | |
parent | c5589aa7e1e8bf1e56d3c46d952675e1087be311 (diff) | |
download | gcc-2dd24dbdfeed75a433307948e6083c78d7181f53.zip gcc-2dd24dbdfeed75a433307948e6083c78d7181f53.tar.gz gcc-2dd24dbdfeed75a433307948e6083c78d7181f53.tar.bz2 |
In gcc/objc/: 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
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
Diffstat (limited to 'gcc/objc/objc-act.h')
-rw-r--r-- | gcc/objc/objc-act.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index f612e74..6403161 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -113,6 +113,11 @@ typedef enum objc_property_assign_semantics { setter, it is set to 1. */ #define PROPERTY_HAS_NO_SETTER(DECL) DECL_LANG_FLAG_4 (DECL) +/* PROPERTY_OPTIONAL can be 0 or 1. Normally it is 0, but if this is + a property declared as @optional in a @protocol, then it is set to + 1. */ +#define PROPERTY_OPTIONAL(DECL) DECL_LANG_FLAG_5 (DECL) + /* PROPERTY_REF. A PROPERTY_REF represents an 'object.property' expression. It is normally used for property access, but when the Objective-C 2.0 "dot-syntax" (object.component) is used |