https://bugs.llvm.org/show_bug.cgi?id=36750
Eli Friedman <efrie...@codeaurora.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|REOPENED |RESOLVED
--- Comment #5 from Eli Friedman <efrie...@codeaurora.org> ---
That's still wrong; the function writes to memory.
The point the gcc developer is making is that *if you can hide the
initialization from the compiler* then the function is "pure" because the
compiler can't prove when the initialization actually happened, so you can
pretend the function never had any side-effects in the first place. Here, the
compiler can see the initialization, so that reasoning doesn't work.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs