[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


           Summary: Property of reference type not supported for
           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.


% cat main.mm
#import <Foundation/Foundation.h>

@interface Test : NSObject { int i; }
@property (readonly) int const& i;

@implementation Test
@synthesize i;

int main (int argc, char const* argv[]) { return 0; }


% 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.


Using references is required when wrapping non-POD types in an Objective-C

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