Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Warnings in C::B

(1/2) > >>

oBFusCATed:
Hello,

There are lots of warnings in C::B, some of them are harmless, but these two are not:

--- Code: ---../../../include/compiletargetbase.h:133: warning: ‘virtual void CompileTargetBase::SetTargetType(TargetType)’ was hidden
../../../include/projectbuildtarget.h:105: warning:   by ‘virtual void ProjectBuildTarget::SetTargetType(const TargetType&)’

--- End code ---

Can someone familiar with the code of the compiler framework fix them?

Jenna:
What do I have to do to get this warning ?
I don't get it on linux (trunk), neither from inside C::B, nor with automake.

oBFusCATed:
I've this in my global compiler options:


--- Code: ---       -Woverloaded-virtual (C++ and Objective-C++ only)
           Warn when a function declaration hides virtual functions from a base class.  For example, in:

                   struct A {
                     virtual void f();
                   };

                   struct B: public A {
                     void f(int);
                   };

           the "A" class version of "f" is hidden in "B", and code like:

                   B* b;
                   b->f();

           will fail to compile.

--- End code ---
I don't know why I have it added to the globals though :)

killerbot:
this is however interesting. I will experiment with this ..

Jenna:
The question is, if it is really necessary to declare these functions virtual, and the other question is if it is a problem to ignore some of these warnings and/or rename some of the functions g++ is warning about (like BreakpointsDlg::Refresh or InfoPane::Show ).

Navigation

[0] Message Index

[#] Next page

Go to full version