Ali Burak Kulakli
Ali Burak Kulakli

Reputation: 562

Why does adding a comment change compiled code (object) and executable in C++

I've started to add some doxygen comments to my code but I see that some comments change object code and also the linked executable in Visual C++.

I used objdump to catch the differences. I expect date and checksum differences but no more. However, adding a comment line to a doxygen style comment on a method changes object code and the executable.

Do you have any idea what can be the cause of this weird behaviour or is there another method that I can verify no changes in executable after adding those comments?

Cheers, Burak

Upvotes: 1

Views: 721

Answers (1)

SingleNegationElimination
SingleNegationElimination

Reputation: 156128

If you are compiling with debugging symbols, then the comments will cause the line references to move around.

Upvotes: 6

Related Questions