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-