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: Simple observations (mostly docs-related) about string vs debug-mode


Jonathan Wakely wrote:

>>>1- It suffices to add -O1 to the command line to have the assertions
>>>triggered, due to inlining, of course. This is no small thing, in my
>>>opinion.
>>>      
>>>
>This doesn't work if the string::operator[] call is deep inside a series
>of inlinable functions. If you hit the inline limit then the op[] call
>will not be inlined.
>  
>
I see, that could be expected considering how brittle are the inlining
decisions ;) Now I don't know if we can find a concise way to espress
the idea that, as long as inling happens, the mechanism works for
std::string and std::wstring, otherwise doesn't. In any case I thing
something along this way *is* needed, together with clearly mentioning
__gnu_debug::string/wstring. For 4_0, at least, maybe for 4.1 we can
eventually do better.

Paolo.


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