锵和gcc有一个选项可以禁止发送未定义消息给对象的警告吗?如果是这样,那么旗帜是什么?Clang和gcc选项可抑制未定义的消息警告?
随着铛3.1:
test.mm:51:14: warning: instance method '-dfs_path:' not found (return type defaults to 'id')
([pathfinder dfs_path: graph, @[ NUM(start) ], NUM(goal), NUM(max_steps)])
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
用gcc 4.2.1:
test.mm: In function ‘void test_path(objc_object*, objc_object*, int, int, int, BOOL)’:
test.mm:84: warning: no ‘-dfs_path:’ method found
test.mm:84: warning: (Messages without a matching method signature
test.mm:84: warning: will be assumed to return ‘id’ and accept
test.mm:84: warning: ‘...’ as arguments.)
test.mm:84: warning: no ‘-dfs_path:’ method found
基本上,在MacRuby的产生有问题的方法,因此,目标C编译器不知道他们在编译时。
你得到的* exact *警告是什么? –
@KenThomases:我编辑了这个问题来澄清。 – echristopherson