Re: barrier macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ***
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux