C/C++编译错误收集-Wreorder成员未按顺序初始化
Posted 奇妙之二进制
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了C/C++编译错误收集-Wreorder成员未按顺序初始化相关的知识,希望对你有一定的参考价值。
-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 rearranges 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.
以上是关于C/C++编译错误收集-Wreorder成员未按顺序初始化的主要内容,如果未能解决你的问题,请参考以下文章
C/C++编译错误收集error: jump to label ‘XXXX’ [-fpermissive]
C/C++编译错误收集-Wnon-virtual-dtor持有虚函数却不是虚析构
C/C++编译错误收集non-trivial designated initializers not supported
c/c++编译错误收集error: jump to case label
c/c++编译错误收集error: jump to case label [-fpermissive] crosses initialization of ‘xxx‘