http://llvm.org/bugs/show_bug.cgi?id=8806
Summary: Incorrect warning: expression result unused
Product: clang
Version: unspecified
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
I get this warning when building the code below with Clang 1.6:
warning: expression result unused [-Wunused-value]
for (NSUInteger j = finish; j >= start, j != NSUIntegerMax; j--) {
~ ^ ~~~~~
I am absolutely sure that the expression is indeed used so even if I am doing
something funky the warning is incorrect.
----- SNIP -----
// ObjC Foundation command line utility
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString *text = @"01234567890123456789";
NSUInteger start = 0;
NSUInteger finish = 10;
for (NSUInteger j = finish; j >= start, j != NSUIntegerMax; j--) {
NSLog(@"%C\n", [text characterAtIndex:j]);
}
[pool drain];
return 0;
}
----- SNIP -----
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs