This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/27377] New: false compiler warnings generated in Objective-C code
- From: "caelian at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2006 06:32:10 -0000
- Subject: [Bug objc/27377] New: false compiler warnings generated in Objective-C code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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