public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41920]  New: Invalid 'unused parameter' warning for parameters used in lambdas
@ 2009-11-03  5:17 bruck dot michael at googlemail dot com
  2009-11-06  9:35 ` [Bug c++/41920] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bruck dot michael at googlemail dot com @ 2009-11-03  5:17 UTC (permalink / raw)
  To: gcc-bugs

$ cat test1.c
int foo(int i)
{
    auto bar = [=](){ return i; };
    return bar();
}

$ arm-elf-g++.exe -std=gnu++0x -Wall -Wextra -c test1.c
test1.c:1:5: warning: unused parameter 'i'


-- 
           Summary: Invalid 'unused parameter' warning for parameters used
                    in lambdas
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bruck dot michael at googlemail dot com
  GCC host triplet: i686-pc-cygwin
GCC target triplet: arm-unknown-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41920


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/41920] Invalid 'unused parameter' warning for parameters used in lambdas
  2009-11-03  5:17 [Bug c++/41920] New: Invalid 'unused parameter' warning for parameters used in lambdas bruck dot michael at googlemail dot com
@ 2009-11-06  9:35 ` pinskia at gcc dot gnu dot org
  2009-11-16 16:17 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-11-06  9:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-11-06 09:35 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   GCC host triplet|i686-pc-cygwin              |
 GCC target triplet|arm-unknown-elf             |
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2009-11-06 09:35:27
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41920


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/41920] Invalid 'unused parameter' warning for parameters used in lambdas
  2009-11-03  5:17 [Bug c++/41920] New: Invalid 'unused parameter' warning for parameters used in lambdas bruck dot michael at googlemail dot com
  2009-11-06  9:35 ` [Bug c++/41920] " pinskia at gcc dot gnu dot org
@ 2009-11-16 16:17 ` pinskia at gcc dot gnu dot org
  2010-01-20 20:23 ` [Bug c++/41920] [C++0x] " paolo dot carlini at oracle dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-11-16 16:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2009-11-16 16:17 -------
*** Bug 42066 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lloyd at randombit dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41920


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/41920] [C++0x] Invalid 'unused parameter' warning for parameters used in lambdas
  2009-11-03  5:17 [Bug c++/41920] New: Invalid 'unused parameter' warning for parameters used in lambdas bruck dot michael at googlemail dot com
  2009-11-06  9:35 ` [Bug c++/41920] " pinskia at gcc dot gnu dot org
  2009-11-16 16:17 ` pinskia at gcc dot gnu dot org
@ 2010-01-20 20:23 ` paolo dot carlini at oracle dot com
  2010-01-20 20:26 ` paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-20 20:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo dot carlini at oracle dot com  2010-01-20 20:23 -------
*** Bug 42815 has been marked as a duplicate of this bug. ***


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |indy2718 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41920


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/41920] [C++0x] Invalid 'unused parameter' warning for parameters used in lambdas
  2009-11-03  5:17 [Bug c++/41920] New: Invalid 'unused parameter' warning for parameters used in lambdas bruck dot michael at googlemail dot com
                   ` (2 preceding siblings ...)
  2010-01-20 20:23 ` [Bug c++/41920] [C++0x] " paolo dot carlini at oracle dot com
@ 2010-01-20 20:26 ` paolo dot carlini at oracle dot com
  2010-01-20 20:53 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-20 20:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from paolo dot carlini at oracle dot com  2010-01-20 20:26 -------
Jason, we just got a third duplicate for this issue: if we could do something
about it in time for 4.5.0...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41920


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/41920] [C++0x] Invalid 'unused parameter' warning for parameters used in lambdas
  2009-11-03  5:17 [Bug c++/41920] New: Invalid 'unused parameter' warning for parameters used in lambdas bruck dot michael at googlemail dot com
                   ` (3 preceding siblings ...)
  2010-01-20 20:26 ` paolo dot carlini at oracle dot com
@ 2010-01-20 20:53 ` jason at gcc dot gnu dot org
  2010-01-20 21:30 ` jason at gcc dot gnu dot org
  2010-01-20 22:00 ` jason at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-01-20 20:53 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-11-06 09:35:27         |2010-01-20 20:53:01
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41920


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/41920] [C++0x] Invalid 'unused parameter' warning for parameters used in lambdas
  2009-11-03  5:17 [Bug c++/41920] New: Invalid 'unused parameter' warning for parameters used in lambdas bruck dot michael at googlemail dot com
                   ` (4 preceding siblings ...)
  2010-01-20 20:53 ` jason at gcc dot gnu dot org
@ 2010-01-20 21:30 ` jason at gcc dot gnu dot org
  2010-01-20 22:00 ` jason at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-01-20 21:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jason at gcc dot gnu dot org  2010-01-20 21:30 -------
Subject: Bug 41920

Author: jason
Date: Wed Jan 20 21:30:28 2010
New Revision: 156085

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156085
Log:
        PR c++/41920
        * semantics.c (build_lambda_object): Call mark_used on captured
        variables.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41920


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/41920] [C++0x] Invalid 'unused parameter' warning for parameters used in lambdas
  2009-11-03  5:17 [Bug c++/41920] New: Invalid 'unused parameter' warning for parameters used in lambdas bruck dot michael at googlemail dot com
                   ` (5 preceding siblings ...)
  2010-01-20 21:30 ` jason at gcc dot gnu dot org
@ 2010-01-20 22:00 ` jason at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-01-20 22:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jason at gcc dot gnu dot org  2010-01-20 22:00 -------
Fixed.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41920


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-01-20 22:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-03  5:17 [Bug c++/41920] New: Invalid 'unused parameter' warning for parameters used in lambdas bruck dot michael at googlemail dot com
2009-11-06  9:35 ` [Bug c++/41920] " pinskia at gcc dot gnu dot org
2009-11-16 16:17 ` pinskia at gcc dot gnu dot org
2010-01-20 20:23 ` [Bug c++/41920] [C++0x] " paolo dot carlini at oracle dot com
2010-01-20 20:26 ` paolo dot carlini at oracle dot com
2010-01-20 20:53 ` jason at gcc dot gnu dot org
2010-01-20 21:30 ` jason at gcc dot gnu dot org
2010-01-20 22:00 ` jason at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).