https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88554

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-12-19
                 CC|                            |dmalcolm at gcc dot gnu.org
   Target Milestone|---                         |9.0
            Summary|Segfault ICE when falling   |[9 Regression] Segfault ICE
                   |off the end of a            |when falling off the end of
                   |reference-returning friend  |a reference-returning
                   |operator                    |friend operator
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Started to ICE (rather than give a -Wreturn-type diagnostic) with r263298

    Add fix-it hint for missing return statement in assignment operators (PR
c++/85523)

    gcc/cp/ChangeLog:

            PR c++/85523
            * decl.c: Include "gcc-rich-location.h".
            (add_return_star_this_fixit): New function.
            (finish_function): When warning about missing return statements in
            functions returning non-void, add a "return *this;" fix-it hint for
            assignment operators.

    gcc/testsuite/ChangeLog:

            PR c++/85523
            * g++.dg/pr85523.C: New test.

Reply via email to