simont |
Fri 2008-05-09 10:13 |
Microsoft 1-0 GNU I've just discovered that if you write the following code: if (condition); { statement; }
then gcc will accept it without question, whereas Visual C++ will give a warning pointing out that the semicolon after the closing parenthesis was probably not what you actually wanted to do. One point to Visual C++; none to gcc . Unusual, since gcc normally seems better at this kind of ‘probably not what you meant’ warning. (I wouldn't have made the error at all if it hadn't been for this wretched code I'm maintaining which was written by someone who didn't think there was anything wrong with five-mile-long individual source lines. I can't reliably check there isn't rubbish at the ends of the lines if I can't reliably see the ends of the lines!) |
|