This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/7614] Warning when function returning reference to volatile called in void context
- From: "joseph dot h dot garvin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Apr 2010 21:06:54 -0000
- Subject: [Bug c++/7614] Warning when function returning reference to volatile called in void context
- References: <bug-7614-3259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from joseph dot h dot garvin at gmail dot com 2010-04-09 21:06 -------
As a separate affected user, might I ask you guys to reconsider again? If
you're writing a smart pointer class in C++, users expect that you will support
all the same operators with all the same semantics. AFAICT, there is no way to
do that without generating this warning. You must implement an operator= that
returns a volatile reference to support assignment of your volatile smart
pointer because the default generated assignment operator doesn't work for
volatile objects.
--
joseph dot h dot garvin at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |joseph dot h dot garvin at
| |gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7614