This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix VEC_block_remove
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 10 Feb 2011 18:37:11 +0000
- Subject: Fix VEC_block_remove
VEC_block_remove has a typo that makes it so that
using it doesn't even build.
I also noticed the "O(1)" comment wasn't correct. This
was fixed on the GCC side, so I merged in the relevant
hunk of the GCC patch that fixed it.
Applied.
--
Pedro Alves
2011-02-10 Pedro Alves <pedro@codesourcery.com>
* vec.h (VEC_block_remove): Place VEC_ASSERT_INFO on the right
side of the parenthesis.
Merge from GCC:
2010-07-13 Jakub Jelinek <jakub@redhat.com>
* vec.h (VEC_block_remove): Fix comment.
---
gdb/vec.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: src/gdb/vec.h
===================================================================
--- src.orig/gdb/vec.h 2011-02-10 17:56:19.000000000 +0000
+++ src/gdb/vec.h 2011-02-10 17:58:20.147075996 +0000
@@ -353,10 +353,10 @@
void VEC_T_block_remove (VEC(T) *v, unsigned ix, unsigned len);
Remove LEN elements starting at the IXth. Ordering is retained.
- This is an O(1) operation. */
+ This is an O(N) operation due to memmove. */
#define VEC_block_remove(T,V,I,L) \
- (VEC_OP(T,block_remove)(V,I,L) VEC_ASSERT_INFO)
+ (VEC_OP(T,block_remove)(V,I,L VEC_ASSERT_INFO))
/* Get the address of the array of elements
T *VEC_T_address (VEC(T) v)