tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: declarations in switch statements (Re: wedges on vnd(4) patch)

In article <>,
Eric Haszlakiewicz  <> wrote:
>btw, there's a 5th option that is a bit in between:
>switch (c) {
>       int myvar;
>case 'a':
>       myvar = somevalue;
>       stmt;
>but I wouldn't recommend it b/c variable initialization on the declaration line
>happens in a non-obvious way (or rather, it *doesn't* happen).

And there is no warning at all.


Home | Main Index | Thread Index | Old Index