public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52725] New: error: capture of non-variable (in regards to a variable)
@ 2012-03-26 15:31 lahart.joseph at gmail dot com
  2012-03-26 15:46 ` [Bug c++/52725] " redi at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: lahart.joseph at gmail dot com @ 2012-03-26 15:31 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52725
           Summary: error: capture of non-variable (in regards to a
                    variable)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: lahart.joseph@gmail.com


Created attachment 26999
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26999
the preprocessed file

~/gcc-test$ g++-4.7.0 -o test -v -save-temps ItemIncGroup.cpp 
Using built-in specs.
COLLECT_GCC=g++-4.7.0
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --program-suffix=-4.7.0
Thread model: posix
gcc version 4.7.0 (GCC) 
COLLECT_GCC_OPTIONS='-o' 'test' '-v' '-save-temps' '-shared-libgcc'
'-mtune=generic' '-march=pentiumpro'
 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/cc1plus -E -quiet -v
-D_GNU_SOURCE ItemIncGroup.cpp -mtune=generic -march=pentiumpro
-fpch-preprocess -o ItemIncGroup.ii
ignoring nonexistent directory
"/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0

/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/i686-pc-linux-gnu

/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward
 /usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/include
 /usr/local/include
 /usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-o' 'test' '-v' '-save-temps' '-shared-libgcc'
'-mtune=generic' '-march=pentiumpro'
 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/cc1plus -fpreprocessed
ItemIncGroup.ii -quiet -dumpbase ItemIncGroup.cpp -mtune=generic
-march=pentiumpro -auxbase ItemIncGroup -version -o ItemIncGroup.s
GNU C++ (GCC) version 4.7.0 (i686-pc-linux-gnu)
    compiled by GNU C version 4.7.0, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.7.0 (i686-pc-linux-gnu)
    compiled by GNU C version 4.7.0, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c256e2cdb5a4ae96bd7afc48ca236d31
ItemIncGroup.cpp: In member function ‘bool
CItemIncGroup::SetIncrementalCountMax()’:
ItemIncGroup.cpp:7:38: error: capture of non-variable
‘CItemIncGroup::m_TotalIncrementalCount’ 
In file included from ItemIncGroup.cpp:3:0:
ItemIncGroup.h:17:18: note: ‘long int CItemIncGroup::m_TotalIncrementalCount’
declared here

Notes: Changing the type of m_pItemIncGroup from CItemInc to int will allow the
code to compile. This code compiled with gcc 4.6.1.


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

end of thread, other threads:[~2012-06-01 21:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-26 15:31 [Bug c++/52725] New: error: capture of non-variable (in regards to a variable) lahart.joseph at gmail dot com
2012-03-26 15:46 ` [Bug c++/52725] " redi at gcc dot gnu.org
2012-05-25 11:10 ` steffen_moeller at gmx dot de
2012-05-25 11:30 ` [Bug c++/52725] error: "capture of non-variable" for new-expression incorrectly parsed as lambda-expression redi at gcc dot gnu.org
2012-05-29 10:34 ` steffen_moeller at gmx dot de
2012-05-29 11:34 ` steffen_moeller at gmx dot de
2012-05-29 11:56 ` [Bug c++/52725] [4.7/4.8 Regression] " redi at gcc dot gnu.org
2012-05-29 12:03 ` redi at gcc dot gnu.org
2012-05-29 14:33 ` rguenth at gcc dot gnu.org
2012-06-01 17:03 ` jason at gcc dot gnu.org
2012-06-01 21:19 ` jason at gcc dot gnu.org
2012-06-01 21:20 ` jason at gcc dot gnu.org
2012-06-01 21:20 ` jason at gcc dot gnu.org
2012-06-01 21:21 ` jason at gcc dot gnu.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).