lkml.org 
[lkml]   [1999]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux headers and C++
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.067 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site