llvm-project
llvm-project copied to clipboard
sync() not setting rdstate on certain errors
| Bugzilla Link | 52157 |
| Version | 11.0 |
| OS | All |
| CC | @mclow |
Extended Description
The code in istream that implements sync contains:
if (this->rdbuf()->pubsync() == -1)
{
__state |= ios_base::badbit;
return -1;
}
I believe this is wrong. There needs to be a call to:
this->setstate(__state);
before the return. Older versions got this right.
Not a bad problem, but I thought I'd report it.
Thank you,
Ed Vogel