Hacker News new | ask | show | jobs
by coherentpony 4534 days ago
s/C++/g++/

clang++ isn't nearly as bad.

2 comments

I tried some of the examples with g++/cc and with clang. Clang is a lot better but it still produces some pretty ridiculous output (but not gigs of ridiculous output fortunately).
Oh, I totally agree. That said, these examples are engineered to make your compiler shit a brick. Most of the time clang++ gives you much more readable output. g++, however, is a lot more careful about your digits. It'll take a little while before clang++ gains serious traction in the scientific community.
> g++, however, is a lot more careful about your digits. It'll take a little while before clang++ gains serious traction in the scientific community.

How do you mean? Does clang have some sort of problem with numeric precision?

g++ has improved their error messages in the past few years, especially when it comes to template error messages. But C++ is still really complicated and you can get get pretty nasty errors.

And clang++ may be better in some aspects but it is not perfect either, one of the entries in this contest caused clang++ to segfault.