Re: No boundschecking?
On Jan 31, 3:37 am, Michael Hull <mikehul...@googlemail.com> wrote:
Sorry I know this is slightly OT, but could anyone tell me how to turn
on the debug options when using glibc/gcc. I remember finding out
about them last year, but now can`t find the #define for the life of
me.
-D_GLIBCXX_CONCEPT_CHECKS -D_GLIBCXX_DEBUG -
D_GLIBCXX_DEBUG_PEDANTIC
If I understand correctly, the first affects compile time
checking (e.g. will cause a compile time error if you attempt to
instantiation std::list over a class which doesn't support
assignment), the other two more or less runtime checking. I
just systematically use all three, and don't worry about it.
(And no, I don't know where they are documented. I heard about
them through the grapevine myself.)
Note that they (or probably only the last two) change the size
of certain data structures, so code compiled with them isn't
compatible with code compiled without them.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34