On Thu, 6 Mar 2025, Andrew Pinski wrote:

> Like r5-6912-g3dbb84276aca10 but this is for the C front-end.
> Basically we have an error on a return statement, we just return
> error_mark_node and then the warning happens as there is no return
> statement. Anyways instead mark the current function for supression
> of the warning instead.
> 
>       PR c/60440
> 
> gcc/c/ChangeLog:
> 
>       * c-typeck.cc (c_finish_return): Mark the current function
>       for supression of the -Wreturn-type if there was an error
>       on the return statement.
> 
> gcc/testsuite/ChangeLog:
> 
>       * gcc.dg/Wreturn-mismatch-2.c: Change dg-warning
>       for the last -Wreturn-type to dg-bogus.
>       * gcc.dg/pr60440-1.c: New test.

OK.

-- 
Joseph S. Myers
josmy...@redhat.com

Reply via email to