[Bug c/43395] Gcc warns label as local variable

2012-01-25 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43395

Andrew Pinski  changed:

   What|Removed |Added

   Keywords|patch   |diagnostic
 Status|UNCONFIRMED |NEW
URL|http://gcc.gnu.org/ml/gcc-p |
   |atches/2010-03/msg00704.htm |
   |l   |
   Last reconfirmed||2012-01-25
 Ever Confirmed|0   |1

--- Comment #1 from Andrew Pinski  2012-01-25 
08:44:55 UTC ---
http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00708.html says we should warn,
just the warning's wording is incorrect.


[Bug c/43395] Gcc warns label as local variable

2014-04-29 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43395

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

--- Comment #2 from Marek Polacek  ---
Potential fix: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg02014.html


[Bug c/43395] Gcc warns label as local variable

2014-05-01 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43395

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Thu May  1 07:29:38 2014
New Revision: 209973

URL: http://gcc.gnu.org/viewcvs?rev=209973&root=gcc&view=rev
Log:
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.

Added:
trunk/gcc/testsuite/c-c++-common/pr43395.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-typeck.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog


[Bug c/43395] Gcc warns label as local variable

2014-05-01 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43395

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marek Polacek  ---
Fixed.