GCC Turns 25
eldavojohn writes "With the release of GCC 4.7.0, the venerable and stalwart constant that is the GNU Compiler Collection turns twenty five. More ISO standards and architectures supported with this release and surely more memories to come from the compiler that seems to have always been."
Hey GCC, only one slice of cake for you - you are big and slow enough at the moment (but I love you anyway).
OH NO! It's like I'm married to GCC!
You must be a high quality programmer.
Is that some faded-out version of Pascal, perhaps?
Are we measuring GCC from the first version called GCC, or are we measuring from the last release of EGCS, which is actually what we're now using and calling GCC? 'cos where the original GCC went, no one followed...
You youngin' have no idea of what kind of crap for compilers we had to put up with until gcc.
25 years of compilation with gcc!
"To those who are overly cautious, everything is impossible. "
Before GCC there were some excellent (for their day) compilers available from what was then an obscure technology company called Microsoft. There were cross-compilers for unusual platforms from Manx Software.
Kids these days. Next thing you know they'll think they invented sex.
...wasn't GNU Emacs used as the example of the "cathedral" model?
Happy Birthday gcc!
Are you serious? You're a firmware engineer and you can't figure out what compiler to use. Further, you're developing for ARM and you think that Microsoft or Intel may be the best option?
<br><br>
NXP recommends GCC (Code Red IDE which is Eclipse-based), and ST recommends Keil, for their ARM micros. Just FYI.
<br><br>
Good luck on your school project.
sig: sauer
Intel and Microsoft compilers are generally considered better than GCC for IA32 and x86_64, but that's mostly because those are the only platforms those compilers need to target (Microsoft care about ARM now, but I don't know how well MSVCC compares to GCC for any given ARM target). Architecture specific compilers will always be able to take crazy shortcuts in the optimiser and generator. GCC has to jump through all sorts of hoops between the front end and the back end, because the front end can't make any assumptions about the back end.
Yay for gcc, always giving me errors and making me actually try to get it right the first time.
Good luck on your website.
Those were the days before the EGCS fork.
Your attitude makes me think that you're not a JavaScript Rockstar. Well I am, and let me tell you, it's not easy being one!
You probably only know Pearl or See Plus Plus or See Sharp or one of those other old hat langs that nobody uses any more. You also probably only write software that's Desktop Scale or maybe even Server Scale. Well that's Old Hat and it's Small Hat!
Us pros, we use JavaScript because it's the best language there is. In fast, it's so good that it's the only one I need to know. It's so fast to work with that I can create five social media applications before you even turn your compiler on! And since I use node.js my web app will scale to the Web And Beyond.
JavaScript has the best dev tools around. I hear that you guys have Visual Studios or something but we have alert(). It's like your Visual Studios but it's a lot more powerful. But we only use it for the Hard Problems because JavaScript makes it so easy to write perfect software. In fact, I haven't created a bug in almost 3 years because JavaScript is perfection and I'm thus perfection because I use JavaScript.
JavaScript is the only option today. If you're not using JavaScript, and only JavaScript, then your code is Old Hat. If your code is Old Hat then you're not a JavaScript Rockstar like me and my colleagues. And if you're not a Rockstar, then you probably shouldn't be talking about programming.
Pastel was an extended Pascal compiler developed by LLNL for the S-1 supercomputer project
http://www.cs.clemson.edu/~mark/s1.html
It, and several other significant pieces of software, including the SCALD hardware design language
were made freely available by LLNL. I have one version of the compiler, which was donated to the
Computer History Museum by one of its authors. I have been looking for the other pieces since the
late 80's.
If you look at the GNU Manifesto, RMS was also looking at using the MIT Trix kernel in the early days
of the project.
You can have the best algorithm in the world, and a good compiler will *still* be able to make it run faster than a bad one.
Alignment, branch probabilities, inline functions, hoisting stuff out of loops, loop unrolling, removing unused code, etc.--these sorts of things really can make a difference in code that gets called frequently.
That said, it's not exactly clear that the Intel compiler (icc) is unconditionally better than gcc. There are some benchmarks at http://www.linuxforge.net/docs/bm/bench-gcc-icc.php of a linux-2.6.34 kernel compiled with gcc and icc. The results are close enough that it doesn't make sense for most people to use icc.
RTFM idiot - Os means to optimize for size. The generally accepted standard flag for GCC is -O2 as it's the best compromise between Size and speed up. The only thing is, Sped Up is dependent upon various elements within the source code such as loops and CPU specific options as we Gentoo users tested. Some apps actually do well with O3 flag, most work fine with O2 and from my experience, Os offered the best performance with smallest size possible from the binaries. Most of the speed increases come from fewer cache misses as the binaries are sometimes small enough to actually fit within the L2-L3 cache when the cpu has sufficient space.
Mod me up/Mod me down: I wont frown as I've no crown
Now, get off my lawn.
--- Liberty in our Lifetime
If you're programming in C, which is very likely if you're doing embedded, you're going to hate your life if you have to use Microsoft's compiler. It doesn't support C99 very well (at all?), it doesn't allow inline functions, forces you to declare all your variables at the top of a function, and a number of other annoying things that I only remember when I have to use it.
Basically stay away from Microsoft compiler for C if you can help it.
"First they came for the slanderers and i said nothing."
Unless of course clang generates code that is twice as slow as gcc
SmallPT is one graphics program that seems to be much slower with clang than gcc.
Work bio at MMWD
Linux started on usenet, and what really made it blow up was the ability to use gcc to write software. The first version of linux everyone was running didn't have a login, you just got root. Soon the login program came, (i think getty). But anyway it was Theodore Ts'o who did the heavy lifting. Every new program needed something new in the C library and Theodore somehow got it done.
Thanks Theodore !!
Remove the "\n" from your printf statement. After you graduate, make sure to tell the interviewer you want the management ladder.
Are you an Apple shill in your spare time?
I'm trying to read this thread, and I have to put up with your repetitive posts about how great clang is. Why don't you read some of the replies to your crap? They do a good job of debunking your claims. I have mod points, but I just hate moderating people down, even if they waste my time repeating unfounded assertions (also known as bullshit).
puts() will, actually.
True, but adding // comments would take 10 minutes (assuming you know the code), and giving the ability to declare variables wouldn't take long either.
You forget about all the associated red tape. Even a minor feature has to be tested, and some QA ultimately has to sign off for that. It also has to be documented by tech writers, complete with code samples, and said documentation to be translated to all supported languages (I believe over a dozen now for VS). Any associated user-visible output (e.g. new errors/warnings) also has to be proof-readed and translated. It all adds up.
But let's be honest, is there any reason a company with Microsoft's resources can't keep up with gcc?
It can, if that were the goal. But the ultimate goal is to earn money, same as for any other for-profit company. Hence, things aren't done because they are neat or the Right Thing or because everyone else has them. They're done because the expected profit from the feature - whether direct (from sales of the product) or indirect (from sales of other products propped up by the SDK, like, say Windows) - exceeds expenses. Even more importantly, resources being large but still limited, for every feature the question is not whether it is profitable in and of itself, but whether it is more profitable than something else that could be implemented in its place. It's that stack ranking that really kills C99 support - there's always something more important (read: more profitable).
Of course, people aren't cogs, and sometimes they feel hard enough about something - purely out of the desire to do the Right Thing - that they play bureaucracy games to come up with a plausible "business case" for their favorite cause, and ultimately convince the management that calls shots to let them put it in. But, there's no-one there who feels hard about C99 (or at least harder than a dozen other things that need to be done first, preferably yesterday - like, say, variadic templates...)
Long live GCC, IMHO the major reason why we no longer pay for compilers as we used to.
LLVM/Clang is a very interesting project, it's sad it's gaining traction because of GPLv3 haters/fanboys/etc. and not because of its qualities. I fear their actions might even harm it, i.e. users and developers could stop being interested in it being the better compiler as long as it's "more open" (lol).
Kill all hipsters.
Oh, come on. I despise Microsoft as much, or more, than anyone here. But how does freely selling something for an agreed-on price of $75K make SCP a victim, no matter what Microsoft may have done with their purchase subsequently?
If I sell my house for $200K, and the buyer subsequently resells it some time later for $300K, can I be a victim too? Is no one an adult any more, capable of making decisions and accepting the consequences, for better or worse? Let's grow up, shall we?
As the other poster pointed out, clang does not support OpenMP. If your code uses OpenMP, then this is a very serious limitation. It means that your code will execute on a single thread with clang, but on multiple concurrent threads with gcc. If your program doesn't make use of OpenMP, then this benchmark is highly misleading.
Oh, and if your code does use OpenMP, the odds are that Path64 will be significantly faster than gcc.
The other poster mentioned blocks. I just did some work on Solaris support in LLVM and clang for a customer for exactly this reason. They wanted to use blocks with libdispatch, because it lets them scale their code up very easily to a lot of cores. GCC doesn't support blocks at all. Clang didn't support Solaris at all. Getting clang, LLVM, and libc++ all working on Solaris was a lot easier than adding blocks support to GCC would have been, so now they're using this stack.
I am TheRaven on Soylent News
No, no, no. This is a HARD PROBLEM. You MUST use RECURSION!
void print_string(char *string)
{
putchar(*string);
print_string(string + 1);
}
Program Intellivision!
Almost certainly. The big problem for compiler writers today is that measuring performance is insanely hard. Things that improve microbenchmarks will often make code slower overall. A simple example is inlining, which can come with some huge benefits. If you inline a function, then you can do more optimisations across the result, and you avoid the cost of the call, but you increase the code size. You run the result, and it's faster, but now it's using 20% of your instruction cache instead of 5%. Fine? Well, now you run it on the same system that's running some other things as well, and now it's getting an instruction cache miss 1% of the time, when previously it would have no cache misses. If your cache miss penalty is 100 cycles, then you're code is now half the speed it was (a 100 cycle penalty every 100 instructions, assuming an average of one instruction per clock, which is pretty pessimistic for a modern CPU) so those optimisations had better have been worth it...
I am TheRaven on Soylent News