> From: "Luc Van Oostenryck" <luc.vanoostenryck@xxxxxxxxx> > To: "Lance Richardson" <lrichard@xxxxxxxxxx> > Cc: linux-sparse@xxxxxxxxxxxxxxx > Sent: Monday, 8 May, 2017 7:25:10 PM > Subject: Re: [PATCH v6] sparse: add support for _Static_assert > > On Mon, May 08, 2017 at 05:15:43PM -0400, Lance Richardson wrote: > > This patch introduces support for the C11 _Static_assert() construct. > > For me, it's fine. > I just have a small remarks (see below). > > > @@ -1945,13 +1953,17 @@ static struct token *declaration_list(struct token > > *token, struct symbol_list ** > > static struct token *struct_declaration_list(struct token *token, struct > > symbol_list **list) > > { > > while (!match_op(token, '}')) { > > - if (!match_op(token, ';')) > > - token = declaration_list(token, list); > > - if (!match_op(token, ';')) { > > - sparse_error(token->pos, "expected ; at end of declaration"); > > - break; > > + if (match_ident(token, &_Static_assert_ident)) > > + token = parse_static_assert(token, NULL); > > I find it better with a 'continue' here > > > + else { > > so, this 'else' become unneeded and there is no > more needs to move the previous content of the loop > (which help a lot when reviewing patches or when > digging in the history). > > -- Luc > That does seem better. I'll wait a bit for any further feedback from Chris and post a new spin. Thanks, Lance -- 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