[LLVMbugs] [Bug 19103] New: Incompatible Type Assignment Not Flagged

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 10 17:52:47 PDT 2014


            Bug ID: 19103
           Summary: Incompatible Type Assignment Not Flagged
           Product: compiler-rt
           Version: 3.4
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: headsupftw at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

NSString *str0 = [NSNull null];
NSString *str1 = YES ? [NSNull null] : nil;

The two lines will each get a warning "Incompatible pointer types initializing
'NSString *' with an expression of type 'NSNull *'

But the following line doesn't trigger any warnings.
NSString *str2 = YES ? [NSNull null] : (id)nil;

No warnings for the following line.
id a; NSString *str3 = YES ? [NSNull null] : a;

The bug: there should be a warning for the last two scenarios.

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/20140311/f2786d02/attachment.html>

More information about the llvm-bugs mailing list