
23 Jul
2011
23 Jul
'11
5:19 a.m.
Indeed, this is weird. I would hope that operator--(int volatile&, int) at least returns a consistent result :)
Not looked at yet in detail. I have filed a bug to g++ (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49812) which has been accepted.
At the end of the day, it's sounding like you should just paste a huge warning somewhere in the library concerning volatile-qualified by-value return types.
That's what I am prepared to do because it becomes too tricky. Frédéric