Send again to the list with plain text mode. ---------- Forwarded message ---------- From: Christopher Li <sparse@xxxxxxxxxxx> Date: Wed, Aug 6, 2014 at 6:26 PM Subject: Re: [PATCH 01/10] Add the __restrict__ keyword To: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx> Cc: Sparse Mailing-list <linux-sparse@xxxxxxxxxxxxxxx> On Wednesday, August 6, 2014, Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx> wrote: > > > No, __restrict__ is only applied to various pointer types in the MinGW > header files (see below). So, I agree that validation/reserved.c is not > exactly representative of the actual use of __restrict__ (or *any* of the > keywords come to that), but that does at least provide a minimal test. Let me clarify. I want to have some regression test cover your usage case. e.g. If I rewrite some part of sparse and breaks __restrict__ but did not break __restrict, I will have not way of knowing it. So please submit corresponding test case. . > > Also, I can't believe that Al did not intend to include __restrict__ in the > original commit d5c9c2431; well actually he *did* include it in the test, he > just didn't notice some of the missing implementation! ;-D __restrict__ does not seem like part of the stander C. BTW, did you try to use gcc -E to find out if __restrict__ expand to any thing like "__restrict"? That will determine if __restrict__ is part of a macro or not. If __restrict__ is just a macro, then the implementation will be different from your patch. > Having said that, I think I see two tests included for the array declaration > usage: abstract-array-declarator-static.c and restrict-array.c. > I don't see it cover the __restrict__ case as far as I can tell. Also, do you have run into the case that "__restrict__" was use in abstract array? None of your grep example show usage in the array. Your patch seems suggest that is possible. > I have included, below, the output of a grep for __restrict__ in the > header files, which returned 50 matching lines (note that the one and > only use of __restrict in the declaration of strtoll which must have > been a typo!). Yes, please take one or two example how __restrict__ is typically used. Merge it into the test case. That is all I am asking. 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