c++/797: g++ produces incorrect code
draeger@tat.physik.uni-tuebingen.de
draeger@tat.physik.uni-tuebingen.de
Tue Nov 14 04:46:00 GMT 2000
>Number: 797
>Category: c++
>Synopsis: g++ produces incorrect code
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Tue Nov 14 04:46:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: draeger@tat.physik.uni-tuebingen.de
>Release: 2.95.2 19991024
>Organization:
>Environment:
intel x86
>Description:
A const char* exception passes a dead pointer if the
passed object is declared explicitely as a local variable.
The pointer is passed correctly if the const char* is
thrown directly.
>How-To-Repeat:
g++ test.cpp
a.out
->the output should be:
Error: This is an exceptional example.
Error: >>some undefined characters<<
>Fix:
Passing const char* exceptions directly.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list