________________________________________ From: Boost [boost-bounces@lists.boost.org] on behalf of Peter Dimov via Boost [boost@lists.boost.org] Sent: 03 December 2017 18:40 To: boost@lists.boost.org Cc: Peter Dimov Subject: Re: [boost] BOOST_PRAGMA_MESSAGE?
Fletcher, John P wrote:
Please note that the Clang compiler needs some attention here. For some reason Clang defines __GNUC__ as 4.2.1...
I know, the code relies on this, clang handles the __GNUC__ implementation fine.
My output is like this:
pragma.cpp:23:1: warning: something at line 23 [-W#pragma-messages] BOOST_PRAGMA_MESSAGE( "something" ) ^
That's what I get with the code as posted, too.
C:\Projects\testbed>clang++ testbed.cpp testbed.cpp:12:1: warning: something [-W#pragma-messages] BOOST_PRAGMA_MESSAGE( "something" ) ^
My aim was to reduce the number of extra lines of output. Mine has 2 extra lines against 3 for yours. The line starting <scratch space> seems to be a feature of the Clang implementation of _Pragma. I still think it is better to test for clang explicitly rather than to rely on it pretending to be something else. John _______________________________________________ Unsubscribe & other changes: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.boost.org%2Fmailman%2Flistinfo.cgi%2Fboost&data=02%7C01%7CJ.P.Fletcher%40aston.ac.uk%7C6560565f11fa41526c4308d53a7d9509%7Ca085950c4c2544d5945ab852fa44a221%7C0%7C0%7C636479233410516850&sdata=AeIXP9H4yMJbiYgmgrVdDQ4i%2FDQPv3HGA4dvyho7Rbg%3D&reserved=0