On Fri, Jul 29, 2011 at 11:53:08AM +0200, Richard Guenther wrote:
> 2011/7/29 Daniel Marjamäki <daniel.marjam...@gmail.com>:
> Why doesn't it matter in this case but it matters when the initializer
> are non-constant?

Plus the documentation of -Wreorder even uses constants:

`-Wreorder (C++ and Objective-C++ only)'
     Warn when the order of member initializers given in the code does
     not match the order in which they must be executed.  For instance:

          struct A {
            int i;
            int j;
            A(): j (0), i (1) { }
          };

     The compiler will rearrange the member initializers for `i' and
     `j' to match the declaration order of the members, emitting a
     warning to that effect.  This warning is enabled by `-Wall'.

If you don't want to fix up your code, just compile it with -Wno-reorder.

        Jakub

Reply via email to