相关疑难解决方法(0)

g ++ -Wreorder有什么意义?

g ++ -Wall选项包括-Wreorder.该选项的作用如下所述.我不清楚为什么有人会关心(特别是在-Wall中默认打开它).

-Wreorder (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, emit-ting a warning to that
  effect.  This warning is enabled by -Wall.

c++ g++ compiler-warnings

140
推荐指数
5
解决办法
5万
查看次数

标签 统计

c++ ×1

compiler-warnings ×1

g++ ×1