[Boost-bugs] [ boost-Bugs-1567815 ] Excessive warnings on MSVC

Bugs item #1567815, was opened at 2006-09-29 11:21 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1567815&group_id=7586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: function Group: None Status: Open Resolution: None Priority: 5 Submitted By: Douglas Gregor (dgregor) Assigned to: Douglas Gregor (dgregor) Summary: Excessive warnings on MSVC Initial Comment: I'm getting a large number of C4127, "conditional expression is constant", warnings from function_template.hpp:141. Can we do something about these? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1567815&group_id=7586 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Boost-bugs mailing list Boost-bugs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/boost-bugs

| -----Original Message----- | From: boost-bounces@lists.boost.org | [mailto:boost-bounces@lists.boost.org] On Behalf Of SourceForge.net | Sent: 29 September 2006 16:22 | To: noreply@sourceforge.net | Subject: [boost] [Boost-bugs] [ boost-Bugs-1567815 ] | Excessive warnings onMSVC | | Bugs item #1567815, was opened at 2006-09-29 11:21 | Message generated for change (Tracker Item Submitted) made | by Item Submitter | You can respond by visiting: | https://sourceforge.net/tracker/?func=detail&atid=107586&aid= | 1567815&group_id=7586 | | Please note that this message will contain a full copy of | the comment thread, | including the initial issue submission, for this request, | not just the latest update. | Category: function | Group: None | Status: Open | Resolution: None | Priority: 5 | Submitted By: Douglas Gregor (dgregor) | Assigned to: Douglas Gregor (dgregor) | Summary: Excessive warnings on MSVC | | Initial Comment: | I'm getting a large number of C4127, "conditional expression | is constant", | warnings from function_template.hpp:141. Can we do something about | these? We can and should - and I am setting a good example adding them to John Maddock's <plug> upcoming for preview "Math functions and Statistical Distributions". <\plug> So they should all compile cleanly with the 'strictest' compiler options. At very least, putting near the start but AFTER other #include <boost/....> #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4127) // conditional expression is constant. ... and, if appropriate, others like # pragma warning(disable: 4189) // local variable is initialized but not referenced. #endif and at the end #ifdef BOOST_MSVC # pragma warning(pop) #endif #endif //BOOST_???_HPP But I note that using the normally recommended #ifdef BOOST_MSVC can fail to have the desired effect unless it is preceeded by an (probably implicit) include of Boost config that will set the macro from _MSC_VER. This is not normally a problem with Boost headers. Paul --- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow@hetp.u-net.com
participants (2)
-
Paul A Bristow
-
SourceForge.net