[C PATCH] Improve warn msg (PR c/43395)
Jeff Law
law@redhat.com
Wed Apr 30 21:16:00 GMT 2014
On 04/29/14 15:17, Marek Polacek wrote:
> It's correct to warn about returning an address of a local label,
> but it's clumsy to say it's "local variable. We can easily distinguish
> between a label and a variable.
>
> Regtested/bootstrapped on x86_64-linux, ok for trunk?
>
> 2014-04-29 Marek Polacek <polacek@redhat.com>
>
> PR c/43395
> c/
> * c-typeck.c (c_finish_return): Distinguish between label and variable
> when warning about returning local address.
> cp/
> * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
> between label and variable when warning about returning local address.
> testsuite/
> * c-c++-common/pr43395.c: New test.
OK. Thanks.
Jeff
More information about the Gcc-patches
mailing list