warning #980

warning #980

In version 11.0.069 of the Intel C++ compiler I recieve the following warning:

warning #980: wrong number of actual arguments to intrinsic function "std::basic_istream::get"

The following code produces the warning:

#include
#include

int main()
{
std::string value = "a,b,c,d";
istringstream buffer(value);

cout << buffer.get() << endl;

return 0;
}

However, istringstream::get() is a valid interface. Does the Intel compiler header files change the interface?

-Simon

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

If you look in the compiler'sinclude folder you will see that it doesn't.

Regards,
Igor Levicki

Also getting this on *NIX 11.0/074.

I suspect (confirmation pending) that this is causing stack corruption in various functions that get istream& or ostream& passed to them as parameters.

For instance, in a callstack from a function that's (simplified)

class C
{
uint32_t count;
}

C::Load(istream &stream)
{
...
stream.read( (char*)(&count), 4)
...
// crash due to unreasonable value of this->count

gdb) print count
Cannot access memory at address 0xXXXX
}

Scratch my last, I have the compiler error and, logically, one might think that it is corrupting the stack if we are passing the wrong number of parameters to a function. Alas, the error is mine.

Leave a Comment

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