public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65257] New: cin not working with empty string when _GLIBCXX_DEBUG is defined on Windows
@ 2015-03-01 0:56 melnakeeb at hotmail dot com
2024-01-17 15:18 ` [Bug libstdc++/65257] " nightstrike at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: melnakeeb at hotmail dot com @ 2015-03-01 0:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65257
Bug ID: 65257
Summary: cin not working with empty string when _GLIBCXX_DEBUG
is defined on Windows
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: melnakeeb at hotmail dot com
Using latest Cygwin32 ,Cygwin64 and MinGW32 with GCC 4.9.2 , 4.9.2 and 4.8.1
respectively on Windows 7 64-bit. I am testing also on 32-bit Linux using GCC
4.8.2.
So on all systems this works
#include <bits/stdc++.h>
using namespace std;
string s,t;
int main(){
cin>>s>>t;
cout<<s;
}
and this works
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
string s="a",t="b";
int main(){
cin>>s>>t;
cout<<s;
}
but the next one crashes on Windows after inputting the first string on the 3
configurations mentioned above, but works correctly on Linux:
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
string s,t;
int main(){
cin>>s>>t;
cout<<s;
}
Clearly the only difference is that the string is empty before inputting, and
_GLIBCXX_DEBUG is enabled.
Previous discussions:
http://stackoverflow.com/questions/28708802/cin-not-working-with-empty-string-when-glibcxx-debug-on-windows
, http://sourceforge.net/p/mingw/bugs/1666/
and http://codeforces.com/blog/entry/15547#comment-215143
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/65257] cin not working with empty string when _GLIBCXX_DEBUG is defined on Windows
2015-03-01 0:56 [Bug c++/65257] New: cin not working with empty string when _GLIBCXX_DEBUG is defined on Windows melnakeeb at hotmail dot com
@ 2024-01-17 15:18 ` nightstrike at gmail dot com
2024-01-17 15:25 ` nightstrike at gmail dot com
2024-01-17 15:51 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: nightstrike at gmail dot com @ 2024-01-17 15:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65257
nightstrike <nightstrike at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nightstrike at gmail dot com
--- Comment #1 from nightstrike <nightstrike at gmail dot com> ---
(In reply to Muhammad Annaqeeb from comment #0)
> #define _GLIBCXX_DEBUG
> #include <bits/stdc++.h>
> using namespace std;
> string s,t;
> int main(){
> cin>>s>>t;
> cout<<s;
> }
FWIW, this works on Wine as well as Cygwin + Win 7, compiled with g++ 14,
configured *without* --enable-fully-dynamic-string.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/65257] cin not working with empty string when _GLIBCXX_DEBUG is defined on Windows
2015-03-01 0:56 [Bug c++/65257] New: cin not working with empty string when _GLIBCXX_DEBUG is defined on Windows melnakeeb at hotmail dot com
2024-01-17 15:18 ` [Bug libstdc++/65257] " nightstrike at gmail dot com
@ 2024-01-17 15:25 ` nightstrike at gmail dot com
2024-01-17 15:51 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: nightstrike at gmail dot com @ 2024-01-17 15:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65257
--- Comment #2 from nightstrike <nightstrike at gmail dot com> ---
I should clarify that I tested this with mingw-w64, not mingw.org where the bug
was originally reported.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/65257] cin not working with empty string when _GLIBCXX_DEBUG is defined on Windows
2015-03-01 0:56 [Bug c++/65257] New: cin not working with empty string when _GLIBCXX_DEBUG is defined on Windows melnakeeb at hotmail dot com
2024-01-17 15:18 ` [Bug libstdc++/65257] " nightstrike at gmail dot com
2024-01-17 15:25 ` nightstrike at gmail dot com
@ 2024-01-17 15:51 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2024-01-17 15:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65257
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Ever confirmed|0 |1
Last reconfirmed| |2024-01-17
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Muhammad, is this still an issue for you?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-17 15:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-01 0:56 [Bug c++/65257] New: cin not working with empty string when _GLIBCXX_DEBUG is defined on Windows melnakeeb at hotmail dot com
2024-01-17 15:18 ` [Bug libstdc++/65257] " nightstrike at gmail dot com
2024-01-17 15:25 ` nightstrike at gmail dot com
2024-01-17 15:51 ` redi 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).