Boost logo

Boost Users :

From: John Femiani (JOHN.FEMIANI_at_[hidden])
Date: 2008-04-01 13:29:47


I am trying to compile my code on VC8 at warning level (Level 4).

There are several places in boost that produce warnings at this level,
but the warnings have obvious simple fixes.

(I can send a patch to this list when I have removed enough of them from
my working copy in case the library authors care to address them).

 

Along these lines I have a question/comment about GIL. The library uses
a GIL_FORCEINLINE macro, presumably to increase performance of some
functions. When I compile I get a slew of warning messages with warning
"C4714 : function 'function-name' marked as __forceinline not inlined.".
I am compiling whith /O2 option (Optimize for speed) and the /Ob2 flag
(inline any suitable funciton).

 

My question is: is this a problem for GIL? Obviously the authors have
been trying hard to get that function call overhead removed and
apparantly vc8 does not play nice with them. I don't know how to address
this warning other than to temporarily disable warning 4714, but this is
a case where the warning looks like it may be important.

 

The warning indicates that the compiler is unable to inline the
functions at these locations:

c:\john\hvm\src\boost\boost\gil\algorithm.hpp(251) :
copy_with_2d_iterators

c:\john\hvm\src\boost\boost\gil\algorithm.hpp(587) :
default_construct_range

 

In my case the functions point me to locations in the STL:

C:\Program Files\Microsoft Visual Studio 8\VC\include\functional(54)

 

Unfortunately I can not list my code that exhibits the problem here
(these warnings come from a large unreleasable project compiled with W3
in the past, and the messages don't help me find which specific parts of
my code are instantiating the gil code). I am hoping that the authors
will immediately understand the issue (since they used GIL_FORCEINLINE
to begin with).

 

 

Cheers,

--John C. Femiani



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net