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

warning #980

sgwood
Beginner
422 Views

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

0 Kudos
3 Replies
levicki
Valued Contributor I
422 Views
If you look in the compiler'sinclude folder you will see that it doesn't.
0 Kudos
Oren
Beginner
422 Views
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
}
0 Kudos
Oren
Beginner
422 Views
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.
0 Kudos
Reply