Re: iostream exceptions uncaught with CYGWIN GCC/7.3.0

2018-11-02 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> Cygwin GCC is configured and built with the old C++ ABI, I'm guess that's the > problem? The problem is that it does not work correctly because G++ and its run-time are not consistent. GCC doc says version 7.x uses new ABI by default, so I'd guess that's the C++ stdlib which was built with t

Re: iostream exceptions uncaught with CYGWIN GCC/7.3.0

2018-11-02 Thread JonY
On 11/01/2018 08:42 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: > Hi, > > Please consider the following code: > > $ cat bug.cpp > #include > > using namespace std; > > void fun() > { > string dummy; > cin >> dummy; > } > > > int main() > { > cout << "FAIL = 0x" <<

iostream exceptions uncaught with CYGWIN GCC/7.3.0

2018-11-01 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
Hi, Please consider the following code: $ cat bug.cpp #include using namespace std; void fun() { string dummy; cin >> dummy; } int main() { cout << "FAIL = 0x" << hex << ios::failbit << endl; cout << "EOF = 0x" << hex << ios::eofbit << endl; cout << "BAD = 0x" << hex