Monday, October 04, 2004

You're Never Too Old To Make a Semicolon Mistake

Not that this will be interesting to many people, but today I noticed that I had made the following C++ mistake. I wrote:

if ( !foo );
{
// ...
}

It was detected early enough in the cycle. Sure, it's legal code, but it would be nice if the compiler would give warnings in cases like this.

(If you'd like, insert your own joke here about the importance of semicolon screening.)

No comments: