User forums > General (but related to Code::Blocks)

why is the result different in debug and release mode?

<< < (3/5) > >>

facat:
the result if right even when i changed the template argument to float. but it executed more loops than the release one, which still means the debug one and release one is different.

facat:
when i tick "Optimize more( for speed [-O1])" in debug project, the result is the same the a release one.

ollydbg:

--- Quote from: facat on April 16, 2011, 07:51:43 am ---when i tick "Optimize more( for speed [-O1])" in debug project, the result is the same the a release one.

--- End quote ---
mostly(probably)
1, this is a compiler bug, which produce different target code and different behavior.
2, some lib conflict. e.g. you app use a debug version CRT, then your lib use some release version CRT, then this will cause some error.

The important is: all these kind of bug is not related to Codeblocks, Codeblocks is only an IDE, and we give a convenient programming environment.

facat:

--- Quote from: ollydbg on April 16, 2011, 10:03:05 am ---
--- Quote from: facat on April 16, 2011, 07:51:43 am ---when i tick "Optimize more( for speed [-O1])" in debug project, the result is the same the a release one.

--- End quote ---
mostly(probably)
1, this is a compiler bug, which produce different target code and different behavior.
2, some lib conflict. e.g. you app use a debug version CRT, then your lib use some release version CRT, then this will cause some error.

The important is: all these kind of bug is not related to Codeblocks, Codeblocks is only an IDE, and we give a convenient programming environment.

--- End quote ---
i prone to regard it as a compile bug. can i update the gcc in my Code Block to a higher version, and how?

ollydbg:

--- Quote from: facat on April 16, 2011, 10:40:50 am ---i prone to regard it as a compile bug. can i update the gcc in my Code Block to a higher version, and how?

--- End quote ---
yes, you can use another compiler, you just need to configure the path in: menu->settings->compiler and debugger settings->compiler's installation directory. :D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version