linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Josh Triplett <josh@freedesktop.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>,
	Christopher Li <sparse@chrisli.org>,
	linux-sparse@vger.kernel.org
Subject: Re: barrier macro
Date: Tue, 1 May 2007 21:35:00 -0700	[thread overview]
Message-ID: <20070501213500.d36850a5.rdunlap@xenotime.net> (raw)
In-Reply-To: <46381269.9090305@freedesktop.org>

On Tue, 01 May 2007 21:24:09 -0700 Josh Triplett wrote:

> After analyzing net/sunrpc/xprtsock.i, I managed to reproduce the problem with
> the following test case:
> 
> #define barrier() __asm__ __volatile__("": : :"memory")
> 
> static void f(void)
> {
> 	barrier();
> l:
> 	barrier();
> }
> 
> 
> Apparently sparse doesn't like __asm__ __volatile__ after a label.  Looks like
> the change to enable attributes on labels makes Sparse interpret the __asm__
> as an attribute on the label, not as a statement.  If I locally revert the
> label attributes change, aec53c938c34c47cdbdd6824552e0f2a5104b1cb, this test
> case compiles without warning, as does net/sunrpc/xprtsock.c.
> 
> The label attributes change needs some additional work, to make it only handle
> attribute and __attribute__, and nothing else.

OK, thanks for the analysis (and not making me cut down 35000 lines :).

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  reply	other threads:[~2007-05-02  4:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-01 22:34 barrier macro Randy Dunlap
2007-05-02  3:17 ` Josh Triplett
2007-05-02  4:04   ` Randy Dunlap
2007-05-02  4:11     ` Josh Triplett
2007-05-02  4:24   ` Josh Triplett
2007-05-02  4:35     ` Randy Dunlap [this message]
2007-05-02  5:37     ` Josh Triplett
2007-05-02  7:20       ` Christopher Li
2007-05-02 18:11         ` Josh Triplett

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=20070501213500.d36850a5.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=josh@freedesktop.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.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).