Does this make sense in C ++?
Yes, it does it syntactically, but without comment you may not know what the intentions of the developers were (if any), except perhaps suppressing the warning variable.
Is the variable name also an expression?
Yes, the variable itself is an expression. Ex. if(<expression>) if(something)
This code compiles, so how does it work?
It works with a comma operator and ignores the result of something , and then assigns 0 to somethingElse . Although something was marked volatile , the original developer might have a compiler that still complained about unused variables and was a smart developer, which was then resolved to suppress with this syntax.
source share