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

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

 



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
--
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