This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/5595: illegal concstructor invokation
- From: binder at iue dot tuwien dot ac dot at
- To: gcc-gnats at gcc dot gnu dot org
- Date: 5 Feb 2002 22:20:22 -0000
- Subject: c++/5595: illegal concstructor invokation
- Reply-to: binder at iue dot tuwien dot ac dot at
>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: