Help improve gcc
gcc.gnu.org
gcc.gnu.org
How about you merge the fscking C++ diagnostic I wrote more than 6 years ago which is sitting in your Bugzilla (with patches!) collecting dust.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36587
What this does is warn you about constructs where you are using an object for its construction side effect, but forget to give the declaration a name:
void foo::bar()
{
mutexlocker(&my_mutex);
// critical section
}
This should be: void foo::bar()
{
mutexlocker locker(&my_mutex);
// critical section
}
Without the name, it's just a constructor call that doesn't define an object that is scoped around the block, and so the mutex is not locked around the critical section. Its value is discarded and that's that. If it's not optimized away, it will do a quick lock and unlock.I developed this while working as the "guy who makes the from-scratch embedded Linux + toolchain distro". The app developers on the same project wrote a large C++ application, and made this mistake in more than one place, so I whipped up this diagnostic for them.
As an RE who has looked at a lot of compiler output, the code GCC generates is quite different compared to e.g. MSVC and ICC, and I'm almost willing to bet that it's not by chance. I have attempted to discover where to implement improvements by reading the source, but the whole thing is so complex that it's difficult to understand.
Complexity and licensing are probably the biggest issues that put people off trying to improve GCC.
Really, I think the GNU toolchain suffers from being an early adopter of internationalization (since RMS was always committed to Unix saying "Hello, world" and not "Hello, America") and as such has a lot of cruft for inserting translated strings into things like cp.
But GCC is also just old. That's far more likely than a GPL conspiracy story.
Here are the words from the man himself: https://gcc.gnu.org/ml/gcc/2005-01/msg00008.html
You might say the tree itself isn't easy to deal with, which is true, but that is just because the code is very old and things were done differently back then (hint: union of structs).
There is even a very nice tutorial which explains how to do this:
http://www.codesynthesis.com/~boris/blog/2010/05/03/parsing-...
I believe the rationale is that such a reuse would be very hard to find, much less prove conclusively.
There was some discussion of joining forces in the early days of LLVM (ca. 2005 I believe), but for various reasons that did not go forward. Licensing is indeed a big issue: GCC has had the explicit goal of making proprietary plugins technically infeasible, which leads to avoidance of some modularization/decoupling opportunities.