Community
cancel
Showing results for 
Search instead for 
Did you mean: 
asd__asdqwe
Beginner
39 Views

Unexistent warning

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
Kittur_G_Intel
Employee
39 Views

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

Kittur_G_Intel
Employee
39 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 

Kittur_G_Intel
Employee
39 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