linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: linux-sparse@vger.kernel.org
Subject: label 'continue' already bound, unreplaced symbol 'return'
Date: Wed, 13 Feb 2008 19:16:55 -0500	[thread overview]
Message-ID: <1202948215.8941.37.camel@dv> (raw)

Hello!

Here are some interesting testcases from the same hal.c from ndiswrapper
that was triggering the crash.

static inline int foo(void)
{
    do {
    } while (0);
    return 0;
}
int bar(void);
int bar(void)
{
    return foo();
}
typeof(bar) quux;


hal.c:12:13: warning: symbol 'quux' was not declared. Should it be
static?
hal.c:3:5: warning: label 'continue' already bound
hal.c:3:5: warning: label 'break' already bound


static inline int foo(void)
{
    return 0;
}
typeof(foo) quux;

hal.c:3:5: warning: unreplaced symbol 'return'
hal.c:1:19: warning: unreplaced symbol 'return'
hal.c:5:13: warning: symbol 'quux' was not declared. Should it be
static?


static inline void foo(void)
{
    do {} while (0);
}
typeof(foo) quux;

hal.c:3:5: warning: unreplaced symbol 'break'
hal.c:3:5: warning: unreplaced symbol 'continue'
hal.c:1:20: warning: unreplaced symbol 'return'
hal.c:5:13: warning: symbol 'quux' was not declared. Should it be
static?

"extern" before "typeof" fixes all warnings.

-- 
Regards,
Pavel Roskin

             reply	other threads:[~2008-02-14  0:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-14  0:16 Pavel Roskin [this message]
2008-02-22 19:16 ` label 'continue' already bound, unreplaced symbol 'return' Christopher Li

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=1202948215.8941.37.camel@dv \
    --to=proski@gnu.org \
    --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;
as well as URLs for NNTP newsgroup(s).