G++ 4 bug?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: G++ 4 bug?

Post by Owen »

arabasso wrote:This really happens, when gcc tries to optimize inline assembly or files .S, "it more spoils" that optimizes the code.
No it doesn't. GCC copies inline assembly to the output verbatim (After doing things like constraint substitution). And GCC doesn't touch .S files, except for passing them through the preprocessor (Though the linker may perform relaxation later on some platforms).

If GCC is breaking your code, you are doing something wrong (OK, exception: Passing -ffast-math can cause some conformant floating point code to break. This is explicitly documented. You enable said optimization at your own risk; its not included in -O3)
Post Reply