[llvm-bugs] [Bug 49477] New: -Werror=incompatible-pointer-types does not apply to all warnings of that kind

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 8 09:05:36 PST 2021


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

            Bug ID: 49477
           Summary: -Werror=incompatible-pointer-types does not apply to
                    all warnings of that kind
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hanauska at equinux.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

-Werror=incompatible-pointer-types is set, still the following is just a
warning and not an error:

Assigning to 'id<SomeProtocol> _Nonnull' from incompatible type 'NSString
*__strong'

Also the following is just a warning, not an error:

Sending '__strong id<SomeProtocol>' to parameter of incompatible type 'NSString
* _Nonnull'

It tells me that the type is incompatible and it is absolutely correct about
it. NSString does not implement that protocol, so it cannot match the type.

Just in case it only complains about qualifiers, I also added
-Werror=incompatible-pointer-types-discards-qualifiers but it still only stays
a warning.

The documentation lists on no other warning flag that can produce this warning
and that I could use to propagate this into an error.

-- 
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/20210308/309f04a4/attachment.html>


More information about the llvm-bugs mailing list