Re: [PATCH v4] sparse: add support for _Static_assert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: "Christopher Li" <sparse@xxxxxxxxxxx>
> To: "Lance Richardson" <lrichard@xxxxxxxxxx>
> Cc: "Linux-Sparse" <linux-sparse@xxxxxxxxxxxxxxx>
> Sent: Wednesday, 3 May, 2017 11:03:22 PM
> Subject: Re: [PATCH v4] sparse: add support for _Static_assert
> 
> On Wed, May 3, 2017 at 12:55 PM, Lance Richardson <lrichard@xxxxxxxxxx>
> wrote:
> > +               } else if (token_type(token) == TOKEN_IDENT &&
> > +                          (keyword = lookup_keyword(token->ident,
> > NS_KEYWORD)) &&
> > +                          keyword->op == &static_assert_op) {
> 
> I think you should add _Static_assert into header file "ident-list.h"
> then you can simplify this test as:
> 
> else if (token_type(token) == TOKEN_IDENT &&
>             token->ident == &_Static_assert_ident)
> 
> We don't need to go through a keyword look up then test
> the keyword->op == &static_assert_op.
> 
> Chris
> 

Makes sense, thanks for the suggestion. This should also address Luc's
comment about "extern int _Static_assert;" being accepted in the v4 version.

Will fold into v5.

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



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux