public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51188] New: invalid static_cast from type 'XBase' to type 'int'
@ 2011-11-17  9:26 mario-baumann at web dot de
  2011-11-17  9:29 ` [Bug c++/51188] " fabien at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: mario-baumann at web dot de @ 2011-11-17  9:26 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51188
           Summary: invalid static_cast from type 'XBase' to type 'int'
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mario-baumann@web.de


Created attachment 25844
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25844
c++ source

Hi all,

i found a strange "bug" while compiling the attached c++ file

> g++ -c x.cpp
x.cpp: In member function 'std::pair<int, int> X::getImp() const':
x.cpp:15:57: error: invalid static_cast from type 'XBase' to type 'int'

if I remove any of the superfluous statements in x.cpp it works fine!

mario.

------------------------------------------------------------------------------

> uname -a
Linux ahsoka.intec.dom 2.6.32-131.17.1.el6.x86_64 #1 SMP Thu Sep 29 10:24:25
EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

> rpm -qa "glibc*" | grep -e 'glibc-[0-9]' | sort -u
glibc-2.12-1.25.el6_1.3.i686
glibc-2.12-1.25.el6_1.3.x86_64

> g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/app2/gcc/4.7.0-20111117-svn181436/x86_64/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/app2/gcc/4.7.0-20111117-svn181436/x86_64
--enable-languages=c,c++,fortran --disable-nls
--with-gmp=/app2/gcc/4.7.0-20111117-svn181436/x86_64/aux
--with-mpfr=/app2/gcc/4.7.0-20111117-svn181436/x86_64/aux
--with-mpc=/app2/gcc/4.7.0-20111117-svn181436/x86_64/aux
--with-ppl=/app2/gcc/4.7.0-20111117-svn181436/x86_64/aux
--with-cloog=/app2/gcc/4.7.0-20111117-svn181436/x86_64/aux
Thread model: posix
gcc version 4.7.0 20111117 (experimental) (GCC) 

> ld -v
GNU ld (GNU Binutils) 2.22.51.20111117


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

end of thread, other threads:[~2011-11-18 20:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-17  9:26 [Bug c++/51188] New: invalid static_cast from type 'XBase' to type 'int' mario-baumann at web dot de
2011-11-17  9:29 ` [Bug c++/51188] " fabien at gcc dot gnu.org
2011-11-17 10:20 ` fabien at gcc dot gnu.org
2011-11-17 10:43 ` fabien at gcc dot gnu.org
2011-11-17 15:22 ` jason at gcc dot gnu.org
2011-11-17 20:04 ` jason at gcc dot gnu.org
2011-11-17 20:58 ` fabien at gcc dot gnu.org
2011-11-17 21:00 ` fabien at gcc dot gnu.org
2011-11-17 21:02 ` fabien at gcc dot gnu.org
2011-11-17 21:04 ` fabien at gcc dot gnu.org
2011-11-17 21:06 ` fabien at gcc dot gnu.org
2011-11-17 21:07 ` jason at gcc dot gnu.org
2011-11-17 21:09 ` fabien at gcc dot gnu.org
2011-11-17 21:59 ` fabien at gcc dot gnu.org
2011-11-18 21:03 ` fabien at gcc dot gnu.org
2011-11-18 21:12 ` fabien 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).