On Mon, Jun 19, 2017 at 11:35:30PM +0100, Ramsay Jones wrote: > On 19/06/17 22:14, Luc Van Oostenryck wrote: > > The motivation for this patch was to allow sparse to be > > compiled with clang which doesn't like what is done > > on VLAs in the MK_IDENT() macro. > > > > But also, I can't see any justification for not using the > > real thing to create identifiers: built_in_ident(). > > > > CC: Oleg Nesterov <oleg@xxxxxxxxxx> > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> > > --- > > dissect.h | 13 ------------- > > test-dissect.c | 6 +++--- > > 2 files changed, 3 insertions(+), 16 deletions(-) > > > > diff --git a/dissect.h b/dissect.h > > index 3b72b8988..5ac1f4d40 100644 > > --- a/dissect.h > > +++ b/dissect.h > > @@ -25,16 +25,3 @@ struct reporter > > }; > > > > extern void dissect(struct symbol_list *, struct reporter *); > > - > > -#define MK_IDENT(s) ({ \ > > - static struct { \ > > - struct ident ident; \ > > - char __[sizeof(s)]; \ > > - } ident = {{ \ > > - .len = sizeof(s)-1, \ > > - .name = s, \ > > - }}; \ > > - &ident.ident; \ > > -}) > > - > > -#endif > > Hmm, does this compile?; you seem to have removed an #endif, > leaving an unbalanced '#ifndef DISSECT_H'. Yes, something (or more probably someone (me)) eat it. It's already corrected. But thanks again! -- Luc -- 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