[libcxx-commits] [libcxx] [AIX][libc++] fopen() does not support the 'x' (exclusive/noreplace) mode suffix. (PR #206498)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jul 12 23:29:39 PDT 2026


Himadhith wrote:

> General comment: isn't better to insert target specific check inside the fopen function definition rather than function declarations?

IIUC, the `_LIBCPP_DIAGNOSE_WARNING` uses `__attribute__((__diagnose_if__(...)))` which is a declaration attribute — it must be on the declaration so the compiler can evaluate the condition against the caller's arguments at the call site, before the call happens.


https://github.com/llvm/llvm-project/pull/206498


More information about the libcxx-commits mailing list