Author Topic: Turning off warning: ignoring old commands + overriding commands  (Read 7072 times)

Offline doscott

  • Multiple posting newcomer
  • *
  • Posts: 17
What's the easiest way, if possible, of turning these off in the CVS build? I have over 400 source files in my project, which I am converting from OWL to wxWidgets, and waiting for all these messages to scroll through when building the project, or even a single file, is a pain.

Thanks

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Turning off warning: ignoring old commands + overriding commands
« Reply #1 on: October 02, 2005, 06:36:28 pm »
Turning off warnings is generally an extremely bad idea, no matter for what reason.

It is maybe disputable whether all compiler warnings that come with with switches like -Wall or -pedantic are really that severe (at least if you don't intend to write portable code).
However, warnings that appear without explicitely asking for more warnings should be taken seriously. If possible at all, you should modify your code so it does no longer produce warnings, else you can run into very nasty problems. In the best case, your code will only be non-portable, in the worst case it may crash and burn out of the blue and you don't know why.

Always remember, the compiler is your friend, not your enemy. If the compiler tells you that what you do is probably wrong, then it is probably wrong ;)

However, if you still want to do it, choose "Inhibit all warning messages" from compiler options (accessible via "Build Options" in the project manager menu), or pass -w to gcc.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline doscott

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Turning off warning: ignoring old commands + overriding commands
« Reply #2 on: October 02, 2005, 06:51:00 pm »
I thought these were debugging warnings from Code::Blocks. After a bit of googling it appears they probably are compiler warnings, and if so then the question arises as to why they occur, as Code::Blocks generates the make file?

Offline doscott

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Turning off warning: ignoring old commands + overriding commands
« Reply #3 on: October 02, 2005, 07:04:52 pm »
OK, it is a compiler issue. It occurs because the make file contains two sets of rules for each file. I can't find the make file so I assume it is a temporary file.

I believe this is a bug as I have two targets defined: default and debug. I am building using the debug target. When I added files to the project I selected that they should belong to both targets. When I change the properties on a file and select a single target, the message goes away.

When the make file is generated for a single target, only files and rules for that target should be generated.

This appears to be a Linux issue, as I dont' get these warnings using Mingw/Windows.