This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50734] const and pure attributes don't have the effect as in C
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 15 Oct 2011 08:54:32 +0000
- Subject: [Bug c++/50734] const and pure attributes don't have the effect as in C
- Auto-submitted: auto-generated
- References: <bug-50734-4@http.gcc.gnu.org/bugzilla/>
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.