lkml.org 
[lkml]   [1999]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: linux headers and C++
Date
From
root@chaos.analogic.com wrote:
> To make this more clear. Observe:
>
> switch(foo)
> {
> case 0:
> case 1:
> case 2:
> default:
> }
>
> This is basically a NOP. Perfectly legal (and useless).

Try compiling that code with "gcc -pedantic" and you will find that
this is not legal ANSI C. It is legal in gcc because it is a gcc
extension.

Try compiling with g++, and you will get a parse error.

Ronnie Misra rgmisra@mit.edu
3 Ames Street, Box 152
Cambridge, MA 02142
(617) 225-6365

-
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:1.239 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site