This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53059] sizeof(std::list)=12 was 8 in previous releases


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

--- Comment #1 from ratnikov.ev at ya dot ru 2012-04-21 12:23:36 UTC ---
g++ -v       
Reading specs from /usr/lib/gcc/i486-slackware-linux/4.7.0/specs
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i486-slackware-linux/4.7.0/lto-wrapper
Target: i486-slackware-linux
Configured with: ../gcc-4.7.0/configure --prefix=/usr --libdir=/usr/lib
--mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap
--enable-languages=ada,c,c++,fortran,go,java,lto,objc --enable-threads=posix
--enable-checking=release --enable-objc-gc --with-system-zlib
--with-python-dir=/lib/python2.6/site-packages --disable-libunwind-exceptions
--enable-__cxa_atexit --enable-libssp --enable-lto --with-gnu-ld --verbose
--enable-java-home --with-java-home=/usr/lib/jvm/jre
--with-jvm-root-dir=/usr/lib/jvm --with-jvm-jar-dir=/usr/lib/jvm/jvm-exports
--with-arch-directory=i386
--with-antlr-jar=/root/slackware-current/source/d/gcc/antlr-runtime-3.4.jar
--enable-java-awt=gtk --disable-gtktest --with-arch=i486
--target=i486-slackware-linux --build=i486-slackware-linux
--host=i486-slackware-linux
Thread model: posix
gcc version 4.7.0 (GCC) 

cat sz.cc
#include <list>
#include <iostream>
int main(int ac, char* av[])
{
    constexpr size_t list_sz(sizeof(std::list<int>));
    static_assert(list_sz == 8, "size of list changed");
    return 0;
}

g++ -std=c++0x -save-temps sz.cc -o sz
sz.cc: In function âint main(int, char**)â:
sz.cc:7:5: error: static assertion failed: size of list changed

no *.i files were generated


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]