Re: [PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-20 Thread Josh Triplett
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

Re: [PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-20 Thread Josh Triplett
On Sun, Nov 17, 2013 at 09:07:46PM -0500, Greg Price wrote: From: Greg Price pr...@mit.edu 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

Re: [PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-17 Thread Greg Price
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

Re: [PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-17 Thread Al Viro
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? >

Re: [PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-17 Thread Erico Nunes
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

Re: [PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-17 Thread Joe Perches
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. > > >

[PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-17 Thread Greg Price
[+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

[PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-17 Thread Greg Price
[+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 sources.

Re: [PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-17 Thread Joe Perches
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. That style

Re: [PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-17 Thread Erico Nunes
On Mon, Nov 18, 2013 at 12:15 AM, Joe Perches j...@perches.com 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

Re: [PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-17 Thread Al Viro
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? Maybe, but

Re: [PATCH] Clarify error on directive in macro arguments (Re: [PATCH] jffs2: fix sparse errors: directive in argument list)

2013-11-17 Thread Greg Price
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 it's a