Good day, sirs and mams )
I've just got some strange problem, while proging c++, using Code::Blocks 10.05, FreeBSD 9.1
Source in lib.cpp:
class A{
public:
A();
A(var1, var2);
};
A::A(){ imlementation }
A::A(va1, var2) {implementation }
class B : public A{
public:
B();
B(var1, var2);
};
B::B() : A() {} // this is Astr#
B::B(var1, var2) : A(var1, var2) {} // this is Bstr#
Source in lib.h:
class A{
public:
A();
A(var1, var2);
};
class B : public A{
public:
B();
B(var1, var2);
};
Source in main.cpp:
#include "lib.h"
...
int main(){
...
B* Bptr = new B();
B* Bptr2 = new B(var1, var2);
...
}
And I get these build warnings:
.../lib.cpp||In constructor 'B::B(var1, var2)':
.../lib.cpp|Bstr#|warning: will never be executed
.../lib.cpp||In constructor 'B::B(var1, var2)':
.../lib.cpp|Bstr#|warning: will never be executed
.../lib.cpp||In constructor 'B::B()':
.../lib.cpp|Astr#|warning: will never be executed
.../lib.cpp||In constructor 'B::B()':
.../lib.cpp|Astr#|warning: will never be executed
||=== Build finished: 0 errors, 4 warnings ===|
This warnings appear only in Debug mode, Release build seems goes ok. The code builds and runs fine, but what I'm doing wrong?