[LLVMbugs] [Bug 21587] New: Failed to recognize init selector when using precompiled header
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Nov 16 20:23:51 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21587
Bug ID: 21587
Summary: Failed to recognize init selector when using
precompiled header
Product: clang
Version: trunk
Hardware: PC
OS: MacOS X
Status: NEW
Severity: release blocker
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: 191919 at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13355
--> http://llvm.org/bugs/attachment.cgi?id=13355&action=edit
The build environment
clang svn trunk (222117 as I am submitting this bug) failed gave the following
message
```
1.mm:7:23: error: 'init' is unavailable
return [[self alloc] init];
^
/System/Library/Frameworks/Foundation.framework/Headers/NSLocale.h:39:1: note:
'init' has been explicitly marked unavailable here
- (instancetype)init NS_UNAVAILABLE; /* do not invoke; not a valid
initializer for this class */
^
1 error generated.
```
when compiling a trivial source code like this when using PCH.
```
@interface Bug : NSResponder
@end
@implementation Bug
+ (instancetype)bug {
return [[self alloc] init];
}
@end
```
The code should be ok and is compilable by svn 21xxxx.
I have attached the source codes and Makefile, please change /opt/bin/clang as
need.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141117/7a24673d/attachment.html>
More information about the llvm-bugs
mailing list