public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/54591] New: sscanf format no more working @ 2012-09-15 14:12 temp78593 at mutluit dot com 2012-09-15 16:46 ` [Bug c++/54591] " pinskia at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: temp78593 at mutluit dot com @ 2012-09-15 14:12 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54591 Bug #: 54591 Summary: sscanf format no more working Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: temp78593@mutluit.com sscanf no more working, it was ok in prev. versions: #include <cstdio> #include <cstdlib> int main() { const char* psz = " PROTO=TCP SPT=6004 DPT=26532 "; char szProto[256] = ""; unsigned short usSrcPort = 0, usDstPort = 0; const int c = sscanf(psz, " PROTO=%255[^ \t\n]s SPT=%hu DPT=%hu", szProto, &usSrcPort, &usDstPort); printf("%s\n", c == 3 ? "OK" : "ERROR"); //... return 0; } It fills only the first field --> c=1 --> ERROR This code was working fine in prev. compiler versions. # g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.1-2' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.7.1 (Debian 4.7.1-2) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/54591] sscanf format no more working 2012-09-15 14:12 [Bug c++/54591] New: sscanf format no more working temp78593 at mutluit dot com @ 2012-09-15 16:46 ` pinskia at gcc dot gnu.org 2012-09-15 18:58 ` [Bug libstdc++/54591] " temp78593 at mutluit dot com ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu.org @ 2012-09-15 16:46 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54591 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID Severity|critical |normal --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-15 16:45:56 UTC --- GCC is not involved here but rather the library glibc is what is different. Make sure you are doing something which is valid C/C++ before submitting it to glibc. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/54591] sscanf format no more working 2012-09-15 14:12 [Bug c++/54591] New: sscanf format no more working temp78593 at mutluit dot com 2012-09-15 16:46 ` [Bug c++/54591] " pinskia at gcc dot gnu.org @ 2012-09-15 18:58 ` temp78593 at mutluit dot com 2012-09-15 19:04 ` schwab@linux-m68k.org 2012-09-17 23:06 ` temp78593 at mutluit dot com 3 siblings, 0 replies; 5+ messages in thread From: temp78593 at mutluit dot com @ 2012-09-15 18:58 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54591 Uenal Mutlu <temp78593 at mutluit dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Component|c++ |libstdc++ Resolution|INVALID | Severity|normal |critical --- Comment #2 from Uenal Mutlu <temp78593 at mutluit dot com> 2012-09-15 18:58:25 UTC --- moving the bugreport to libstdc++. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/54591] sscanf format no more working 2012-09-15 14:12 [Bug c++/54591] New: sscanf format no more working temp78593 at mutluit dot com 2012-09-15 16:46 ` [Bug c++/54591] " pinskia at gcc dot gnu.org 2012-09-15 18:58 ` [Bug libstdc++/54591] " temp78593 at mutluit dot com @ 2012-09-15 19:04 ` schwab@linux-m68k.org 2012-09-17 23:06 ` temp78593 at mutluit dot com 3 siblings, 0 replies; 5+ messages in thread From: schwab@linux-m68k.org @ 2012-09-15 19:04 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54591 Andreas Schwab <schwab@linux-m68k.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> 2012-09-15 19:03:44 UTC --- libstdc++ is not glibc. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/54591] sscanf format no more working 2012-09-15 14:12 [Bug c++/54591] New: sscanf format no more working temp78593 at mutluit dot com ` (2 preceding siblings ...) 2012-09-15 19:04 ` schwab@linux-m68k.org @ 2012-09-17 23:06 ` temp78593 at mutluit dot com 3 siblings, 0 replies; 5+ messages in thread From: temp78593 at mutluit dot com @ 2012-09-17 23:06 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54591 Uenal Mutlu <temp78593 at mutluit dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |MOVED --- Comment #4 from Uenal Mutlu <temp78593 at mutluit dot com> 2012-09-17 23:06:02 UTC --- Ok, just for the record (for those having the same problem) I filed it at the following URL (glibc bugzilla), and there I also reported a fix: http://sourceware.org/bugzilla/show_bug.cgi?id=14586 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-17 23:06 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-09-15 14:12 [Bug c++/54591] New: sscanf format no more working temp78593 at mutluit dot com 2012-09-15 16:46 ` [Bug c++/54591] " pinskia at gcc dot gnu.org 2012-09-15 18:58 ` [Bug libstdc++/54591] " temp78593 at mutluit dot com 2012-09-15 19:04 ` schwab@linux-m68k.org 2012-09-17 23:06 ` temp78593 at mutluit dot com
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).