public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5595: illegal concstructor invokation
@ 2002-03-18 9:57 jason
0 siblings, 0 replies; 2+ messages in thread
From: jason @ 2002-03-18 9:57 UTC (permalink / raw)
To: binder, gcc-bugs, gcc-prs, jason, nobody
Synopsis: illegal concstructor invokation
Responsible-Changed-From-To: unassigned->jason
Responsible-Changed-By: jason
Responsible-Changed-When: Mon Mar 18 09:57:40 2002
Responsible-Changed-Why:
x
State-Changed-From-To: open->closed
State-Changed-By: jason
State-Changed-When: Mon Mar 18 09:57:40 2002
State-Changed-Why:
There is no bug here. "false" is a valid argument to the string constructor taking a char*. The constructor doesn't like getting a null pointer, so it throws an exception. You don't catch the exception, so the program terminates.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5595
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/5595: illegal concstructor invokation
@ 2002-02-05 14:26 binder
0 siblings, 0 replies; 2+ messages in thread
From: binder @ 2002-02-05 14:26 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-03-18 17:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-18 9:57 c++/5595: illegal concstructor invokation jason
-- strict thread matches above, loose matches on Subject: below --
2002-02-05 14:26 binder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).