[libcxx-commits] [libcxx] [AIX][libc++] fopen() does not support the 'x' (exclusive/noreplace) mode suffix. (PR #206498)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 10 01:12:16 PDT 2026
================
@@ -1206,9 +1220,19 @@ public:
}
# endif
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI bool is_open() const;
- void open(const char* __s, ios_base::openmode __mode = ios_base::in);
+ void open(const char* __s, ios_base::openmode __mode = ios_base::in)
+# if defined(_AIX)
+ _LIBCPP_DIAGNOSE_WARNING(__mode& ios_base::noreplace,
+ "fstream::open() with noreplace is not supported on AIX; open() will return failure")
+# endif
+ ;
# if _LIBCPP_HAS_OPEN_WITH_WCHAR
- void open(const wchar_t* __s, ios_base::openmode __mode = ios_base::in);
+ void open(const wchar_t* __s, ios_base::openmode __mode = ios_base::in)
+# if defined(_AIX)
+ _LIBCPP_DIAGNOSE_WARNING(__mode& ios_base::noreplace,
+ "fstream::open() with noreplace is not supported on AIX; open() will return failure")
+# endif
----------------
philnik777 wrote:
This change is probably garbage and definitely untested.
https://github.com/llvm/llvm-project/pull/206498
More information about the libcxx-commits
mailing list