This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++/8716: std::string( NULL, 0 ) throws exception also on zero length


Yes, the new gcc 3.2.1 hasn't the problem. Very good.

Thank you!
Joacim Zschimmer

-----Ursprüngliche Nachricht----- 
Von: <pme@gcc.gnu.org>
An: <gcc-bugs@gcc.gnu.org>; <gcc-prs@gcc.gnu.org>; <nobody@gcc.gnu.org>; <pme@gcc.gnu.org>; <x@zsch.de>
Gesendet: Dienstag, 26. November 2002 17:37
Betreff: Re: libstdc++/8716: std::string( NULL, 0 ) throws exception also on zero length


> 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
> 
> 
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]