Linux SPARSE checker discussions
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: linux-sparse@vger.kernel.org
Subject: Re: declarations after a case statement
Date: Thu, 4 Jun 2026 16:48:34 +0300	[thread overview]
Message-ID: <aiGCMuw3Lblnc9TA@stanley.mountain> (raw)
In-Reply-To: <aiGAXJhYJoUuqB5j@stanley.mountain>

Same thing for declaration after after a label.

$ ./smatch test.c
test.c:5:9: error: typename in expression
test.c:5:14: error: Expected ; at end of statement
test.c:5:14: error: got b
test.c:5 func() warn: statement has no effect 'char'

void func(int a)
{
        goto out;
out:
        char b;
        b = 1;
}

regards,
dan carpenter

  reply	other threads:[~2026-06-04 13:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 13:40 declarations after a case statement Dan Carpenter
2026-06-04 13:48 ` Dan Carpenter [this message]
2026-06-04 14:21   ` Derek M Jones
2026-06-05  5:50     ` Dan Carpenter
2026-06-05 10:43       ` Derek M Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiGCMuw3Lblnc9TA@stanley.mountain \
    --to=error27@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox