[Bug c++/50734] const and pure attributes don't have the effect as in C

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Oct 15 08:54:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50734

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-15 08:54:32 UTC ---
This is because f can throw, you need to mark it nothrow as well in C++.
Whether something throws or accesses global memory is orthogonal.
Works with -fno-exceptions.



More information about the Gcc-bugs mailing list