Author Topic: Compiler Flag -Wall is always present - how to turn off?  (Read 228 times)

Offline Sultaneous

  • Single posting newcomer
  • *
  • Posts: 2
Compiler Flag -Wall is always present - how to turn off?
« on: July 24, 2020, 07:34:51 pm »
Hi all,

  I have configured a new (unsupported) c compiler for C::B.  This was done as per the wiki, by copying gcc and configuring the toolchain.

  When I try to compile a simple test program, C::B invokes my compiler with the -Wall flag.  This flag is not supported by my compiler.

  Under Project | Build Settings and under Settings | Compiler, the compiler flag for -Wall is turned off.
  In fact, if I turn it on by checking the box, the compiler is then invoked with 2 -Wall paramaters:  -Wall -Wall ...

  It seems C::B is making the -Wall flag mandatory.  How can I turn this off / change this behaviour?
  No global variables are set, nor is this option listed in any additional or custom flag fields.

Thanks in advance!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12739
    • Travis build status
Re: Compiler Flag -Wall is always present - how to turn off?
« Reply #1 on: July 24, 2020, 08:28:31 pm »
Probably the flag has been moved to compiler -> other options. All set but unlisted flags go there. Check all places - global compiler options, project root options, build target options. All of them have the check box control and the other options. So you have 6 places to check. One of them contains it. If you cannot find it you can inspect the cbp file in a text editor. It would give you a clue where to search for the option in the UI.
(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 Sultaneous

  • Single posting newcomer
  • *
  • Posts: 2
Re: Compiler Flag -Wall is always present - how to turn off?
« Reply #2 on: July 24, 2020, 09:15:40 pm »
Thank-you!  You were right, indeed I had to ascii edit the .cbp file, where this node was under project:

<Compiler>
     <Add option="-Wall" />
</Compiler>

Despite not being able to find this in the UI, deleting the node + restarting solved the issue.  Thank-you.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12739
    • Travis build status
Re: Compiler Flag -Wall is always present - how to turn off?
« Reply #3 on: July 25, 2020, 09:49:33 am »
It would have been good if you could have found it. Editing the file by hand is not really recommended.
(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!]