[libcxx-commits] [libcxx] AIX fopen() does not support the 'x' (exclusive/noreplace) mode suffix. (PR #206498)
Jake Egan via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 3 09:45:01 PDT 2026
================
@@ -75,15 +73,24 @@ int main(int, char**)
{
std::filebuf f;
f.open(tmp.c_str(), mode);
- assert(!f.is_open()); // since it already exists
+ // On AIX, fopen() does not support the 'x' (exclusive) mode suffix so open()
+ // returns nullptr for all noreplace modes. On other platforms, the file already
+ // exists so noreplace causes open() to fail.
+ assert(!f.is_open());
----------------
jakeegan wrote:
I don't think this comment is necessary.
https://github.com/llvm/llvm-project/pull/206498
More information about the libcxx-commits
mailing list