On Thu, Jul 10, 2008 at 3:29 PM, Michael Ash <[EMAIL PROTECTED]> wrote:
> I recommend you file a bug with Apple.

And to put my money where my mouth is, I've filed this bug as rdar://6066914

Anyone who's interested in playing with this further may find this
python program useful:

#!/usr/bin/python

types = ['void', 'int', 'float', 'double', 'id', 'NSObject *',
'NSRect', 'NSPoint']

pairs = []
for idx, type1 in enumerate(types):
    for type2 in types[idx:]:
        if type1 != type2:
            pairs.append((type1, type2))


print '#import <Foundation/Foundation.h>'
print ''
print ''
print '@interface C1'
print ''
for idx, pair in enumerate(pairs):
    print '- (%s)m%d;' % (pair[0], idx)
print ''
print '@end'
print ''
print ''
print '@interface C2'
print ''
for idx, pair in enumerate(pairs):
    print '- (%s)m%d;' % (pair[1], idx)
print ''
print '@end'
print ''
print ''
print 'int main(int argc, char **argv)'
print '{'
print '    id obj;'
for idx, pair in enumerate(pairs):
    print '    [obj m%d]; // %s and %s' % (idx, pair[0], pair[1])
print '}'

When compiling its output with gcc, it's obvious which conflicts are
missed as the warnings *should* be numbered sequentially, so gaps
stand out. You can then find the gap in the main() code and see which
pair was missed.

This particular test case misses int and float, int and id, int and
NSObject *, float and id, float and NSObject *, and id and NSObject *.
Modify the 'types' array at the top if you want to experiment with
other conflicts.

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to