Author Topic: GCC compiler flags -O3 -pedantic  (Read 5686 times)

Offline alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
GCC compiler flags -O3 -pedantic
« 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: GCC compiler flags -O3 -pedantic
« Reply #1 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline alexchen

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: GCC compiler flags -O3 -pedantic
« Reply #2 on: March 16, 2015, 11:44:40 pm »
Thanks for the information. I have found the problem to be in default.conf in ~/.codeblocks.