https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108305

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
My assumption was that targets that don't support exclusive mode for fopen
would fail in exactly that way, and so using std::ios::noreplace would be
"conservatively unsupported". That is, it would always fail to open the file,
even if it doesn't exist. That seems acceptable.

But this test FAIL suggests that the flag is just silently ignored, allowing
non-exclusive access to the file. That is not acceptable, since the flag
*appears* to work, but fails to establish the required invariant.

Maybe we need #ifndef __hpux__ around the declaration and all uses of
std::ios::noreplace.

Reply via email to