simont: A picture of me in 2016 (Default)
simont ([personal profile] simont) wrote2008-05-09 10:13 am

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!)

ext_8103: (Default)

[identity profile] ewx.livejournal.com 2008-05-09 11:10 am (UTC)(link)
(...it doesn't say int2int::iterator though, preferring struct std::_Rb_tree_iterator<std::pair<const int, int> >. So there is work yet to be done, at least as of 4.1.2 l-(