Hacker News new | ask | show | jobs
by pquerna 6025 days ago
This is a pretty huge step. C++ support in Clang has always lagged behind, but the Clang internals is all C++ -- as mentioned in the blog it isn't self-hosting yet, just self-building, but this is major step in making Clang a true replacement for GCC.

Compilers revolutions don't happen overnight, but rejoice, you are seeing one happen right now.

I personally can't wait to see systems like OSX & FreeBSD use Clang as their default compilers, which might happen in the next few years.

2 comments

I personally can't wait to see systems like OSX & FreeBSD use Clang as their default compilers...

Some parts of OS X are already compiled with Clang. Off the top of my head, OpenCL, OpenGL and Xcode are all compiled with Clang now. Also, I think (but can't source) AppleScript Studio is also compiled with Clang. And there's MacRuby that's built on llvm.

I'm happy to see this moment. I don't want to diminish it, but aren't these tools written in a "tasteful subset" of c++, which could mean there are still many missing nooks and crannies?
Yep. A detailed status report (last updated a few days ago) can be found here: http://clang.llvm.org/cxx_status.html
Yup, which is why self hosting is a step (albeit a very cool one) on the way. You still have to deal with all the features and idioms you don't know - I remember Duff's device and other forms of switch abuse falling into that category.

It is great dogfood, but does lead to some head exploding debugging - you are looking at a piece of badly generated code trying to figure out how many generations back the bug is.