4 ms·
The compiler will detect any attempt at taking the address of the variable (including fancy things like most inline assembly) and skip the optimization, marking
by AstralStorm 7y ago
The compiler will detect any attempt at taking the address of the variable (including fancy things like most inline assembly) and skip the optimization, marking it as requiring a memory location.
However, it can still cheat by rearranging the memory write or even letting linker initialize the address.
- caf 7y agoWe are in violent agreement. An explicitly const-qualified object instead can be replaced with its value even if its address has escaped.