From: Josh Triplett <josh@joshtriplett.org>
To: Morten Welinder <mortenw@gnome.org>
Cc: linux-sparse@vger.kernel.org
Subject: Re: Spurious symbol 'foo' was not declared
Date: Sun, 18 Jul 2010 13:35:43 -0700 [thread overview]
Message-ID: <20100718203542.GA3665@feather> (raw)
In-Reply-To: <AANLkTikqtMvb3fdg4aKR1KStEBhg1yDM-0YpR0VGHtiT@mail.gmail.com>
On Sun, Jul 18, 2010 at 04:16:37PM -0400, Morten Welinder wrote:
> I think sparse issues a spurious warning about "static" for this program.
> Right?
>
> Morten
>
> static void foo (int);
> void foo (int a) { }
>
> welinder@anemone:~> cgcc -Wall -c sss.c
> sss.c:2:6: warning: symbol 'foo' was not declared. Should it be static?
> sss.c:2: warning: ‘foo’ defined but not used
The second warning comes from gcc, I think. But yes, the first warning
represents a long-standing sparse bug; "static" in the prototype doesn't
propagate to the definition.
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-07-18 20:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-18 20:16 Spurious symbol 'foo' was not declared Morten Welinder
2010-07-18 20:35 ` Josh Triplett [this message]
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=20100718203542.GA3665@feather \
--to=josh@joshtriplett.org \
--cc=linux-sparse@vger.kernel.org \
--cc=mortenw@gnome.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.