Re: [google gcc-4_7,gcc-4_8,integration] Add bounds checks to vector

2013-06-04 Thread Miles Bader
Paul Pluzhnikov writes: > Keying off NDEBUG rather than __OPTIMIZE__ seems like a more > consistent approach -- if you want assert()s, then you probably also > want these checks. That's a bad idea. NDEBUG ("Be really slow unless the user has positively defined this macro, whose use is rare enoug

Re: [google gcc-4_7,gcc-4_8,integration] Add bounds checks to vector

2013-05-24 Thread Paul Pluzhnikov
Jonathan, On Thu, May 23, 2013 at 10:13 AM, Paul Pluzhnikov wrote: > On Thu, May 23, 2013 at 9:14 AM, Jonathan Wakely > wrote: > >> I was wondering the other day whether we should put these checks on >> trunk and enable them automatically when !defined(__OPTIMIZE__) > > FWIW, we keep this under

Re: [google gcc-4_7,gcc-4_8,integration] Add bounds checks to vector

2013-05-24 Thread Diego Novillo
On 2013-05-23 11:51 , Paul Pluzhnikov wrote: Greetings, This patch adds (relatively) cheap bounds and dangling checks to vector, similar to the checks I added to vector in r195373, r195356, etc. Ok for google branches (gcc-4_7, gcc-4_8, integration) ? OK. Diego.

Re: [google gcc-4_7,gcc-4_8,integration] Add bounds checks to vector

2013-05-23 Thread Paul Pluzhnikov
On Thu, May 23, 2013 at 9:14 AM, Jonathan Wakely wrote: > I was wondering the other day whether we should put these checks on > trunk and enable them automatically when !defined(__OPTIMIZE__) FWIW, we keep this under a separate macro so we can turn it on or off independent of other build options

Re: [google gcc-4_7,gcc-4_8,integration] Add bounds checks to vector

2013-05-23 Thread Jonathan Wakely
On 23 May 2013 16:56, Paul Pluzhnikov wrote: >> >> This patch adds (relatively) cheap bounds and dangling checks to >> vector, similar to the checks I added to vector in r195373, >> r195356, etc. I was wondering the other day whether we should put these checks on trunk and enable them automaticall

Re: [google gcc-4_7,gcc-4_8,integration] Add bounds checks to vector

2013-05-23 Thread Paul Pluzhnikov
+cc libstd...@gcc.gnu.org On Thu, May 23, 2013 at 8:51 AM, Paul Pluzhnikov wrote: > Greetings, > > This patch adds (relatively) cheap bounds and dangling checks to > vector, similar to the checks I added to vector in r195373, > r195356, etc. > > Ok for google branches (gcc-4_7, gcc-4_8, integrati

[google gcc-4_7,gcc-4_8,integration] Add bounds checks to vector

2013-05-23 Thread Paul Pluzhnikov
Greetings, This patch adds (relatively) cheap bounds and dangling checks to vector, similar to the checks I added to vector in r195373, r195356, etc. Ok for google branches (gcc-4_7, gcc-4_8, integration) ? Thanks, -- Index: libstdc++-v3/include/bits/stl_bvector.h