This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11095] New: C++ iostream manipulator causes segfault when called iwth negative argument


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]