libstdc++/8716: std::string( NULL, 0 ) throws exception also on zero length
pme@gcc.gnu.org
pme@gcc.gnu.org
Tue Nov 26 09:26:00 GMT 2002
Synopsis: std::string( NULL, 0 ) throws exception also on zero length
Responsible-Changed-From-To: unassigned->pme
Responsible-Changed-By: pme
Responsible-Changed-When: Tue Nov 26 08:37:05 2002
Responsible-Changed-Why:
I changed it.
State-Changed-From-To: open->feedback
State-Changed-By: pme
State-Changed-When: Tue Nov 26 08:37:05 2002
State-Changed-Why:
Thank you for your bug report.
I cannot reproduce this using 3.2.1:
% cat 8716.cc
#include <string>
using namespace std;
int main( int, char** )
{
try
{
const char* s = NULL;
string a = string( s, 0 );
printf( "ok\n" );
return 0;
}
catch( const exception& x ) { printf( "%s\n", x.what() ); return 1; }
}
% g++ 8716.cc
% ./a.out
ok
%
Can you try with the lastest release?
I suspect that the fix for 8347 also changed this behavior.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8716
More information about the Gcc-bugs
mailing list