Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: alexchen on March 16, 2015, 07:58:49 pm

Title: GCC compiler flags -O3 -pedantic
Post by: alexchen on March 16, 2015, 07:58:49 pm
I use Code::Blocks 13.12 on CentOS 7, which has gcc 4.8.2.  I set compiler flags -std=c++11 -m64 -fPIC for the project, and set -O0 and -O3 for Debug and Release targets respectively. However, I notice that command line output in CB's build log window for the compiler always has -O3 and -pedantic flags turned on regardless of whether it is building 'Debug' or 'Release'.
I check at the project file and cannot find such flags defined anywhere.
What can be causing this?
Title: Re: GCC compiler flags -O3 -pedantic
Post by: oBFusCATed on March 16, 2015, 08:19:22 pm
Check you global compiler settings at Settings -> Compiler -> Your compiler
Also check the policy settings for your targets in the Project -> Build options dialog.
Title: Re: GCC compiler flags -O3 -pedantic
Post by: alexchen on March 16, 2015, 11:44:40 pm
Thanks for the information. I have found the problem to be in default.conf in ~/.codeblocks.