This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/7614] Warning when function returning reference to volatile called in void context



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]