GCC 4.9 To See Significant Upgrades In 2014
noahfecks writes "It seems that the GCC developers are taking steps to roll out significant improvements after CLANG became more competitive. 'Among the highlights to look forward to right now with GCC 4.9 are: The Undefined Behavior Sanitizer has been ported to GCC; Ada and Fortran have seen upgrades; Improved C++14 support; RX100, RX200, and RX600 processor support; and Intel Silvermont hardware support.'"
No. C++ in particular has resumed the rapid evolution it enjoyed long ago and GCC needs to keep up.
Perhaps in json?
http://michaelsmith.id.au
Most projects don't use C99 anyway.
So your defense is that gcc users don't use features unimplemented in gcc?
Because since 4.6, gcc has severe stability problems? The only version that can compile more complicated C++11 reliably is 4.7.3 -- earlier versions (4.6.x in particular) have a strong tendency to ICE (including segfaults). And 4.8.0 has a performance regression where some files compile multiple hours instead of a few minutes. I have to check with 4.8.2 (I really really hope it works, because clang -- and especially libc++ -- is not as universally available yet).
A lot of generalized software are simple in theory. Until you factor in real world designs, like optimization, handling multiple platforms and architectures, maintainability, stability . . . .
Making something like the GCC is not simple.
I read TFA and all I got was this lousy cookie
What's your point? 4.8.2 is the second bugfix/stabilization release of 4.8.0 which was released in March this year. Should they stop releasing bug fixes as soon as they start developing the next generation compiler? Should they refrain from any new developments until the old version has proven to be bug free?
What's wrong with continuing development that will likely result in a new version release next year?
I thought I was the only one with the performance problems. No one seems to care about my bug reports. Most of the overhead seems to come from the new macro tracing feature, by the way.
For C++ programming you'll need GCC 4.8 anyway because there is no way to get a complete template trace with 4.6 or 4.7. I don't understand what thet were thinking when they decided to skip arbitrary instantiation contexts in the trace with no ability to not skip them.
No. C++ in particular has resumed it's crazy-ass changes that makes code from two years ago look obsolete
FYFY. C++ will be the Fortran of our generation... twenty years from now everyone will be laughed at for touching C++, but it will have all of these nice libraries....
No Apple is pushing CLANG for exactly the reason that they want to use BSD license in a take not give fashion...how hackable is it; Xcode(SDK) will only work on Mac OS X. Looking forward to proprietary extensions :)
Huh? Apple is putting a lot of work in llvm (the general compiler framework), and they give that work away under the BSD license. They are most certainly not only taking, they are also giving a lot. llvm is highly portable, and is certainly not restricted to Mac OS X (or C/C++ compilation, for that matter). In fact, lots of BSD distributions (and Minix) use llvm as their compiler of choice, because they don't want GPLed software. Similarly, clang (the c/c++ compiler on top of llvm) is highly portable, under a BSD license, and Apple is putting a lot of work in it. Moreover, Apple is eating its own dog food, and using llvm/clang to compile most of Mac OS X, which is a solid guarantee for the quality of the resulting compiler, and is therefore another highly significant contribution.
It is true that Xcode (the Integrated Development Environment (IDE)) is not free, but that does not diminish the contributions that Apple is making to llvm and clang.
...which is exactly why some folks are flocking to CLANG.
People are flocking to CLANG for a variety of reasons. A large part seems to be because for some reason the GNU tools have become deeply unfashionable.
LLVM has some structural advantages (due to being youger), but despite that all, GCC is comfortable keeping ahead of CLANG in both the optermizer and C++ support, so it cant be that bad.
Sure, not everyone wants to extend/modify his compiler, but actively preventing people from reusing your code isn't exactly what you should do if you want to keep a community thriving.
RMS is but one voice on the steering committee. He can say what he wants (and does), but the committee doesn't have to listen.
That sad, when taking the long term into account, his whacky ranting and raving has the sad tendency to come true.
SJW n. One who posts facts.
If you're trying to imply that Java is the new Fortran you couldn't be more wrong.
It's the new C080L.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
If you doubt that RMS is [slashdot.org]objecting plugins [gnu.org] in GCC then you're apparently new to /. and GCC.
Wait, wut? You were talking about GCC, why are you equating "GCC" and "RMS" now? "RMS opposes hackability in GCC" and "GCC opposes hackability" are two different statements, don't you think? RMS is not quite at the post of BDFL for GCC project, unlike Linus for Linux or Guido for Python.
And did you know that both plugins and GIMPLE from your previous quote are already in GCC? Your posts look pretty silly with that knowledge: "GCC opposes hackability - see, they don't want convenient IR and plugins! (except they have plugins and had IR at the time of your quoted post about Stallman hating it)"
My guess would be that some people just do not understand how release numbers work...
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
With some insight into how some people write real high-quality enterprise grade software, I can confidently state that you are completely clueless. In addition, many enterprises that are critically depending on IT infrastructure are now considering replacing Solaris with Linux (RHEL typically), due to problems with basically _everything_ Oracle makes. And of course the most critical part of RHEL (the kernel) is compiled with GCC.
You are suffering from the common misconception that things you pay for are better. Psychologically well researched, but it does not hold up in reality, and is just a specific form of stupidity, i.e. ignoring reality to take comfort in your own misconceptions.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
The above post was correctly marked as flamebait, but there's a grain of truth in it. ICC, for example, still does a much better job at vectorisation than gcc or clang (clang with polly enabled does about as well, significantly better in some cases). The autoparallelisation stuff in the Sun, uh, Oracle, compiler is also pretty impressive on certain workloads.
I am TheRaven on Soylent News
As to the quality of the error messages, I recently fixed a number of bugs in some third party code that were raising warnings with clang. One warning, that a comparison was the result of a comparing an unsigned value as being less than zero, occurred in four string processing loops in the code. In each case, it was iterating over characters in a user-provided string and appeared to be a security hole. Fixing it was trivial (change the type to a signed integer), but I like it when my compiler points out serious bugs in code that I'm compiling.
I am TheRaven on Soylent News
Aehm, care to give an example? It also been well-known for a long time that if you want to debug code generated by GCC you should use -O0 (at often not that much performance loss...), as with higher optimizations parts of your code and variables may well be missing in the code. In fact, GDB even warns you about this in startup.
Now, that said, did this change the timing characteristics or the actual computation performed? Because if it just changed the timing, then you are too stupid to read the documentation and use -O0 and all your vitriol is misdirected. If it changed the function, example please and make sure to file a bug-report.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
There's an interesting Clang talk at Channel9: The Care and Feeding of C++’s Dragons. Speaker: Chandler Carruth, Clang lead, Google.
Strange - everyone is constantly using the bleeding edge Clang, as a new version is popped out every six months, and nobody is complaining about that (loudly, at least). Just try and file a bug against last year's clang, and the first question asked is "does it work on 3.3?". If it does, that bug is closed, with no more thought to it.
If LLVM can (quoting the insert) surpass GCC with this release method, then why should GCC not adapt a more rapid pace to accomodate contemporary fashions in opensource? Adapt or die.
BTW, has anybody else noticed the change in time? Way back when, GPL:ing your compiler was the right thing to do, forcing it to be open source. This way GCC devs knew improvements would be fed back to the main line. But nowdays (I argue), LLVM's more liberal license is giving it an edge in the way industry is taking an interest. LLVM/Clang is becoming the "obvious" choice when developing a custom compiler, as you don't have to contribute your stuff to mainline LLVM.
But the rapid pace of LLVM makes it actually cheaper to do so, due to lesser maintenance costs. Because your custom compiler you sell your clients is certainly not versioned against the current source tree, forcing you to jump through hoops backporting bugfixes from old LLVM snapshots.
This makes LLVM getting the same improvements as GCC would get due to the license issue due to a carrot, not a stick. While still keeping the PHBs happy because of the license.
>GCC is comfortable keeping ahead of CLANG in both the optermizer and *C++ support*, so it cant be that bad.
Um. No it isn't. Clang finished c++14 support a few weeks ago. Dev builds of gcc aren't there yet.
GCC is not just a C compiler, but a compiler collection (GCC = GNU Compiler Collection), which especially contains the C compiler gcc (= GNU C Compiler), and in addition the C++ compiler g++.
The Tao of math: The numbers you can count are not the real numbers.
As a member of both the C and C++ standards committees, and as a CEO of a company that sells C++ libraries to businesses for high-performance computing, I have to disagree with you.
The Oracle/Sun and IBM compilers are the worst C++ compilers available.
Intel is also pretty bad, despite touting good standards conformance and being designed for runtime speed, it deals very badly with abstraction penalties, and is extremely slow to compile.
Microsoft's compiler is also pretty bad, both at compilation speed, standards conformance, and runtime speed, with each new version introducing quirks and regressions (they have acknowledged major codegen regressions in the recent releases and are investigating them)
If you want a good C++ compiler, GCC or Clang are the only tools available.
Wrong. I can modify gcc in whatever way I want without ever giving anyone the changed code. The only restriction is that if I decide to give anyone the modified code, I have to do so under the terms of the GPL. But as long as I keep it for myself (e.g. using a modified gcc to compile my own programs), nobody forces me to provide the modifications to anyone.
The Tao of math: The numbers you can count are not the real numbers.
But if you read the GCC mailing lists from the relevant time, you'll see that the gcc developers had a very hard time convincing RMS to give his OK to plugins (I didn't read the mails from the time when GIMPLE was introduced, so I can't comment on that).
The Tao of math: The numbers you can count are not the real numbers.
Apple created and owns clang. If they wanted to stop distributing the source, they could do so no matter if it were GPL and BSD licensed. It's theirs to do what they want with.
They're giving it all away for free with zero obligation to do so, and all you can do is criticise them for somehow still not giving enough?
As far as C++(11,14) goes, clang is more mature, faster *and* it produces faster code (the last mainly due to libc++). I fail to see how is GCC keeping ahead, let alone comfortably. Also, clang is a self-hosting C++ compiler -- unlike gcc, which is written in C. That helps an awful lot.
PS: Getting a two-fold speedup when going from libstdc++ to libc++ (with STL-heavy code) is not unheard of. But yes, that's anecdotal. I don't have any good benchmarks, as far as anything like that even exists.
Yes, "much better", going by available data. Here's that table with version numbers converted into dates. I deleted rows with missing data for either compiler, and removed other compilers. If I get bored, I might actually go through their changelogs for missing data.
https://docs.google.com/spreadsheet/pub?key=0AsJ4G9Bsq42ddHRjbmJNbldUbWxFckpITTFQUkVJUUE&output=html
It is certainly possible to write a simple, crappy compiler. In reality, optimizing compilers are, yes, complex, because users will not accept the simple, crappy compiler output, and getting the best possible output is hard. There are multiple optimization problems in any compiler, and some of them fight each other.
And that Knuth quote applies to users prematurely optimizing their specific source code before seeing where the time actually is; compiler people have to figure out how to optimize all code in the world with the same compiler. It just doesn't apply to that situation.
Apple "created" clang by hiring the LLVM creator. It was started in academia.
Yeah, because those interpreted/bytecode 'point-and-stick' languages are the wave of the future right? Most of their interpreters are written in C++ too. Now we have applications that used to need 1MB in 1998 needing hundreds of MB of ram to do the same remedial things. Also, don't forget to add all the 'binding' dependencies needed to link that script-land with the real system libraries, which are also C/C++, so that it is actually useful. In most cases, a competent programmer can put together an equivalent program with a binary size less in the hundreds of kB using C/C++. It's smaller, faster, and has fewer dependencies and potential bugs because there's less code running in the first place.
There will always be at least one 'bare metal' language around because we have to be able to write for the hardware, whether it be C/C++ or something else, and every programmer should be familiar with its basics at least.
That's not "premature optimization", that's unsafe, bug-producing optimization, which is definitely wrong, but, again, is just not what Knuth was talking about in that statement. "Premature" in this context means "before you've profiled your code", not "before you're sure it's safe to add to your compiler".
Those man-page disclaimers are often there because some user complained that they couldn't get gcc to give them whatever super-optimized thing that was valid for their own program but not safe in general, so the gcc people said "ok, take it, but don't come back to us when it breaks code". If one of the built-in opt levels like -O3 turns those on, that's wrong. If it exists, but the user has to ask for it explicitly, well, the man page warning speaks truly.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Knuth
I'd say misinterpretations of this statement are the root of all evil. They have led to a world full of slow running bloated runtimes doing little more than shoving strings around because today's programmers were quoted this line by professors, and interpreted it to mean "never bother because the user will always have more ram/cpu." It's the reason for all the trashy software out there.
No Apple is pushing CLANG for exactly the reason that they want to use BSD license in a take not give fashion...how hackable is it; Xcode(SDK) will only work on Mac OS X.
GPL didn't stop Xcode existing when it operated around gcc. Xcode will always be an OS X thing, it has nothing to do with the back end compiler license.
Yes, they get a lot of mileage out of tightly coupling Xcode with llvm - eg: they don't have to write the same level of context sensitive language support for editing when you can do constant incremental compiling and inspect the state of the compiler's trees.
BTW; Apple use LLVM for far more than just Xcode. They used it in the display subsystem to run-time optimize code to the actual machine's display configuration.
Being GPLv3 is a bonus for Apple, but it's about more than that. Competition is a good thing.
gcc moved to c++ recently.
Actually since 4.8, the correct optimization level to use for debugging is now -Og
From the documentation at http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
-Og Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience.
Why? Compilers are pretty simple; Difficult for a lot of people to conceptualize, yes, but for those who can make that leap of understanding, not terribly difficult to design
Err, no. Let's look at C++ in particular, as it's pretty much a worst case when it comes to compiler implementation.
These guys make a living working on a C++ front-end. A front-end only. Intel licence it because writing their own C++ front-end would be a tremendous effort; C++ is a hugely complex language, for machines (i.e. compiler front-ends) as well as for humans. The optimisation and back-end work is even more effort, especially if you want to be a serious competitor among today's compilers, which gcc certainly does.
Getting these things right is, to put it mildly, not easy. Bugs in optimising compilers really do happen. Here's a compiler-bug warning I ran into just this week.
Let's also not forget the scope of the gcc project: it's not 'just' a C++ -> x86/AMD64/IA-64 compiler, the way ICC is. It reads in source-code in C, C++, Objective-C, Fortran, Java (in theory...), Ada, and Go, and emits machine code for a great many CPU architectures.
Compilers are a legitimate sub-field of computer science, in the same way operating systems are. IBM invested in JikesRVM, a 'Research Virtual Machine' (for Java) for a reason. It's something some academics specialise in. Dismissing the field as "pretty simple" is hardly fair to its researchers and implementers.
All that extra complexity you ascribe to them is based solely on looking at the size of it and going "zomfg! Where do I start?" ... which is probably why I got downmodded. Nobody understands that just because something is _big_ does not mean it is _complex_.
No, I think you got downmodded because you have a habit of throwing around technical terms like you understand what you're saying, but you don't.
Making something like GCC is not simple. The language specifications are written by humans, and have a whole lot of edge cases and undefined behaviors. So, you have to decide what to do in edge cases, how to take advantage of undefined behaviors to improve performance. And then, a few years later, the specifications change and you have the fun of deciding on a case-by-case basis how to both maintain backwards compatibility and support the new features. Not to mention all the interactions with other people on the project and in the standards committees.
A compiler is an upper-class undergraduate project. A competitive optimizing compiler with front-ends for C, C++, and several other languages and back-ends for a lot of different processors and operating systems is a very complicated job.
Have a nice time.
As the other guy says, Apple created clang from scratch. You are confusing it with LLVM, which is its backend.
Because, you know... funding developers on an open source project and releasing the fuits of their labor for free is all take, take, take.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
Can you give a specific example? I've seen such claims come up before, but so far it has always amounted to someone not being aware of exactly what the spec says about assumptions, in which case it is their code's fault that the optimization changed the result. If they wrote the code correctly, it would work, and in either case the compiler is up to spec. For example, some of the problems people have in C with not aliasing pointers correctly, the compiler is following the spec when it does what people might not expect at higher optimization.