Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

[windows] math.h warnings when using cl from Intel Env (cmd)

$
0
0

I have the following installation:

- Windows 10

- Visual Studio 2015 (community edition)

- Intel 17.0 Update 1 (parallel studio xe composer edition for fortran and C++)

There are reasons to use  VS/cl with ParallelStudio/ifort. Here is a simple code that compiles cleanly with cl with "Visual Studio 2015 x64 Native Tools Command Prompt" - but gives warnings with "Compiler 17.0 Update 1 for Intel 64 Visual Studio 2015 environment"

######  VS CMD ################################

C:\cygwin64\home\balay\junk>type mathtest.c
#include <math.h>
int main() {
  return 0;
}

C:\cygwin64\home\balay\junk>cl mathtest.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

mathtest.c
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:mathtest.exe
mathtest.obj

C:\cygwin64\home\balay\junk>

######## Intel CMD #####################################################

c:\cygwin64\home\balay\junk>icl mathtest.c
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.1.143 Build 20161005
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

mathtest.c
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:mathtest.exe
mathtest.obj

c:\cygwin64\home\balay\junk>cl mathtest.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

mathtest.c
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\compiler\include\math.h(1577): warning C4005: 'HUGE_VALF': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\../ucrt/math.h(80): note: see previous definition of 'HUGE_VALF'
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\compiler\include\math.h(1579): warning C4005: 'HUGE_VALL': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\../ucrt/math.h(81): note: see previous definition of 'HUGE_VALL'
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\compiler\include\math.h(1581): warning C4005: 'HUGE_VAL': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\../ucrt/math.h(79): note: see previous definition of 'HUGE_VAL'
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:mathtest.exe
mathtest.obj

c:\cygwin64\home\balay\junk>

Perhaps a bug in Intel include files?


Viewing all articles
Browse latest Browse all 1175

Trending Articles