I was asked a question that I don't have any idea about the answer. Basically, the question was what the difference was between C and C++ once you got down to the low level (i.e., once it is compiled). This got me to thinking about the more general question of how feasible it would be for someone to examine compiled code (say once it has been dissassembled) and figure out what language the original program was written in.
My initial gut feeling was that it should be impossible in theory but that the language constructs probably lend themselves to translation strategies that probably leave signatures (patterns) that can be identified. But even then, are the patterns more likely to be a function of the compiler writer (or tools used by the compiler writer) or are they more likely to be a function of the language?
Perhaps to giving a more concrete working example, would you expect object-oriented code to result in compiled code that was demonstrably recognizable compared to non-object-oriented code.
It would be interesting to hear people's thoughts.
My initial gut feeling was that it should be impossible in theory but that the language constructs probably lend themselves to translation strategies that probably leave signatures (patterns) that can be identified. But even then, are the patterns more likely to be a function of the compiler writer (or tools used by the compiler writer) or are they more likely to be a function of the language?
Perhaps to giving a more concrete working example, would you expect object-oriented code to result in compiled code that was demonstrably recognizable compared to non-object-oriented code.
It would be interesting to hear people's thoughts.