User forums > Using Code::Blocks
I found a bug, but i dont know where this bug comes from
kagerato:
Of the three flags that -O3 includes which -O2 does not, fweb is the likely culprit for problems. I've heard several developers on completely unrelated projects mention that it broke code which otherwise compiled and ran fine.
Try -fno-web to disable it.
There are some disputes as to whether -finline-functions actually improves execution speed in all the situations where it's applied, but I haven't heard any accounts of it generating broken instructions.
Note that this information is relevant only to GCC 3. GCC 4 is a completely different ballgame; for example, multiple gentoo users have reported serious problems using -O3 even on projects which are widely regarded stable.
thomas:
Funny you should say that, -fno-web and -finline-functions happen to be the exact things that I had to turn off.
(-finline-functions did not actually break code, but gave a link error).
Anonymous:
Sorry for not posting for a while, but often i cant reach the site. Anyway i found the solution to my problem. It was related to the calling conventions of the dll. The correct code is :
--- Code: ---
typedef DWORD (WINAPI *GETMODULEFILENAMEEX)(HANDLE, HMODULE, LPTSTR, DWORD);
--- End code ---
i forgot the WINAPI so the stack was totaly screwed up after calling the function.
So there was no bug whatsoever. It was just me being stupid :). Am i the only one who has never ever heard of calling conventions ?!
Navigation
[0] Message Index
[*] Previous page
Go to full version