Forgot to include the ML.

-Jiri




---------- Původní e-mail ----------
Od: Jiri Svoboda <jirik.svob...@seznam.cz>
Komu: Jakub Jermář <ja...@jermar.eu>
Datum: 11. 9. 2018 21:41:29
Předmět: Re: [HelenOS-devel] Ccheck issue with restrict qualifier?
"
Hi,




yup, it understands both 'restrict' and '__restrict__'. The report you are
getting is intentional. Ccheck correctly parses this code, identifying __
restrict__ as a type qualifier.




Currently the rule is that there is *never* whitespace after an asterisk in
the meaning of declaring a pointer to something.

So we have:

char *p;

char *(int, int);

char *const p;

char *restrict x;

char *__restrict__ x;




I ran into this during development of the checker. I don't feel strongly 
which of "char *const p" or "char * const p" is better, so I thought it made
sense for type qualifiers to behave just like everything else in this
context.




Does that make it clearer? Do you have any strong opinions against doing it
this way?





Cheers,

Jiri







---------- Původní e-mail ----------

Od: Jakub Jermář <ja...@jermar.eu>
Komu: Jiri Svoboda <jirik.svob...@seznam.cz>
Datum: 11. 9. 2018 19:05:05
Předmět: Re: [HelenOS-devel] Ccheck issue with restrict qualifier?
"On 09/11/2018 06:54 PM, Jakub Jermář wrote:
> the attached patch exhibits the problem. The error message is:
>
> <uspace/lib/c/include/time.h:109:30:space>: Unexpected whitespace after '*
'.
> <uspace/lib/c/include/time.h:109:65:space>: Unexpected whitespace after '*
'.
> <uspace/lib/c/include/time.h:110:22:space>: Unexpected whitespace after '*
'.

Hm, it looks though that Sycek understands __restrict__, but insists on 
it coming after the asterisk immediately, which is strange.

Jakub

>
> Cheers,
> Jakub
>
> On 09/11/2018 03:29 PM, Jiri Svoboda wrote:
>> Hi Jakub,
>>
>> I recall you mentioned having a problem with ccheck and (some form of) 
>> restrict qualifier? What was the problem? Can you give me the exact code
>> snipped that caused the issue? What was the expected result as opposed 
>> to the actual result? You could also submit it as an Issue on GitHub (I
>> enabled issue tracking for Sycek).
>>
>> Thanks,
>> Jiri
>>
>>
>> _______________________________________________
>> HelenOS-devel mailing list
>> HelenOS-devel@lists.modry.cz
>> http://lists.modry.cz/listinfo/helenos-devel
"
"
_______________________________________________
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to