Re: Warnings for undeclared methods?
Re: Warnings for undeclared methods?
- Subject: Re: Warnings for undeclared methods?
- From: Jeremy Pereira <email@hidden>
- Date: Tue, 22 Dec 2009 10:23:03 +0000
On 21 Dec 2009, at 19:42, Rick Mann wrote:
>
> On Dec 21, 2009, at 02:55:59, Jeremy Pereira wrote:
>
>>
>> On 19 Dec 2009, at 21:31, Rick Mann wrote:
>>
>>> Using clang and llvm-gcc, I can't seem to get warnings for methods that haven't been declared (Objective C++). I have the settings checked in the project, but no warnings are actually issued. Am I missing something?
>>
>> I thought that was deliberate - there is no warning unless you try to use the method before you declare or define it. It's quite useful for test case classes because you don't have to declare your tests in a header that's never actually used anywhere (except in the implementation of the same class).
>
> No, I think I should still be able to ask the compiler for warnings.
I agree, but it's a warning I wouldn't bother with.
> Even in the case you specify, you can always put the declarations at the top of the implementation file (just good form).
I don't agree. It's just an extra little house keeping chore which I used to do dutifully, but I kept finding I was forgetting to add the declaration when knocking up quick unit tests for bugs. This meant my code was inconsistent in the sense that I couldn't rely on looking at the declarations to see what unit tests I had defined so I found I never bothered to look at them.
>
> --
> Rick
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden