Subject: Re: [boost] [msvc] #warning preprocessor directive
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2017-10-17 16:52:03
On 10/17/17 19:31, Peter Dimov via Boost wrote:
> Andrey Semashev wrote:
>> The fact that a particular compiler does not produce enough
>> information in its output is not the reason to ask for a new
>> preprocessor directive...
> "Let's add #warning to MSVC"
> "Why? Use #pragma message"
> "#pragma message is not as good on MSVC because..."
> "It's fine for me on non-MSVC"
"...and #pragmas are the intended way to extend preprocessor"
So, yes, I stand by my opinion. Use "#pragma message", improve MSVC. Or
standardize "#warning" both in C and C++ and _then_ ask compiler vendors
to support the standard feature. Do *not* ask to support non-standard
"#warning" in MSVC and then sprinkle #ifdefs around the code to support
this new directive on some compilers and "#pragma message" on others.
>> Â ... noone else supports.
> Hello? #warning is a GCC directive.
Hm, I didn't know it was supported by gcc.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk