- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you look in the compiler'sinclude folder you will see that it doesn't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
}
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
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page