Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have been working on getting a quite complex C++ code base (3M+ LOC) with heavy template use to compile on clang. Along the way, I have found many violations of the C++ standard that GCC silently accepts, several obscure GCC features that clang does not support, and up to now filed three clang bug reports.

The project compiles now, but the resulting executable is still not passing basic regression tests :)

I think our codebase has been depending for too long on just one compiler, and clang C++ support isn't perfect yet. (FreeBSD has mostly C code which is very stable). I will keep pushing to get it all working :)



"many violations of the C++ standard that GCC silently accepts"

Or maybe it's C++ violations that are "commonplace" and would break several existing softwares.

And herein lies the biggest hurdles with C++

Heavy templating and inheritance is the way to ensure your C++ program will be unmaintainable and not forward compatible with GCC (or other compilers)

I've been in a similar situation where I spent a lot of time fixing compiler errors (on GCC 3.X if I'm not mistaken) that would be ignored on 2.X


I'm in the same boat. A large code base relying on GCC and Boost heavily.

The code builds with Clang, but the runtime crashes deep inside Boost.

It's been very frustrating because we're well past the point where refactoring-out Boost would be cost effective.


> It's been very frustrating because we're well past the point where refactoring-out Boost would be cost effective.

I'm curious: What was the motivation for switching in the first place? And why is staying with the proven tool not the better option?

My own case: It makes no sense to migrate our (relatively small by the sound of it) codebase. It is in production, generating money, and anything that interferes with that is simply not going to be considered. Our largest dependencies are wxWidgets, ffmpeg, libcurl: It has performed well, though not without some hiccups.


iOS.

Apple won't allow us to submit apps built with Xcode 4.1 forever. (4.1 was the last to include GCC.)


headslap Right. I live in a windoze-centric place at the moment (at least for compile) and forgot the world is bigger.

Thanks for the reply.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: