From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19312 invoked by alias); 21 Jun 2014 12:02:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19261 invoked by uid 48); 21 Jun 2014 12:02:24 -0000 From: "zosrothko at orange dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61580] New: stoi function unknown on W7/Cygwin/x86_64 Date: Sat, 21 Jun 2014 12:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zosrothko at orange dot fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg01727.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61580 Bug ID: 61580 Summary: stoi function unknown on W7/Cygwin/x86_64 Product: gcc Version: 4.8.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zosrothko at orange dot fr Hello The following program $ cat stoi.cpp #include int main() { std::string s = "123"; int i = std::stoi(s); } does not compile on a W7/Cygwin/x86_64 platform. here the log $ g++ -v stoi.cpp Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/lto-wrapper.exe Target: x86_64-pc-cygwin Configured with: /cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.3-2/src/gcc-4.8.3/configure --srcdir=/cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.3-2/src/gcc-4.8.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --libexecdir=/usr/lib Thread model: posix gcc version 4.8.3 (GCC) COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/cc1plus.exe -quiet -v -Dunix -idirafter /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../lib/../include/w32api -idirafter ../../include/w32api stoi.cpp -quiet -dumpbase stoi.cpp -mtune=generic -march=x86-64 -auxbase stoi -version -o /tmp/ccZYgiXq.s GNU C++ (GCC) version 4.8.3 (x86_64-pc-cygwin) compiled by GNU C version 4.8.3, GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/include" ignoring nonexistent directory "../../include/w32api" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include/c++ /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include/c++/x86_64-pc-cygwin /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include/c++/backward /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include /usr/local/include /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include-fixed /usr/include /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../lib/../include/w32api End of search list. GNU C++ (GCC) version 4.8.3 (x86_64-pc-cygwin) compiled by GNU C version 4.8.3, GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 636b2526cba54f47bd98b825d7c95d49 stoi.cpp: In function 'int main()': stoi.cpp:6:12: error: 'stoi' is not a member of 'std' int i = std::stoi(s); ^ IMHO? the problem should come from the basic_string.h include where the definition of stoi is guarded by #if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) and _GLIBCXX_USE_C99 is not defined FrancisANDRE@idefix /lib/gcc/x86_64-pc-cygwin/4.8.3/include/c++/bits $ g++ -xc++ -std=gnu++11 -dM -E - < /dev/null | sort | grep _GLIB FrancisANDRE@idefix /lib/gcc/x86_64-pc-cygwin/4.8.3/include/c++/bits $ g++ -xc++ -std=c++11 -dM -E - < /dev/null | sort | grep _GLIB Rgds