Example: write a function without side effects except writing to a local array whose address is returned. The entire function disappears.
@twoscomplement I'm compiling only, not linking, and that doesn't change anything. I'm using -O2. It doesn't delete the function with <=-O1.
-
-
@marcan42 Is the function marked static? It can't be deleted otherwise. I'm not seeing the same behavior with my gcc. -
@twoscomplement by "deleted" I mean its contents are optimized out. It's still there, just add/lea/sub/reqt, the rest of the code is gone. - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.