[llvm-bugs] [Bug 36750] Meyers' singleton does not work with [[gnu::const]] and -O1 to -O3

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 15 13:35:46 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=36750

Eli Friedman <efriedma at codeaurora.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID
                 CC|                            |efriedma at codeaurora.org

--- Comment #1 from Eli Friedman <efriedma at codeaurora.org> ---
myClass() calls a function with side-effects, therefore marking it gnu::const
leads to undefined behavior.  This shouldn't be surprising.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180315/8f413aa3/attachment-0001.html>


More information about the llvm-bugs mailing list