29 years and still immature...
g++ just gave me this error message right now:
./JavaScriptCore/kjs/ArgList.h:133: error: extra qualification 'KJS::ArgList::' on member 'operator new'
Would be nice if this language (or its compilers) would have matured that much, that you don't always need exactly the same C++ compiler as the guy writing the code you try to compile. It was just 29 years ago, that C++ was invented...
Comments
Post a Comment
This site's webmaster failed misserably in upgrading the underlaying web framework.
The comment system is entirely broken right now. Sorry!
That's just a warning. That build system has decided to make all warnings be errors, which is stupid for a tarball build.
No, its not a warning. Recent gcc versions treat that as an error.
Switching from gcc3 to gcc 4.1.1 gave me lots of these errors... Annoying, yes; but every error pointed to some copy/paste mistake that had gone undetected before.
So isn't the real problem rather that the previous compiler was too lax on this code (probably not adhering to that 29-year-old standard)?
Nothing to do with maturity really.
The C++ language does evolve over time, while C is pretty much set in stone. I'm not saying it's good or bad, just that the C++ spec changes occasionally. And so maintaining and compiling C++ code does require a little bit more effort...
It's not really a case of the language spec changing. Your code was incorrect since it was written, and now a new GCC is actually refusing to deal with it.
Microsoft Visual C++ compiler allow you to do that... but that's not standard C++
But thinking about it for me GCC is doing the right thing.
Extraqualification is an error and makes you code looks bad and ugly.
I must second Igor here; that code doesn't adhere to the standard. It should be changed, also for compatibility with other C++ compilers (e.g. Comeau and Intel one).
It is surprising that GCC waited 29 years before throwing an error instead of a warning, though.