https://llvm.org/bugs/show_bug.cgi?id=27131

            Bug ID: 27131
           Summary: -Wincompatible-pointer-types treats constnat strings
                    as NSString even when -fconstant-string-class is used
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

When using an alternative class for constant strings (i.e. I am not using OS X
or GNUStep ) then warning for incompatible types are generated, which appear to
be based on still using NSString as the class of the constant string. For
example this code:

    MyConstStr *s;
    s = @"foo";

will generate this error

test.m:21:7: warning: incompatible pointer types assigning to 'MyConstStr *'
from 'NSString *' [-Wincompatible-pointer-types]
    s = @"foo";


This works fine under gcc 4 and 5. Note that the resulting code works fine, it
is just the warning which is wrong.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to