how to get signed/unsigned comparison warning with CLANG (and get rid of a spurious ; warning)
how to get signed/unsigned comparison warning with CLANG (and get rid of a spurious ; warning)
- Subject: how to get signed/unsigned comparison warning with CLANG (and get rid of a spurious ; warning)
- From: Roland King <email@hidden>
- Date: Wed, 23 Dec 2009 21:37:16 +0800
I blew myself up with this piece of code
NSUInteger length;
// ...
if( length < 0 )
// ....
because of course length is unsigned.
with gcc I have -Wextra and -Wtype-limits and it catches it, but I've been building for OS X using CLANG and it doesn't warn me even with those two specified so I missed this bug. I have a lot of the other warning selection boxes checked also but .. I can't make this warning come up. What do I need to get this warning with CLANG?
Also if I have 'pedantic' warnings enabled with CLANG I get the following warning on the following line of code
@synthesize myvar; // Extra ; outside of a function
but if I remove the ; of course it fails to compile. Is there something I'm doing wrong there? _______________________________________________
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