diff options
author | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-01 04:04:34 +0000 |
---|---|---|
committer | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-01 04:04:34 +0000 |
commit | e62879ce4aa3754c3f204fe5bd0550c391676090 (patch) | |
tree | f479c94d167e852161402775e4b9df9cf1ef441a /libstdc++-v3 | |
parent | 3ef658047f73c4f50ddb3cc45e82f991ac5d2d27 (diff) | |
download | gcc-e62879ce4aa3754c3f204fe5bd0550c391676090.tar.gz |
* libsupc++/eh_alloc.cc (__cxa_free_exception): Don't refer to the
emergency_buffer using `&array[0][0]' notation, use `array'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121456 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/eh_alloc.cc | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2b6b12000e3..1718e5db684 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2007-02-01 Ben Elliston <bje@au.ibm.com> + + * libsupc++/eh_alloc.cc (__cxa_free_exception): Don't refer to the + emergency_buffer using `&array[0][0]' notation, use `array'. + 2007-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/30571 diff --git a/libstdc++-v3/libsupc++/eh_alloc.cc b/libstdc++-v3/libsupc++/eh_alloc.cc index 217a8cd8043..553c1c1e858 100644 --- a/libstdc++-v3/libsupc++/eh_alloc.cc +++ b/libstdc++-v3/libsupc++/eh_alloc.cc @@ -143,12 +143,13 @@ __cxxabiv1::__cxa_allocate_exception(std::size_t thrown_size) throw() extern "C" void __cxxabiv1::__cxa_free_exception(void *vptr) throw() { + char *base = (char *) emergency_buffer; char *ptr = (char *) vptr; - if (ptr >= &emergency_buffer[0][0] - && ptr < &emergency_buffer[0][0] + sizeof (emergency_buffer)) + if (ptr >= base + && ptr < base + sizeof (emergency_buffer)) { const unsigned int which - = (unsigned)(ptr - &emergency_buffer[0][0]) / EMERGENCY_OBJ_SIZE; + = (unsigned) (ptr - base) / EMERGENCY_OBJ_SIZE; __gnu_cxx::__scoped_lock sentry(emergency_mutex); emergency_used &= ~((bitmask_type)1 << which); |