Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7683 Discussions

Expression can Not be evaluated if there is one space before or after template data type - CXX0019: Error: bad type cast

SergeyKostrov
Valued Contributor II
163 Views

Expression can Not be evaluated in Watch or Quick Watch Windows of a Visual Studio if there is at least one space before or after template data type. The following UI error is displayed:

CXX0019: Error: bad type cast

More technical details will be provided. Thanks.

 

0 Kudos
9 Replies
SergeyKostrov
Valued Contributor II
163 Views
Here is a screenshot: badtypecast.jpg
SergeyKostrov
Valued Contributor II
163 Views
>>The following UI error is displayed: >> >>CXX0019: Error: bad type cast >> >>More technical details will be provided. I will upload a VS project that reproduces the problem for investigation. I think the problem is related to some UI issue of VS however investigation is needed to confirm that it is Not related to Intel or Microsoft C++ compilers.
SergeyKostrov
Valued Contributor II
163 Views
>>...I will upload a VS project that reproduces the problem for investigation... Uploaded and thanks in advance for looking into it.
Casey
Beginner
163 Views

Sergey Kostrov wrote:

 I think the problem is related to some UI issue of VS however investigation is needed to confirm that it is Not related to Intel or Microsoft C++ compilers.

Have you tried reproducing this with a project that uses the MSVC compiler?  That would seem to be prudent when posting a bug that strongly looks like (and you acknowledge might be) an issue with VS.  

JenniferJ
Moderator
163 Views

which version of icl are you using? I tried your testcase, "ConTestApp", both "debug|win32" and "release|win32" build fine.

Jennifer

SergeyKostrov
Valued Contributor II
163 Views
>>...which version of icl are you using? Versions 12.x and 13.x. >>...I tried your testcase, "ConTestApp", both "debug|win32" and "release|win32" build fine. The problem is Not with Building (!). Please select "Debug | Win32" Configuration and then follow steps I described in Notes. You need to add at least one expression when Debugging in a Visual Studio in order to see that when there is a space(s) next to 'float' data type the expression can not be evaluated.
SergeyKostrov
Valued Contributor II
163 Views
>>...Have you tried reproducing this with a project that uses the MSVC compiler?.. Yes, I verified with Intel and Microsoft C++ compilers and the problem is reproducible with both. I agree that the problem could be related to some internal UI issue of a Visual Studio and I already mentioned it. I remember that some time ago there was a report about a problem related to incorrect generation of a pdb-file for Intel C++ compiler and I simply would like to know that the current one is Not related to the old one.
JenniferJ
Moderator
163 Views

I saw the issue now.

I don't think it's a compiler issue. It's more like an issue in the Visual C++'s Expression evaluator. Have you check with msdn forum?

Jennifer

SergeyKostrov
Valued Contributor II
163 Views
>>I saw the issue now. >> >>I don't think it's a compiler issue. It's more like an issue in the Visual C++'s Expression evaluator. This is what I suspect and I'll take a look at MSDN for more details. Thanks, Jennifer, for the verification.
Reply