C++ Logo

std-proposals

Advanced search

Re: C++ Standard and macro argument substitution

From: mircan <mircan_at_[hidden]>
Date: Tue, 20 Oct 2020 23:14:27 +0200
Thank you, this is apparently the answer to my question.

Marcin

On 20.10.2020 23:06, Arthur O'Dwyer via Std-Proposals wrote:
> On Tue, Oct 20, 2020 at 2:27 PM mircan via Std-Proposals
> <std-proposals_at_[hidden]
> <mailto:std-proposals_at_[hidden]>> wrote:
>
> I have recently came across an interesting problem that might be
> related to a subject for improvement
>
> IIUC, your discovery relates to
> http://eel.is/c++draft/cpp.replace.general#13.sentence-3
> > If there are sequences of preprocessing tokens within the list of
> arguments that would otherwise act as preprocessing directives, the
> behavior is undefined.
>
> This wording has been challenged by at least these papers:
> http://open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3801.pdf (make it
> ill-formed instead of undefined)
> http://www.open-std.org/JTC1/SC22/wg21/docs/papers/2014/n3882.pdf (make
> execution of the directive "conditionally supported")
> but as of C++20, it's still UB.
>
> –Arthur
>

Received on 2020-10-20 16:14:38