Is declaring/assigning a variable in a high level language such as c++, an explicit instruction?
e.g. x = 5;
It would be handled by the loader, and treated as state information, correct?
It is not an instruction, but a state object, as opposed to something like a for loop, which is an instruction, which makes it's way to the cpu ?
edit: OK, to clarify a bit more. I am not talking about optimisations. Assume none. I am talking about the end result of a compiled program, in an executable file format. Under the circumstances where the compiler decides not to use the MOV instruction, will the data 5 exist within the executables files data segment, or somewhere else?
Is it possible for the 5 to exist as data without being an instruction, with that data later on being loaded into memory? Or, in general, will x = 5 result in a mov instruction when the program is executed.