On 14/06/2023 7:52 am, Jan Beulich wrote: > On 13.06.2023 21:47, Roberto Bagnara wrote: >> On 13/06/23 19:45, Andrew Cooper wrote: >>> On 13/06/2023 6:39 pm, Julien Grall wrote: >>>> Hi, >>>> >>>> On 13/06/2023 17:22, Andrew Cooper wrote: >>>>> These are disliked specifically by MISRA, but they also interfere >>>>> with code >>>> Please explicitly name the rule. >>> I can't remember it off the top of my head. >>> >>> Stefano/Bertrand? >> Rule 2.1 > That's about unreachable code, but inside the constructs there's nothing > that's unreachable afaics. Plus expanding "manually" them wouldn't change > reachability, would it?
I bet it's complaining about the while() after the goto. I can see why things end up caring - because this violation can only be spotted in the fully-preprocessed source where the macro-ness has gone away, and *then* applying blanket rules. Which comes back to the original point I made on the call yesterday that do{}while(0) correctness for macros is far more important than some, honestly suspect, claim about the resulting code being somehow "better" without the macro safety. ~Andrew