This is the mail archive of the
mailing list for the GCC project.
Re: [C PATCH] Improve warn msg (PR c/43395)
- From: Jeff Law <law at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jason Merrill <jason at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Wed, 30 Apr 2014 15:14:24 -0600
- Subject: Re: [C PATCH] Improve warn msg (PR c/43395)
- Authentication-results: sourceware.org; auth=none
- References: <20140429211714 dot GC11802 at redhat dot com>
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 <firstname.lastname@example.org>
* c-typeck.c (c_finish_return): Distinguish between label and variable
when warning about returning local address.
* typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
between label and variable when warning about returning local address.
* c-c++-common/pr43395.c: New test.