Version: CVS (using KDE KDE 3.1.3) Installed from: Mandrake RPMs Compiler: gcc 3.3.1 Default with Mandrake 9.2 OS: Linux I am unable to compile KDevelop from cvs. I reported this to the mailing list several days ago and got confirmation but no help. I get hundreds of errors compiling the AdaParser.cpp file in languages/ada. These are all along the lines of: AdaParser.cpp:34: error: invalid static_cast from type `antlr::RefAST' to type `RefAdaAST' I get similar error messages in other files, including files dealing with the Pascal language. The problem seems to stem from the static cast from ASTRefCount<AST> to ASTRefCount<AdaAST> which is, I believe, not allowed under C++ standards. I could be wrong on that. Gcc 3.3.x has better support for C++ than 3.2 does which is why this error does not appear with an older version of the compiler. I will attach a patch which uses C-style casts instead of C++-style casts which at least makes the code compile. HOWEVER, I believe the cast is invalid and therefore the results (either with the patch or, with an older version of gcc, without the patch) are undefined.
Created attachment 2971 [details] Patch to convert C++-style casts to C-style casts This allows the code to compile under gcc 3.3.1.
I haven't looked at the code yet, but reinterpret_cast is probably preferable (if really needed) as it can be much easier grepped for later.
I agree that reinterpret_cast would generally be better but it does not work (compiler error) in this case. I am not at all convinced that you can cast templates this way. I don't have any documentation to back this up at this time, though, so I could easily be wrong.
compilation has been fixed in CVS.