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

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

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.

 

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Here is a screenshot:

Attachments: 

AttachmentSize
Downloadimage/jpeg badtypecast.jpg32.47 KB

>>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.

>>...I will upload a VS project that reproduces the problem for investigation...

Uploaded and thanks in advance for looking into it.

Attachments: 

AttachmentSize
Downloadapplication/zip badtypecast.zip3.8 KB

Quote:

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.  

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

Jennifer

>>...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.

>>...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.

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

>>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.

Leave a Comment

Please sign in to add a comment. Not a member? Join today