[LLVMbugs] [Bug 3656] New: Error with objc type conversion in __attribute__((cleanup)) function argument

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Feb 24 01:39:24 PST 2009


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

           Summary: Error with objc type conversion in
                    __attribute__((cleanup)) function argument
           Product: clang
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: devlists at shadowlab.org
                CC: llvmbugs at cs.uiuc.edu


gcc compile this file without complain, but clang (ccc / rev 65375) report an
error that prevent compilation.


============ objc-cleanup.m ============

@class NSString;

static __inline__
void $wb_scopeReleaseObject(id *scopeReleasedObject) {
  // commented to avoid 'may not responds  to release' warning.
  //[*scopeReleasedObject release];
}

int main() {
        __attribute__((cleanup($wb_scopeReleaseObject))) NSString *test = nil;
        return 0;
}

===================================
ccc objc-cleanup.m
error: 'cleanup' function '$wb_scopeReleaseObject' parameter has type 'id *',
expected type 'NSString **'
       __attribute__((cleanup($wb_scopeReleaseObject))) NSString *test;
                       ^


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