I don't get it! I have just put Xcode 4 on Mac and I am already hating everything about it. OK, some of it may be me, but this is crazy: I have this warning - using result of assignment as condition without parentheses for this line: Code: if (retImage = [imgDatabase imageWithAddress:imgAddress returnCode:NULL]) { even though I have -Wno-idiomatic-parentheses in Other Warning Flags. Plus, I have this line in the same file, but the compiler is ok with it: Code: if (self = [super init]) { What is it that I'm missing here?
If you actually are wanting to assign it in the if statement then put the entire line in an extra pair of parenthesis like this Code: if ((retImage = [imgDatabase imageWithAddress:imgAddress returnCode:NULL])) {
Does -Wno-idiomatic-parentheses serve any purpose? Edit - "Missing Braces and Parentheses" option seem to be what I need here. Why compiler flag doesn't do what it's supposed to do is maybe a bug in compiler or maybe I just don't understand how modern stuff works.
I add an equality test to make it even more explicit: Code: if ( (retImage = [imgDatabase imageWithAddress:imgAddress returnCode:NULL]) != NULL ) { blah... }
This is a gcc flag. Is it also clang flag? There's no mention of it in the Clang Compiler User's Manual?
Thanks for the link. It seems like there really is no support for that flag. I should see how is Xcode then passing this "Missing Braces and Parentheses" option to it. And PS, I see now that my first post is somewhat coarse so I want to add how I was one of those people who used Xcode in multiple windows setting. That and the fact that I was contemplating MacBook Air, but now I have no idea how could I fit everything on its screen when it's not at home/in the office on external monitor.