c++/5595: illegal concstructor invokation

binder@iue.tuwien.ac.at binder@iue.tuwien.ac.at
Tue Feb 5 14:30:00 GMT 2002


>Number:         5595
>Category:       c++
>Synopsis:       illegal concstructor invokation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 05 14:26:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     binder@iue.tuwien.ac.at
>Release:        Reading specs from /home/binder2/gcc3/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/specs Configured with: ../gcc-3.0.3-src/configure --prefix=/home/binder2/gcc3 --enable-shared --enable-threads=posix Thread model: posix gcc version 3.0.3
>Organization:
>Environment:
RH-7.2 2.4.17
>Description:
g++3 compiles the following code without any complaints. The resulting binary causes a segmentation violation.

------------------------------

#include <iostream>
using namespace std;

struct TestConstr
{
	TestConstr(const string str="")
	{
		cout << "Str: " << str << endl;
	}
};


int main()
{
	TestConstr	tt(false);
}


------------------------------
>How-To-Repeat:
g++ bug.cc -o bug
./bug
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list