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]

objc/7808: Compiler ignores cast from 'id<Protocol>' to 'id' or from 'id<Protocol1>' to 'id<Protocol2>'


>Number:         7808
>Category:       objc
>Synopsis:       Compiler ignores cast from 'id<Protocol>' to 'id' or from 'id<Protocol1>' to 'id<Protocol2>'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 02 03:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Nicola Pero <nicola@brainstorm.co.uk>
>Release:        GCC 3.3 (also reported in 3.2)
>Organization:
>Environment:

>Description:
The compiler seems to be ignoring casts from 'id<Protocol>'
to 'id', and from 'id<Protocol1>' to 'id<Protocol2>'.

It's a regression: previous compilers (eg 2.95 and 2.91.66)
did the cast properly.
>How-To-Repeat:
Compile the attached testcase - no warnings should be 
generated.

Under 3.3 (and, I was told, under 3.2) spurious warnings are
generated instead because the compiler seems to be ignoring
the casts
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="nico.m"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="nico.m"

I2luY2x1ZGUgPG9iamMvb2JqYy5oPgoKQGludGVyZmFjZSBHZW5lcmljCi0gKGlkKSBnOwpAZW5k
CgpAcHJvdG9jb2wgUHJvdG9jb2wxCi0gKHZvaWQpIHAxOwpAZW5kCgpAcHJvdG9jb2wgUHJvdG9j
b2wyCi0gKHZvaWQpIHAyOwpAZW5kCgppbnQgbWFpbiAodm9pZCkKewogIGlkPFByb3RvY29sMT4g
cCA9IG5pbDsKCiAgWyhpZClwIGddOyAgICAgIC8qIFNob3VsZCBnZW5lcmF0ZSBubyB3YXJuaW5n
cyEgKi8KICBbKGlkPFByb3RvY29sMj4pcCBwMl07IC8qIFNob3VsZCBnZW5lcmF0ZSBubyB3YXJu
aW5ncyEgKi8KCiAgcmV0dXJuIDA7Cn0K


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