C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] [isocpp-ext] P2437R0 #warning (avoiding a diverging preprocessor)

From: Peter Dimov <pdimov_at_[hidden]>
Date: Tue, 12 Oct 2021 19:47:50 +0300
Casey Carter wrote:
> I've never touched the preprocessor, but I can't imagine it would be
> challenging to duplicate the implementation of #error and tweak it to emit a
> warning instead of an error. I see no particular reason why MSVC would
> oppose #warning. I suspect the reason we don't support it now is that
> #pragma message is superior since it accepts a string literal message instead of
> a sequence of preprocessing tokens.

And maybe because #pragma message was standard, whereas #warning was
not.

Received on 2021-10-12 11:48:18