PATCH: __cxa_vec_delete* Changes

Jeffrey D. Oldham oldham@codesourcery.com
Fri Nov 7 17:51:00 GMT 2003


Jonathan Wakely wrote:
> On Tue, Nov 04, 2003 at 08:50:37PM -0800, Jeffrey D. Oldham wrote:
> 
> 
>>2003-11-03  Jeffrey D. Oldham  <oldham@codesourcery.com>
>>
>>	* libsupc++/vec.cc (__cxa_vec_delete2): If given a NULL pointer,
>>	immediately return.  This reflects a C++ ABI change 2003 Nov 03.
>>	(__cxa_vec_delete3): Likewise.
> 
> [snip]
> 
>>*************** namespace __cxxabiv1
>>*** 312,319 ****
>>  		     void (*destructor) (void *),
>>  		    void (*dealloc) (void *, std::size_t))
>>    {
>>!     char *base = static_cast <char *> (array_address);
>>!     std::size_t size = 0;
>>      
>>      if (padding_size)
>>        {
>>--- 317,330 ----
>>  		     void (*destructor) (void *),
>>  		    void (*dealloc) (void *, std::size_t))
>>    {
>>!     char *base;
>>!     std::size_t size;
>>!     
>>!     if (!array_address)
>>!       return;
>>! 
>>!     base = static_cast <char *> (array_address);
>>!     size = 0;
>>      
>>      if (padding_size)
>>        {
> 
> 
> Is there an ABI reason to declare the variables (uninitialised) at the
> top of the function, rather than after the return statement?
> C++STYLE says to declare variables where first used (and to write
> "char* s" not "char *s" but that was wrong already)
> 
> If there's no reason I'm missing, is this OK?
> 
> 2003-11-07  Jonathan Wakely  <redi@gcc.gnu.org>
> 
> 	* libsupc++/vec.cc: Conform to C++STYLE.
> 
> - jon the curious pedant

Thank you for the improvement.

Jeffrey D. Oldham
oldham@codesourcery.com



More information about the Libstdc++ mailing list