[Patch] Fix libstdc++/12352

Pétur Runólfsson peturr02@ru.is
Thu Sep 25 13:51:00 GMT 2003


Gabriel Dos Reis wrote:
> | Tested x86-linux. Do you like it?
> 
> It certainly is an improvement.  Thanks.
> I was wondering whether that should not just use the traditional RAII
> in form of objects construction/destruction (a la sentry), instead of
> doing it manually.... Just thinking loudly...

I agree.

In any case, this hunk isn't needed, because there is nothing in
the try block that can throw:
!     _M_facets = _M_caches = 0;
!     _M_names = 0;
!     try
!       {
! 	_M_facets = new (&facet_vec) const facet*[_M_facets_size];
! 	_M_caches = new (&cache_vec) const facet*[_M_facets_size];
! 	_M_names = new (&name_vec) char*[_S_categories_size];
!       }
!     catch(...)
!       {
! 	delete [] _M_facets;
! 	delete [] _M_caches;
! 	__throw_exception_again;
!       }      

Petur



More information about the Libstdc++ mailing list