C++ Logo


Advanced search

[wg14/wg21 liaison] Draft paper proposing new wording for C's fopen('x') and fopen('a')

From: Niall Douglas <s_sourceforge_at_[hidden]>
Date: Tue, 05 Oct 2021 13:56:03 +0000
WG21 LEWG, WG14,

CC: Aaron, if he could get me a WG14 paper number that would be great.

Please find attached a draft paper proposing improved normative wording
for C2x's fopen('x') and fopen('a'), which is relevant to the C++ 23 IS
as iostreams would replicate C2x's semantics here. The main change is to
require atomicity, and to remove exclusivity allowing implementations to
silently destroy and corrupt data.

All implementations reviewed implement the proposed wording already if
they implement it at all, except atomic fopen('a') in Microsoft's UCRT
which does not for no good reason I can ascertain. I'd normally bug
Billy about this, but he's moved to vcpkg, so if a Microsoft CRT
maintainer could give feedback on the viability of fixing their
fopen('a') implementation as per the instructions in the paper that
would be great.

Comments and suggestions for the draft are welcome. Note that WG14 needs
the final paper in the next week, so don't wait if you have something to


Received on 2021-10-05 08:56:12