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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=49508
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot 
gnu.org

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The C++ front-end fix was r5-6912-g3dbb84276aca10 , a similar fix should happen
here in c-typeck.cc:
```
      tree t = convert_for_assignment (loc, UNKNOWN_LOCATION, valtype,
                                       retval, origtype, ic_return,
                                       npc, NULL_TREE, NULL_TREE, 0);
      tree res = DECL_RESULT (current_function_decl);
      tree inner;
      bool save;

      current_function_returns_value = 1;
      if (t == error_mark_node)
        return NULL_TREE;

```

So mine.

Note the C++ front-end does:
```
      /* Suppress -Wreturn-type for this function.  */
      if (warn_return_type)
        suppress_warning (current_function_decl, OPT_Wreturn_type);

``

Now.

Reply via email to