←back to thread

429 points rui314 | 2 comments | | HN request time: 0.414s | source
Show context
pskocik ◴[] No.10731856[source]
Now repeat for C++.
replies(2): >>10732008 #>>10732312 #
1. rav ◴[] No.10732008[source]
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...
replies(1): >>10732724 #
2. serge2k ◴[] No.10732724[source]
Except it won't compile anything but "C++" htat's really C code.