Re: [PATCH v2 01/10] Add the __restrict__ keyword

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

 



Catching up my backlog.

On Fri, Aug 8, 2014 at 4:11 AM, Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx>
> ---
>
> Hi Chris,
>
> I added a separate test file (alternate-keywords.c) which includes
> test cases for restrict, __restrict and __restrict__. I also included
> some additional tests for other alternative keywords (hence the name
> of the file), namely inline, typeof and their variants.

Looks good.

> Just for the
> record, I don't know of any use of __restrict__ in an abstract array
> declaration on _any_ platform.

If there is no code using the __restrict__ for abstract array, we shouldn't need
this line:

> @@ -1553,7 +1554,7 @@ static struct token *abstract_array_declarator(struct token *token, struct symbo
>
>         token = abstract_array_static_declarator(token, &has_static);
>
> -       if (match_idents(token, &restrict_ident, &__restrict_ident, NULL))
> +       if (match_idents(token, &restrict_ident, &__restrict_ident, &__restrict___ident, NULL))
>                 token = abstract_array_static_declarator(token->next, &has_static);
>         token = parse_expression(token, &expr);
>         sym->array_size = expr;

Or, if you have valid reason to add it. Please provide a test case for
this code path.

Thanks

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