lkml.org 
[lkml]   [2000]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: 2.2.18 signal.h
Date
Michael Meissner writes:
> On Fri, Dec 15, 2000 at 07:54:33PM +0100, Andrea Arcangeli wrote:
>> On Fri, Dec 15, 2000 at 06:59:24PM +0100, Franz Sirl wrote:

>>> It's required by ISO C, and since that's the standard now, gcc
>>> spits out a warning. Just adding a ; is enough and already
>>> done for most stuff in 2.4.0-test12.
...
>> Why am I required to put a `;' only in the last case and not in
>> all the previous ones? Or maybe gcc-latest is forgetting to
>> complain about the previous ones ;)
>
> Because neither
>
> <label>: (nor)
> case <expr>: (nor)
> default:
>
> are statements by themselves.

For the GNU C language they are. For the ISO C language they are not.
If there had been a flag such as -ansi or -std=iso-me-harder then
the warning would be appropriate. Without such a flag, gcc should
shut up and compile the code.

So this is a gcc language standard selection bug.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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