[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1] misra: add deviation of Rule 5.5
On Wed, 23 Apr 2025, Lira, Victor M wrote: > Continuing a discussion from before: > > On 4/22/2025 11:44 PM, Jan Beulich wrote: > > Caution: This message originated from an External Source. Use proper caution > > when opening attachments, clicking links, or responding. > > > > > > On 23.04.2025 01:43, victorm.lira@xxxxxxx wrote: > > > memmove. > > > - Tagged as `deliberate` for ECLAIR. > > > > > > + * - R5.5 > > > + - Clashes between function-like macros and function names are > > > + deliberate > > They may or may not be deliberate, depending on context. I don't think it's > > a > > good move to deviate this more widely than necessary. If I get the > > expression > > above (in deviations.ecl) right, even > > > > void func1(int); > > void func2(int); > > > > #define func1() func2(0) > > #define func2() func1(0) > > > > would be deviated, which I don't think we want. Especially when, in a less > > contrived scenario, the clash may not easily be visible. > > OK, I see the issue for different functions. Does it make sense to say it's > deliberate when it's the same identifier? > > void func1(int); > ... > #define func1() func1(0) > > Could this be deviated? I think it makes sense to be clear in deviations.rst and the doc text in deviations.ecl that we are referring to the same identifier. That we can do. I am not sure it is possible to change the ecl rule accordingly to narrow the check relaxation. If not possible, I'd keep it as it is in this patch.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |