On Sun, Nov 17, 2013 at 09:07:46PM -0500, Greg Price wrote:
> From: Greg Price
> Date: Sun, 17 Nov 2013 17:57:41 -0800
> Subject: [PATCH] Clarify error on directive in macro arguments
>
> Preprocessor directives in the arguments of a real function
> are innocuous and in some contexts common. If
On Mon, Nov 18, 2013 at 01:33:49AM +, Al Viro wrote:
> On Sun, Nov 17, 2013 at 02:45:05PM -0800, Joe Perches wrote:
> > On Sun, 2013-11-17 at 20:34 -0200, Erico Nunes wrote:
> > > Do you mean it as an error in the sparse tool?
> >
> > Yes. I think it's a defect in how sparse
> > treats string
On Sun, Nov 17, 2013 at 06:15:32PM -0800, Joe Perches wrote:
> On Sun, 2013-11-17 at 21:07 -0500, Greg Price wrote:
> > Perhaps the following tweak to the error message would make this
> > subtlety clearer?
>
> Maybe, but this case isn't a macro. It's a function.
> Dunno if differentiating when i
On Sun, Nov 17, 2013 at 06:15:32PM -0800, Joe Perches wrote:
> > > sparse matches gcc behaviour (I hope), but it warns about such abuses.
> > > It's a defect, all right - one being reported by sparse.
> >
> > Perhaps the following tweak to the error message would make this
> > subtlety clearer?
>
On Mon, Nov 18, 2013 at 12:15 AM, Joe Perches wrote:
> On Sun, 2013-11-17 at 21:07 -0500, Greg Price wrote:
>
> Maybe, but this case isn't a macro. It's a function.
> Dunno if differentiating when it's a macro or a
> function is difficult though.
>
>
The case which was initially reported by spar
On Sun, 2013-11-17 at 21:07 -0500, Greg Price wrote:
> [+linux-sparse and Chris]
>
> On Mon, Nov 18, 2013 at 01:33:49AM +, Al Viro wrote:
> > On Sun, Nov 17, 2013 at 02:45:05PM -0800, Joe Perches wrote:
> > > Yes. I think it's a defect in how sparse
> > > treats string concatenation.
> > >
>
[+linux-sparse and Chris]
On Mon, Nov 18, 2013 at 01:33:49AM +, Al Viro wrote:
> On Sun, Nov 17, 2013 at 02:45:05PM -0800, Joe Perches wrote:
> > Yes. I think it's a defect in how sparse
> > treats string concatenation.
> >
> > That style [... with printk ...] is pretty common in the kernel
On Sun, Nov 17, 2013 at 02:45:05PM -0800, Joe Perches wrote:
> On Sun, 2013-11-17 at 20:34 -0200, Erico Nunes wrote:
> > Do you mean it as an error in the sparse tool?
>
> Yes. I think it's a defect in how sparse
> treats string concatenation.
>
> That style:
>
> printk("%s\n",
> #ifdef F
On Sun, Nov 17, 2013 at 11:45 PM, Joe Perches wrote:
> On Sun, 2013-11-17 at 20:34 -0200, Erico Nunes wrote:
>> Do you mean it as an error in the sparse tool?
>
> Yes. I think it's a defect in how sparse
> treats string concatenation.
>
> That style:
>
> printk("%s\n",
> #ifdef FOO
>
On Sun, 2013-11-17 at 20:34 -0200, Erico Nunes wrote:
> Do you mean it as an error in the sparse tool?
Yes. I think it's a defect in how sparse
treats string concatenation.
That style:
printk("%s\n",
#ifdef FOO
"foo"
#endif
#ifdef BAR
"bar"
#endif
"string");
is
This patch fixes the following errors reported when running sparse:
fs/jffs2/super.c:378:1: error: directive in argument list
fs/jffs2/super.c:380:1: error: directive in argument list
fs/jffs2/super.c:381:1: error: directive in argument list
fs/jffs2/super.c:383:1: error: directive in argument list
Thanks for your reply.
I'll resubmit shortly.
Do you mean it as an error in the sparse tool?
I don't think so, I took a look and it seems to be designed to output
an error for that case.
On Sun, Nov 17, 2013 at 7:40 PM, Joe Perches wrote:
> On Sun, 2013-11-17 at 18:18 -0200, Erico Nunes wrote:
On Sun, 2013-11-17 at 18:18 -0200, Erico Nunes wrote:
> This patch fixes the following errors reported when running sparse:
> fs/jffs2/super.c:378:1: error: directive in argument list
> fs/jffs2/super.c:380:1: error: directive in argument list
> fs/jffs2/super.c:381:1: error: directive in argument
This patch fixes the following errors reported when running sparse:
fs/jffs2/super.c:378:1: error: directive in argument list
fs/jffs2/super.c:380:1: error: directive in argument list
fs/jffs2/super.c:381:1: error: directive in argument list
fs/jffs2/super.c:383:1: error: directive in argument list
14 matches
Mail list logo