简体   繁体   中英

GCC - Member should be initialized in member initialization list

I keep getting this warning with GCC, but I didn't enable it in any way for this project. I tried creating a new project (I'm running the Code::Blocks IDE in Ubuntu), and I'm still getting the warning. Help, please?

Edit: Invoking GCC manually does not cause this issue, but invoking it through Code::Blocks (with all warnings disabled) does cause it. From this, I'm guessing it's a Code::Blocks bug.

Edit2: Fixed. Turns out Code::Blocks has global compiler flags which can't be overridden inside specific projects, and this was causing the error.

Then do what the warning tells you to do. Most likely it is there with a reason.

You can always ignore warnings. Also, you are most likely passing a parameter to the gcc that enables that warning.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM