This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug objc/27377] New: false compiler warnings generated in Objective-C code


The following macro

#define GS_INITIALIZED_LOCK(OBJ,CLS) \
                (OBJ ? (CLS *) OBJ : (CLS *) [CLS newLockAt: (CLS **)&OBJ])

generates these compiler warnings.

Unicode.m:253: warning: pointer type mismatch in conditional expression
Unicode.m:253: warning: invalid receiver type 'void *'

when called as [GS_INITIALIZED_LOCK(local_lock, GSLazyLock) lock];

local_lock here is declared as a static *GSLazyLock;

As far as we can tell this code should not generate the warnings it does, which
seems to suggest a fault in he objective-c frontend/backend code.


-- 
           Summary: false compiler warnings generated in Objective-C code
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: objc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: caelian at gmail dot com
  GCC host triplet: amd64-unknown-freebsd7.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27377


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]