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


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7614


timb at bluearc dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


------- Additional Comments From timb at bluearc dot com  2003-08-26 11:02 -------
Can I ask you to reconsider? The usual assignment operator idiom requires
returning a reference. Of course, it's perfectly possible to write volatile
assignment operators to return void, but that's not the expected semantics.

The return statement in the function definition doesn't generate any warning
(and even if it did, explicitly casting to reference wouldn't be too onerous),
but every call of the function does, and it can begin to drown out the rest of
the output. Even if you decide to keep the warning, an option to disable it
would be nice.


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