libstdc++: Fix undefined FILE* operations in test
We only need to check that the constructor doesn't clear errno, so there's no need to use an invalid FILE* for that. libstdc++-v3/ChangeLog: PR libstdc++/98001 * testsuite/ext/stdio_filebuf/char/79820.cc: Do not pass invalid FILE* to constructor.
This commit is contained in:
parent
127aa17e16
commit
2762cb1df6
1 changed files with 2 additions and 1 deletions
|
@ -26,10 +26,11 @@ void
|
|||
test01()
|
||||
{
|
||||
FILE* f = std::fopen("79820.txt", "w");
|
||||
std::fclose(f);
|
||||
errno = 127;
|
||||
__gnu_cxx::stdio_filebuf<char> b(f, std::ios::out, BUFSIZ);
|
||||
VERIFY(errno == 127); // PR libstdc++/79820
|
||||
b.close();
|
||||
std::fclose(f);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Add table
Reference in a new issue