linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lance Richardson <lrichard@redhat.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [PATCH v6] sparse: add support for _Static_assert
Date: Mon, 8 May 2017 19:45:52 -0400 (EDT)	[thread overview]
Message-ID: <114460729.6035755.1494287152942.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20170508232509.j77fpn3ffof5tppd@desk.local>

> From: "Luc Van Oostenryck" <luc.vanoostenryck@gmail.com>
> To: "Lance Richardson" <lrichard@redhat.com>
> Cc: linux-sparse@vger.kernel.org
> 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

  reply	other threads:[~2017-05-08 23:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 21:15 [PATCH v6] sparse: add support for _Static_assert Lance Richardson
2017-05-08 23:25 ` Luc Van Oostenryck
2017-05-08 23:45   ` Lance Richardson [this message]
2017-05-09 15:53 ` Christopher Li
2017-05-09 17:42   ` Lance Richardson
2017-05-09 23:21     ` Christopher Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=114460729.6035755.1494287152942.JavaMail.zimbra@redhat.com \
    --to=lrichard@redhat.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).