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

intel software update causing errors in visual studio

Maybank__Philip
Beginner
1,293 Views

I am using the Intel C++ compiler within Visual Studio (Community 2017).  After a recent update (Parallel Studio XE 2018 Update 2 for Windows) when I try to build my C++ code I get 100 errors.  The errors are all from xtgmath.h.

Here is an example of a group of errors relating to a single line,

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xtgmath.h(74): error : mismatched delimiters in default argument expression
1>  _GENERIC_MATH1(acos, _CRTDEFAULT)
1>  ^
1>
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xtgmath.h(74): error : expected a "," or ">"
1>  _GENERIC_MATH1(acos, _CRTDEFAULT)
1>  ^
1>
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xtgmath.h(74): error : argument list for alias template "std::enable_if_t" is missing
1>  _GENERIC_MATH1(acos, _CRTDEFAULT)
1>  ^
1>
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xtgmath.h(74): error : expected an expression
1>  _GENERIC_MATH1(acos, _CRTDEFAULT)
1>  ^
1>
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xtgmath.h(74): error : expected a "]"
1>  _GENERIC_MATH1(acos, _CRTDEFAULT)
1>  ^
1>
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xtgmath.h(74): error : expected a declaration
1>  _GENERIC_MATH1(acos, _CRTDEFAULT)
1>  ^
 
These error do not appear when I build my code from the command-line.  And they do not appear on a different machine where the update is not installed.
0 Kudos
7 Replies
neilson__jeff
Beginner
1,293 Views

I just installed a trial Intel® Parallel Studio XE on my Win 7 machine and am also seeing the same error with a very simple console program:

#include "stdafx.h"
#include <iostream>

int main()
{
    return 0;
}

If I comment out the include statement for <iostream> the program compiles without any errors. 

Here is compile line when <iostream> is included:

1>------ Build started: Project: ConsoleApplication1, Configuration: Release x64 ------
1>icl /Qm64 /Zi /W3 /O2 /Oi /Qipo -D __INTEL_COMPILER=1800 -D NDEBUG -D _CONSOLE -D _UNICODE -D UNICODE /EHsc /MD /GS /Gy /fp:precise /permissive- /Zc:wchar_t /Zc:forScope /Yustdafx.h /Fpx64\Release\ConsoleApplication1.pch /Fox64\Release\ /Fdx64\Release\vc141.pdb /TP ConsoleApplication1.cpp
1>
1>Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.2.185 Build 20180210
1>Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.
1>
1>ConsoleApplication1.cpp
1>icl: NOTE: The evaluation period for this product ends on 25-apr-2018 UTC.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xtgmath.h(74): error : mismatched delimiters in default argument expression
1>  _GENERIC_MATH1(acos, _CRTDEFAULT)
1>  ^
1>
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\xtgmath.h(74): error : expected a "," or ">"

 

0 Kudos
Starlin
Beginner
1,293 Views

Hi Philip, 

I was seeing the same errors and posted them here https://software.intel.com/en-us/forums/intel-c-compiler/topic/759215

My second post is a possible solution to the failing compilations, could you try it to see if it works for you?

 

Best,

0 Kudos
Maybank__Philip
Beginner
1,293 Views

I can confirm that the solution to Starlin's issue also solves my issue.

I changed the Intel Specific Base Platform Toolset from v141 to v140 using the documentation here,

https://software.intel.com/en-us/node/522398

And now my code compiles without any errors.

Any insight into what is going on, and how to get my code to compile with v141 would be greatly appreciated.

0 Kudos
Starlin
Beginner
1,293 Views

Hi Philip, 

you could also try to use v141, version 14.11 per this link (https://blogs.msdn.microsoft.com/vcblog/2017/11/15/side-by-side-minor-version-msvc-toolsets-in-visual-studio-2017/). It is a convoluted affair and it may not be at all possible in your case, but just as a further thing to try.

Best,

 

 

0 Kudos
Melanie_B_Intel
Employee
1,293 Views

With the -Za or the /permissive- switch, the Intel compiler is stumbling over some character sequences in the xtgmath.h header file. These issues are being tracked in our internal bugs database in cmplrs-49415 and cmplrs-48036 and hopefully will be fixed in the next update. In the meantime as a workaround you could remove those options.  Thank you for reporting it. --Melanie

0 Kudos
jase439
Beginner
1,293 Views

I suspect this bug is hitting the radar because of this recent change made in VS2017 15.5:

"By default, the /permissive- option is set in new projects created by Visual Studio 2017 version 15.5 and later versions. It is not set by default in earlier versions. When the option is set, the compiler generates diagnostic errors or warnings when non-standard language constructs are detected in your code, including some common bugs in pre-C++11 code."

0 Kudos
Roman_F_
Beginner
1,293 Views

@Jason B: Thank you for pointing this out. I also get an error (see below) if  <map> is included. Disabling the "permissive-" flag solves the problem.

 

#include <iostream>
#include <map>

int main()
{
	std::cout << "Hello World!" << std::endl;
	return 0;
}


1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\xtree(1768): error : access violation
1>  			iterator _Where = iterator(_Wherenode, _STD addressof(_My_data));
1>  			                  ^

 

0 Kudos
Reply