help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Warnings using stringstream


From: Tron Thomas
Subject: Warnings using stringstream
Date: Fri, 25 Apr 2003 14:22:05 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02

The following program generates warnings when compiled with the GNU C++ compiler for Linux:

#include <iostream>
#include <sstream>

int main()
{
   std::stringstream stream;

   stream << "This is a test.\n";

   std::cout << stream.str();

   return 0;
}

These are the warnings it produces:

In file included from TestStream.cpp:2:
/usr/include/g++-3/sstream:260: warning: default argument given for parameter 3 of `streampos
stringbuf::seekoff (long long int, ios::seek_dir, int = 3)'
/usr/include/g++-3/sstream:83: warning: after previous specification in
`streampos stringbuf::seekoff (long long int, ios::seek_dir, int = 3)'
/usr/include/g++-3/sstream:278: warning: default argument given for parameter 2 of `streampos
stringbuf::seekpos (long long int, int = 3)'
/usr/include/g++-3/sstream:84: warning: after previous specification in
`streampos stringbuf::seekpos (long long int, int = 3)'

These warnings do not make any sense to me. I have never encountered any problems like this using std::stringstream with any other compiler. Are these warnings bogus? Is this a bug with the compiler's STL?

I am using RedHat Linux 7.2 (Intel) and version 2.96 of the GNU C++ compiler.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]