Re: [Boost-users] [Boost.Multi-Index] ICE w/ VC7.1

Hello Joaquin & John,
So I gave up at that point. Adding your example programs to the same VC7.1 IDE project did compile so I don't think it's a setup issue.
That's fine, your help has been invaluable. It definitely looks like a local problem, I hope Marc can provide me with more info wrt his particular environment. Thank you very much,
Thanks for your help John.
Before trying to recompile some codes from B.MI/test to crash my
compiler w/ an ICE, I've just played with some compilation options in my
IDE and the results are:
In Debug mode:
If the C/C++ options "/Zi" & "/Gm" are set: KO -> w/ ICE in
apply_wrap.hpp
If the C/C++ options "/ZI" & "/Gm" are set: KO -> w/ ICE in
apply_wrap.hpp
If the C/C++ option "/Gm" is not set and "Zi" or "ZI" is set: OK
In Release mode:
with or without the "/Gm" option set: OK
Funny... It seems that the /Gm option is quite unstable in debug mode? I
don't know exactly the goal of this option but our project template set
this option by default in this mode.
Joaquin or John, do you know the meaning of this compilation option for
VC7.1? Do you know the recommended options w/ this compiler to use Boost
libraries, more specifically B.MI? For information, up to now, we use
"/ZI" or "/Zi" in conjunction with "/Gm" option with all other Boost
libraries.
Thanks for your help.
The code snipped during my compilation test is the following:
#include
key_cls ; typedef const_mem_fun< Item , const std::string& , &Item::getId key_id ; typedef composite_key
- ckey_clsid ; typedef multi_index_container< Item, indexed_by< ordered_non_unique
, ordered_non_unique , ordered_unique > ObjectContainer ;
ObjectContainer c ; }

Marc Viala wrote:
Before trying to recompile some codes from B.MI/test to crash my compiler w/ an ICE, I've just played with some compilation options in my IDE and the results are:
In Debug mode: If the C/C++ options "/Zi" & "/Gm" are set: KO -> w/ ICE in apply_wrap.hpp If the C/C++ options "/ZI" & "/Gm" are set: KO -> w/ ICE in apply_wrap.hpp If the C/C++ option "/Gm" is not set and "Zi" or "ZI" is set: OK
In Release mode: with or without the "/Gm" option set: OK
Funny... It seems that the /Gm option is quite unstable in debug mode? I don't know exactly the goal of this option but our project template set this option by default in this mode.
Joaquin or John, do you know the meaning of this compilation option for VC7.1? Do you know the recommended options w/ this compiler to use Boost libraries, more specifically B.MI? For information, up to now, we use "/ZI" or "/Zi" in conjunction with "/Gm" option with all other Boost libraries.
With apologies I think I misread your original post: I took your post to mean you were seeing a runtime crash, but you mean an internal compiler error: and I did see that at one point when testing your original code. I use the same project options as you BTW /Zi and /Gm: the /Zi enables build and continue, /Gm enables a minimal rebuild (compile only the changes to a source). Generally they work quite well, but if you see an internal compiler error the trick is just to do a clean, then rebuild, and that usually clears the problem. Of course cleaning and rebuilding a large project can wipe out the advantages that /Zi /Gm normally bring :-( Strangely I was unable to reproduce the internal error this morning no matter options I used: it seems to be very dependent on whatever VC has in it's cache. HTH, John.
participants (2)
-
John Maddock
-
Marc Viala