[LLVMbugs] [Bug 7753] New: cannot initialize a parameter of type 'id<NSMenuDelegate>' with an lvalue of type 'MenuDelegate *'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 29 15:54:14 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7753

           Summary: cannot initialize a parameter of type
                    'id<NSMenuDelegate>' with an lvalue of type
                    'MenuDelegate *'
           Product: clang
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: Nomis101 at web.de
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
            Blocks: 5511


If I apply all currently available patches and than build Mozilla Firefox with
Clang on Mac OS X 10.6, than it stops with the below error. This is
Mac-specific code. You can find the file in question there:
http://hg.mozilla.org/mozilla-central/file/1b14b3b3095d/widget/src/cocoa/nsMenuX.mm#l509

The error is:


/Volumes/Developer/temp/src/mozilla/widget/src/cocoa/nsMenuX.mm:509:23: error: 
      cannot initialize a parameter of type 'id<NSMenuDelegate>' with an lvalue
      of type 'MenuDelegate *'
  [myMenu setDelegate:mMenuDelegate];
                      ^~~~~~~~~~~~~
In file included from
/Volumes/Developer/temp/src/mozilla/widget/src/cocoa/nsMenuX.mm:41:
In file included from
/Volumes/Developer/temp/src/mozilla/widget/src/cocoa/nsMenuX.h:42:
In file included from
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:
In file included from
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:34:
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenu.h:146:42:
note: 
      passing argument to parameter 'anObject' here
- (void)setDelegate:(id <NSMenuDelegate>)anObject ...
                                         ^
1 warning generated.
In file included from
/Volumes/Developer/temp/src/mozilla/widget/src/cocoa/nsMenuX.mm:47:
../../../dist/include/nsObjCExceptions.h:161:13: warning: unused function
      'nsObjCExceptionLogAbort' [-Wunused-function]
static void nsObjCExceptionLogAbort(NSException *e)
            ^
2 warnings and 1 error generated.
make[6]: *** [nsMenuX.o] Error 1



I've tried to add a preprocessed source. But if I build with --save-temps, than
I get a completely different error in a completely different file.

clang version 2.8 (trunk 109500)
Target: x86_64-apple-darwin10

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