[LLVMbugs] [Bug 10108] New: Property of reference type not supported for Objective-C++
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jun 9 00:55:50 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10108
Summary: Property of reference type not supported for
Objective-C++
Product: clang
Version: 2.9
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: 691D2C6C-B023-46A5-B1D7-ACCBA4713A87 at uuid-mail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
GCC supports reference types for properties in Objective-C++ mode. This is not
supported by clang even when using -std=gnu++0x.
Example:
% cat main.mm
#import <Foundation/Foundation.h>
@interface Test : NSObject { int i; }
@property (readonly) int const& i;
@end
@implementation Test
@synthesize i;
@end
int main (int argc, char const* argv[]) { return 0; }
----------8<----------
% clang++ -std=gnu++0x -lobjc -framework Foundation main.mm
main.mm:4:1: error: property of reference type is not supported
@property (readonly) int const& i;
^
main.mm:8:13: error: property implementation must have its declaration in
interface 'Test'
@synthesize i;
^
2 errors generated.
----------8<----------
Using references is required when wrapping non-POD types in an Objective-C
class.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list