Re: linux headers and C++
Arvind Sankar (arvinds@mit.edu)
Fri, 2 Jul 1999 01:00:00 -0400
On Thu, Jul 01, 1999 at 08:32:00PM -0400, Richard B. Johnson wrote:
>
> Yes. You are correct. I tried it with several 'non-gcc, non-unix'
> compilers and they seem to require that a switch include at least
> one statement within it. A ';' will suffice. I don't know if this
> is really ANSI, someone else will probably comment.
>
> FYI lint finds nothing wrong with it. Further {} seems to be okay
> as well as {;}, so I can't guess what rule is being violated.
>
A label has to be attached to a statement. A ';' on its own is a statement, as
is {} or {;}. Whitespace is *not* a statement, but a compound statement can have
an empty set of substatements, so {} is fine.
-- arvind
p.s. I deserve to get flamed for commenting on ANSI C without having a copy of
the standard in front of me, but here goes anyway.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/