Original Post
I'm moving a project from VC7 to GCC under Mac OSX, and I'm getting a bunch of the warning that says some variable will be initialized after some other... caused when you have a constructor initializer list with variables in a different order from that in which they're declared in the class declaration, ie:
class A
{
public:
A();
int mX;
int mY;
};
A::A() : mY(0), mX(0)
{
}
The above is the type of situation that causes the warning. Is there a flag to disable this warning? I couldn't see anything in the gcc man file or the Xcode build options. I could just switch around the initializations so they're in the right order, but that's a little annoying since there's kind of a lot of code, and I know the order in which the initializations will be run with or without the warning.