public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* objc/7836: problem casting id as id<protocol>
@ 2002-09-05  6:26 pauljohn
  0 siblings, 0 replies; 2+ messages in thread
From: pauljohn @ 2002-09-05  6:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7836
>Category:       objc
>Synopsis:       problem casting id as id<protocol>
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 05 06:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Paul E. Johnson
>Release:        unknown-1.0
>Organization:
>Environment:
GNU/Linux, gcc 3.1/3.2
>Description:
The Swarm libraries (www.swarm.org) compile with gcc-3.0, but with gcc-3.1/3.2, we get some new warnings about protocols.
 
We have plenty of places where we cast ids as (id <whatever_protocol>) and when the thing we cast does not actually implement all the methods  in the protocol, then the compiler warns us about it.  In the 3.0 gcc, 
we did not get warnings.  If we use the flag -Wno-error instead of -Werror, then the build of Swarm libraries finishes and programs that 
run with the libraries work.
 
 
Consider this method:
 
 
- setProbe: (id <Probe>)theProbe
 {
    myProbe = (id <MessageProbe>) theProbe;

    return self;
 }
 
 The compiler warns that  "warning: object does not conform to the `MessageProbe' protocol".  It no longer trusts us to make the cast the  way we wnat it.  Its warning is correct, "theProbe" does not conform.
 
But we don't want the warning. We have the compiler set to treat warnings as errors.
>How-To-Repeat:
Try compiling the Swarm libraries! If you want to try, I'd suggest on of the development snaps, for example:

ftp://ftp.swarm.org/pub/swarm/src/testing/swarm-2002-05-14.tar.gz
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: objc/7836: problem casting id as id<protocol>
@ 2002-09-17  7:29 nicola
  0 siblings, 0 replies; 2+ messages in thread
From: nicola @ 2002-09-17  7:29 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, pauljohn

Synopsis: problem casting id as id<protocol>

State-Changed-From-To: open->closed
State-Changed-By: nicola
State-Changed-When: Tue Sep 17 07:29:18 2002
State-Changed-Why:
    Fixed on CVS

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7836


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-17 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-05  6:26 objc/7836: problem casting id as id<protocol> pauljohn
2002-09-17  7:29 nicola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).