[xpressive][proto] Generates VS2010 C4714 in 1.49 but not in 1.48

The following code produces a C4714 warning in Visual Studio 2010 with
Boost 1.49 but not 1.48:
------------------------------------------------------------------------
----------------------------------------
#include "stdafx.h"
#include

On 4/24/2012 2:48 PM, Lawry, Brian wrote:
The following code produces a C4714 warning in Visual Studio 2010 with Boost 1.49 but not 1.48: <snip>
The __forceinline was added in 1.49 at the request of some users, and it has a measurable performance impact, so I'm inclined to keep it.
I would be OK with suppressing the warning, but I haven't been able to do so. Putting "#pragma warning(disable : 4714)" in my source file and in boost/xpressive/detail/core/ sub_match_vector.hpp and in boost/proto/transform/call.hpp does not suppress the warning. Using the "disable specific warnings" compiler switch /wd4714 also does not work.
That's super-annoying. Have you filed a compiler bug? The MSVC team isn't very responsive about fixing their bugs, but it has been known to happen from time to time. As a work-around, you can try compiling with /DBOOST_FORCEINLINE=inline. The warning should go away, but your code might run marginally slower. HTH, -- Eric Niebler BoostPro Computing http://www.boostpro.com

On 4/24/2012 11:33 PM, Eric Niebler wrote: => On 4/24/2012 2:48 PM, Lawry, Brian wrote:
I would be OK with suppressing the warning, but I haven't been able to do so. Putting "#pragma warning(disable : 4714)" in my source file and in boost/xpressive/detail/core/ sub_match_vector.hpp and in boost/proto/transform/call.hpp does not suppress the warning. Using the "disable specific warnings" compiler switch /wd4714 also does not work.
I checked this and found that the warning can in fact be suppressed. I went through proto's source files and suppressed it everywhere __forceinline is used. Your sample code now compiles cleanly with /W4 with boost trunk. Thanks for the report. -- Eric Niebler BoostPro Computing http://www.boostpro.com
participants (2)
-
Eric Niebler
-
Lawry, Brian