Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

11.1.054 Debug compile fails on xstring & xdebug

hylton__ron
Beginner
608 Views
I just installed 11.1.054 and code that worked fine with earlier versions (latest 11.0.075) now compiles ok in Release mode but fails in Debug mode. The errors are in the standard header files, not my own code. I'm not overriding any allocators or other parameters, just using defaults. Here are some sample errors:

c:\Program Files\Microsoft Visual Studio 9.0\VC\include\xdebug(75): error: a class or namespace qualified name is required
typedef typename _DebugHeapAllocator<_Other> other;
^

c:\Program Files\Microsoft Visual Studio 9.0\VC\include\xstring(502): error: name followed by "::" must be a class or namespace name
typedef typename _Alloc::size_type size_type;
^
detected during instantiation of class "std::basic_string<_Elem, _Traits, _Ax> [with _Elem=char, _Traits=std::char_traits, _Ax=std::_DebugHeapAllocator]" at line 110 of "c:\Program Files\Microsoft Visual Studio 9.0\VC\include\xdebug"

c:\Program Files\Microsoft Visual Studio 9.0\VC\include\xstring(503): error: name followed by "::" must be a class or namespace name
typedef typename _Alloc::difference_type _Dift;
^
detected during instantiation of class "std::basic_string<_Elem, _Traits, _Ax> [with _Elem=char, _Traits=std::char_traits, _Ax=std::_DebugHeapAllocator]" at line 110 of "c:\Program Files\Microsoft Visual Studio 9.0\VC\include\xdebug"


Any ideas on what the problem is?

Thanks,
Ron
0 Kudos
2 Replies
Judith_W_Intel
Employee
608 Views
Quoting - rhylton
I just installed 11.1.054 and code that worked fine with earlier versions (latest 11.0.075) now compiles ok in Release mode but fails in Debug mode. The errors are in the standard header files, not my own code. I'm not overriding any allocators or other parameters, just using defaults. Here are some sample errors:

c:Program FilesMicrosoft Visual Studio 9.0VCincludexdebug(75): error: a class or namespace qualified name is required
typedef typename _DebugHeapAllocator<_Other> other;
^

c:Program FilesMicrosoft Visual Studio 9.0VCincludexstring(502): error: name followed by "::" must be a class or namespace name
typedef typename _Alloc::size_type size_type;
^
detected during instantiation of class "std::basic_string<_Elem, _Traits, _Ax> [with _Elem=char, _Traits=std::char_traits, _Ax=std::_DebugHeapAllocator]" at line 110 of "c:Program FilesMicrosoft Visual Studio 9.0VCincludexdebug"

c:Program FilesMicrosoft Visual Studio 9.0VCincludexstring(503): error: name followed by "::" must be a class or namespace name
typedef typename _Alloc::difference_type _Dift;
^
detected during instantiation of class "std::basic_string<_Elem, _Traits, _Ax> [with _Elem=char, _Traits=std::char_traits, _Ax=std::_DebugHeapAllocator]" at line 110 of "c:Program FilesMicrosoft Visual Studio 9.0VCincludexdebug"


Any ideas on what the problem is?

Thanks,
Ron

This could mean that you have some macro defined in a header that is included before that is changing the code inside the header. I would preprocess the file (i.e. use -E or -P) and then look at the preprocessed file to see what the line that the compiler is giving the error on looks like after preprocessing. There are some macros (like _DEBUG) that are only defined in Debug mode which could account for the difference. If you can't figure it out, please post the preprocessed file and we'll try to help you...

Judy
0 Kudos
hylton__ron
Beginner
608 Views

This could mean that you have some macro defined in a header that is included before that is changing the code inside the header. I would preprocess the file (i.e. use -E or -P) and then look at the preprocessed file to see what the line that the compiler is giving the error on looks like after preprocessing. There are some macros (like _DEBUG) that are only defined in Debug mode which could account for the difference. If you can't figure it out, please post the preprocessed file and we'll try to help you...

Judy

The problem seems to have been caused by using /Qms0. After removing this the problem disappeared. I'm against putting bugs into the compiler, but being able to use headers like is a necessity.
0 Kudos
Reply