Open ad8e opened 3 years ago
If the compiler ignores it or not, it might make the code more readable for humans.
It doesn't ignore it in the sense of compilation output (not assembly output); gcc warns about it, and clang errors and refuses to compile. I had to silence them with compiler flags.
You are right, I shall remove the register. Thanks also for the godbolt code, interesting to see how good or bad compilers perform.
https://godbolt.org/z/766P7s
With clang, gcc, and MSVC, there is no change in assembly with register removed.