Re: MISRA C Rule 20.7 disambiguation

2022-12-19 Thread Roberto Bagnara
On 2022-12-09 23:46, Stefano Stabellini wrote: Eclair marks it as a violation too. Eclair thinks "nr" needs parenthesis. Roberto, we have already discussed how the comma operator "," being the lower precedence doesn't require extra parenthesis. Roberto, what's your take on the [] square brakets?

Re: MISRA C Rule 20.7 disambiguation

2022-12-09 Thread Stefano Stabellini
On Fri, 9 Dec 2022, Jan Beulich wrote: > On 09.12.2022 01:45, Stefano Stabellini wrote: > > This patch is to start a discussion in regard to rule 20.7 and its > > interpretation. During the last MISRA C call we discussed that "our"> > > interpretation of the rule means that the following two cases

Re: MISRA C Rule 20.7 disambiguation

2022-12-09 Thread Jan Beulich
On 09.12.2022 01:45, Stefano Stabellini wrote: > This patch is to start a discussion in regard to rule 20.7 and its > interpretation. During the last MISRA C call we discussed that "our"> > interpretation of the rule means that the following two cases don't need > extra parenthesis: > > #define M

MISRA C Rule 20.7 disambiguation

2022-12-08 Thread Stefano Stabellini
Hi all, This patch is to start a discussion in regard to rule 20.7 and its interpretation. During the last MISRA C call we discussed that "our" interpretation of the rule means that the following two cases don't need extra parenthesis: #define M(a, b) func(a, b) #define M(a, b) (a) = b Moreover