| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 08/11] x86/altcall: address violations of MISRA C Rule 20.7
 On 2024-03-25 10:38, Jan Beulich wrote: On 22.03.2024 17:01, Nicola Vetrini wrote:MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, somemacro definitions should gain additional parentheses to ensure that allcurrent and future users will be safe with respect to expansions that can possibly alter the semantics of the passed-in macro parameter. No functional change. Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>Hmm. These macros are, at least in part, hard to read already. The addedparentheses, while necessary when following the rule to the letter, aremaking things worse, even if just slightly. I therefore have a proposal /question: While I can understand the benefits of this, and the reasoning on postfix expressions, what about, for instance (modulo the actual invocation, this is just an example) alternative_vcall0(2 + f) or similar scenarios? -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com) 
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |