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

2006-05-01 Thread caelian at gmail dot com
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



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

2006-05-01 Thread caelian at gmail dot com


--- Comment #1 from caelian at gmail dot com  2006-05-02 06:42 ---
Created an attachment (id=11356)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11356&action=view)
Unicode.mi file 

this is the output generated by compiling the file with -save-temps it should
contain the code that generates the warnings


-- 


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