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

Unexistent warning

asd__asdqwe
Beginner
346 Views

Hello,

The following program does not output anything when compiled with icpc 15.0.2.132, with the flags "-std=c++11 -c -Wall":

extern int foo(char*);

int main() {
    foo("C");
    return 0;
}

In comparison, here is the output with g++ 4.9.2:

cpp:4:12: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

And with clang 3.5:

cpp:4:9: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wc++11-compat-deprecated-writable-strings]

Thank you.

0 Kudos
3 Replies
KitturGanesh
Employee
346 Views

Hi,
You're correct that icpc is not issuing a warning. Let me investigate and get back to you.
_Kittur

0 Kudos
KitturGanesh
Employee
346 Views

Hi,
I've filed this issue with the developers and will get back to you as soon as I've an update, thanks.
_Kittur 

0 Kudos
KitturGanesh
Employee
346 Views

Pleasure, and thanks for bring this to our attention as this is a bug in the compiler. I'll keep you updated as soon as the release with the fix is out, appreciate much.

_Kittur 

0 Kudos
Reply