Hacker News new | ask | show | jobs
by pskocik 3843 days ago
Now repeat for C++.
2 comments

Considering that a considerably large subset of C is valid C++, it should be easy to modify 8cc to be valid C++ (e.g. by replacing implicit void*-casts to explicit ones), and then you already have a "self-hosting C++ compiler", but that could be considered cheating by some...
Except it won't compile anything but "C++" htat's really C code.
I wouldn't wish that on my worst enemy.