Re: declarations after a case statement
Derek M Jones <[email protected]> Fri, 5 Jun 2026 11:43:01 +0100
| Newsgroups | org.kernel.vger.linux-sparse |
|---|---|
| Organization | Knowledge Software, Ltd |
| Message-ID | <[email protected]> |
Dan, >> Sparse is correct. The usage you describe is a syntax error. >> >> A label may only appear on a statement, not a >> declaration >> https://c0x.shape-of-code.com/6.8.1.html >> > > That's an awkward thing because GCC allows it and the kernel is > doing it. Double checked. I'm out of date. C23 supports the labeling of declarations 6.8.2p4 Any statement or declaration in a compound statement can be preceded by a prefix that declares an identifier as a label name. Sorry for confusion. -- Derek M. Jones Evidence-based software engineering blog:https://shape-of-code.com