Programs that modify their own source are not generally a good idea.
Anti-virus programs don't trust them (so your users won't either).
And it isn't really needed any more.
For interpreted languages, that is a different thing. Google around "tcl/tk radical language modification" for some fun. :-)
BTW, a common compiler hack is to write a compiler that injects code into it's executable(s) automatically -- so even if you recompile with "clean" sources the back door code is there.
A relatively recent virus targets Delphi development environments -- so a developer could be compiling and distributing viruses without even knowing it. http://www.sophos.com/blogs/sophoslabs/?p=6117
I think people who do that kind of stuff should be forced to live in a small room with a computer just crawling with viruses and only very limited access to that computer (with no way to actively remove the viruses).
Reminds me of the days when the 8086's at school were all stoned.
That's the problem -- malware ruin everything for legit programmers. We can't write the interesting software we want because AV programs go crazy.
Stupid malware writers... and then the companies like symantec can charge as much money as they like because the average user doesn't have a clue that they're only under risk if they download something (usually) or that other OS's exist which are secure, e.g. OpenBSD.
I only wanted to write the self-modifying code because it sounds interesting... I wasn't going to distribute it. I mean something like