------- Comment #7 from joseph dot h dot garvin at gmail dot com 2010-04-12 12:19 ------- Right, I think that's what users expect, assuming you are in a situation where volatile smart pointers make sense in the first place (in my case they are smart pointers to addresses within a shared memory region -- a case in which I think they make sense but I've been wrong before ;). In general I can see how volatile references could make code more difficult to read, and this is the one place I use them, so maybe the warning could just be changed to make operator= return type an exception to the matching rule?
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7614