This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11095] New: C++ iostream manipulator causes segfault when called iwth negative argument
- From: "weinberg at astro dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jun 2003 20:39:55 -0000
- Subject: [Bug c++/11095] New: C++ iostream manipulator causes segfault when called iwth negative argument
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11095
Summary: C++ iostream manipulator causes segfault when called
iwth negative argument
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: weinberg@astro.umass.edu
CC: gcc-bugs@gcc.gnu.org,weinberg@astro.umass.edu
OS: Debian/GNU Linux "testing" distribution with gcc 3.3 suite
Test code:
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout << setw(-60) << "This is a test\n";
return 0;
}
Compile with: g++ -o code code.cc
Segfaults in iostream call under g++-3.3, g++-3.2 but not g++-3.0 or
g++-2.95.
Comment: negative arguments in setw() changed the justification in earlier
versions of the gcc iostream library. Perhaps a warning should be issued
with negative argument?
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.