C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] How to handle conflicting 'unreachable' definitions

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Thu, 4 Apr 2024 17:07:37 +0100
On Thu, 4 Apr 2024, 16:59 Jonathan Wakely, <cxx_at_[hidden]> wrote:

>
>
> On Thu, 4 Apr 2024, 16:39 Aaron Ballman via Liaison, <
> liaison_at_[hidden]> wrote:
>
>>
>> Also, I can't square how that fits with "The intended use of these
>> headers is for interoperability only. It is possible that C++ source
>> files need to include one of these headers in order to be valid ISO C.
>> Source files that are not intended to also be valid ISO C should not
>> use any of the C headers."
>>
>> If it's for interoperability with valid ISO C... C23 is valid ISO C
>> whether WG21 has rebased or not.
>>
>
> But a common header that you expect to be used by both C and C++ code
> should generally stick to the common subset of the two languages. So don't
> use stdbit.h or assume unreachable is a macro.
>

I'm other words, "interoperability with ISO C" doesn't mean everything
that's valid in the current C standard must also work in C++. That would be
a very bizarre interpretation.

The current wording for the C headers is an attempt to improve what was
there before, which said "these are deprecated, don't use them". It now
says "these are here for interop with C, your don't need them otherwise".
That's all it's trying to say. Please don't read between the lines to
interpret it as "all valid C is valid C++". That's just silly. That's not
the intention. If the intention is unclear, we can clarify it, but don't
just assume silly intent.

Received on 2024-04-04 16:08:56