This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: string debug-mode solutions
> optimizations should not change the semantics, so I think b is
> disqualified.
Agreed.
> If we have to do c, then we should go with d.
Also agreed.
> Given the recurent issues with system with no weak symbol support I have
> a preference for a, and looking for ways out of it.
Oh really? My preference is now to do d, but do something like this in c
++config as well:
#ifdef _GLIBCXX_DEBUG
# if !defined(__GXX_WEAK__)
# warning debug mode disabled due to lack of weak symbol support
#endif
#else
... do the deal
#endif
I think this leaves debug mode in a place where it can be used reliably, and clearly gives warning to users when it cannot.
The __GXX_WEAK__ macro should do the trick here, no?
Sound like a plan?
-benjamin