Talk:Useless instructions

From Rosetta Code
Revision as of 11:03, 16 October 2021 by Tigerofdarkness (talk | contribs) (Comment on "useless" constructs)

Leaving this as a draft for now since I'm not sure if this applies to anything that isn't assembly. --Puppydrum64 (talk) 04:01, 16 October 2021 (UTC)

if true {} else { code that is never executed }

Constructs like the above (suitably formatted for the language in question) could be useful to "temporarily" stop the execution of the else part during development. Although the compiler doesn't complain (though issuing an "unreachable code" warning would presumably be not that hard) do we know whether it actually generates code for the else part? --Tigerofdarkness (talk) 11:02, 16 October 2021 (UTC)