This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: PATCH: __cxa_vec_delete* Changes


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


Attachment: libstdc++-vec.cc-style.patch
Description: Text document


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