Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
cb_release_type and GCV's
thomas:
--- Quote from: MortenMacFly on December 30, 2012, 07:56:25 pm ---Well C::B will complain then, at least.
--- End quote ---
My version doesn't (at least not in the global options, might be different for per-project settings). But if it does, that is an example of needless stupidity.
I'm always saying: Don't make things too smart, because too fucking smart soon becomes stupid. There is no sane reason for Code::Blocks to complain. It looks like you're trying to write a letter. Do you want to use the letter template? Wait a moment...
So what was I saying... if Code::Blocks complains about that combination, we have a bug that needs to be fixed.
oBFusCATed:
--- Quote from: thomas on December 30, 2012, 08:21:31 pm ---So what was I saying... if Code::Blocks complains about that combination, we have a bug that needs to be fixed.
--- End quote ---
Try to enable -g after you've enabled -O2 and you'll see the warning.
Alpha:
--- Quote from: thomas on December 30, 2012, 06:02:42 pm ---But I don't see any hindrance of simply setting -g -O2 in the project by default, either. Really, this works fine. There's no compelling reason not to optimize and having debug symbols. Not with GCC, anyway.
--- End quote ---
I would prefer optimization not be a forced default because currently, I work on lower powered computers, so the additional (re)compile time is noticeable for me.
Jenna:
--- Quote from: oBFusCATed on December 30, 2012, 08:27:28 pm ---
--- Quote from: thomas on December 30, 2012, 08:21:31 pm ---So what was I saying... if Code::Blocks complains about that combination, we have a bug that needs to be fixed.
--- End quote ---
Try to enable -g after you've enabled -O2 and you'll see the warning.
--- End quote ---
It does the ame in both directions with an annoying dialog.
I don't think it's a real problem, maybe the message shoud just say, that it might be a problem and not saym that it is not a good thing to do so.
What is worse: if you have -g set and also switch -s on (what is in fact an error), -g will be removed silently without any warning (and vice versa).
This should have an annoying dialog and a cancel option, in my opinion.
Biplab:
--- Quote from: MortenMacFly on December 30, 2012, 07:56:25 pm ---
--- Quote from: Biplab on December 30, 2012, 11:22:37 am ---Is it too difficult to use few mouse clicks to add -g or -O2 at Project Build Options?
--- End quote ---
Yes, if you think about the whole C::B workspace with ~30+ projects. Its not just "a few" mouse clicks then. This was the actual driver for doing that. The GCV is actively applied to all projects, including tools, contrib plugins and so on...
--- End quote ---
I got your point.
Now the question is do we want to change the way C::B is being compiled? That means a Pure Debug build or a Pure Release build. In that case update.bat should be modified accordingly.
Anyway this approach is better. As GCC documentation says, mixing -g and -O flags can produce surprising results.
Quoted from http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html -
--- Quote ---GCC allows you to use -g with -O. The shortcuts taken by optimized code may occasionally produce surprising results: some variables you declared may not exist at all; flow of control may briefly move where you did not expect it; some statements may not be executed because they compute constant results or their values are already at hand; some statements may execute in different places because they have been moved out of loops.
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version