Error while compiling TBB with MSVC with _CRTDBG_MAP_ALLOC

Error while compiling TBB with MSVC with _CRTDBG_MAP_ALLOC

Maxim Popov's picture

1>H:\\Third_party_src\\Intel\\tbb30\\include\\tbb/enumerable_thread_specific.h(109) : error C2059: syntax error : 'constant'
1> H:\\Third_party_src\\Intel\\tbb30\\include\\tbb/enumerable_thread_specific.h(147) : see reference to class template instantiation 'tbb::interface6::internal::ets_base' being compiled
1>H:\\Third_party_src\\Intel\\tbb30\\include\\tbb/enumerable_thread_specific.h(109) : error C2059: syntax error : 'constant'
1> H:\\Third_party_src\\Intel\\tbb30\\include\\tbb/enumerable_thread_specific.h(229) : see reference to class template instantiation 'tbb::interface6::internal::ets_base' being compiled
1> with
1> [
1> ETS_key_type=ets_no_key
1> ]

the problem is: crtdbg.h with _CRTDBG_MAP_ALLOCdefined do:

#define free(p) _free_dbg(p, _NORMAL_BLOCK)

This define corrupts function free() inside oftbb::interface6::internal::ets_base<>

Is it possible to fix? (may be in future release)

Best Regards,

Maxim

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Alexey Kukanov (Intel)'s picture

It seems possible - I think we can use push_macro/pop_macro pragmas that fortunately are supported by MSVC, GCC, and Intel's compiler.

Login to leave a comment.