On Thu Mar 28 15:03:09 2024 +0000, Giovanni Mascellani wrote:
I'm not sure this is useful to have. If you want to retain the information that the IID is not checked, then I'd rather put a comment instead of dead code.
We have a number of these constructs in the tests. To me "if (0)" is very much a comment, and I haven't seen any tool that warns about dead code complain about it. Having the actual code rather than a verbal description explain the conditions that lead to a crash is more precise and "if (0)" vs "#if 0" or "/* some_code_here(); */" make the compiler do static checks if e.g. a variable is renamed.
That said, I don't have strong feelings about it. I can remove it if that's the general preference.