This is the mail archive of the
mailing list for the GCC project.
Re: Re: patch: don't issue -Wreorder warnings when order doesn't matter
> If the initializer is constant, but the member value that's being
> initialized has a
> non-trivial constructor with a side effect, your patch will inhibit the warning
> but the program will not behave the same as if reordering had not happened.
Yes. It sounds unlikely. But not impossible of course. I could also
make sure the member variables are POD types before I inhibit the
warning. I just have no idea how I check if a member is POD. But I
could investigate this.
I think, this will still remove most of the -Wreorder warnings that I get.