<br><br><div class="gmail_quote">On Tue, Apr 26, 2011 at 10:18 AM, Stefan Marr <span dir="ltr"><<a href="mailto:squeak@stefan-marr.de">squeak@stefan-marr.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hi Mariano:<br>
<div class="im"><br>
On 26 Apr 2011, at 09:53, Mariano Martinez Peck wrote:<br>
<br>
> If I am compiling with -DNDEBUG=1 I expect the asserts() to be evaluating.<br>
</div>NDEBUG is a short form for NO debug, I suppose.<br>
Let me cite the manpage:<br>
<br>
>><br>
If the macro NDEBUG was defined at the moment <assert.h> was last included, the macro assert() generates no code, and hence does nothing at all.<br>
<<<br>
<br>
Thus, -DNDEBUG=0 and -DNDEBUG=1, as well as -DNDEBUG=foo have all the same effect: NO DEBUG, no assertions.<br>
<div class="im"><br></div></blockquote><div><br>Thanks Stefan. In fact, you were right. If I DO NOT define DNDEBUG, assertions. If I define it (with whatever value), no assertions. Now, I think that I was to naive to understand Eliot's first answer:<br>
<br>"<div>NDEBUG is a Mac OS X/FreeBSD/Linux flag that controls asserts. To
get asserts working in Cog it was easiest to use this flag. So if
NDEBUG=0 asserts are eliminated and if NDEBUG=1 they are included and
cause a warning to be printed to stdout when enabled (via a call to
warning). See platforms/Cross/vm/sqAssert.h. Hence NDEBUG=0 for
production and NDEBUG=1 for debug and assert VMs.</div>
"<br><br>So..I should have NOT understood them literal "Hence NDEBUG=0 for
production and NDEBUG=1 for debug" but instead that for debug I DO NOT have to define NDEBUG but I do for production ? <br> <br>And even more, when Igor said "and so it doesn't matters if it = 1 or = 0<br>
because it is defined, but don't cares which value." he was correct. <br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">
<br>
> And even more, asserta() seems to evaluates always.<br>
<br>
</div>I don't know asserta(), I suppose it is `assert always`?<br>
The only thing I can tell you here is, that you probably need to refer to its implementation.<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br>yes<br><br>Thanks Stefan<br><br>Mariano<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div class="h5">
Best regards<br>
Stefan<br>
<br>
--<br>
Stefan Marr<br>
Software Languages Lab<br>
Vrije Universiteit Brussel<br>
Pleinlaan 2 / B-1050 Brussels / Belgium<br>
<a href="http://soft.vub.ac.be/%7Esmarr" target="_blank">http://soft.vub.ac.be/~smarr</a><br>
Phone: <a href="tel:%2B32%202%20629%202974" value="+3226292974">+32 2 629 2974</a><br>
Fax: <a href="tel:%2B32%202%20629%203525" value="+3226293525">+32 2 629 3525</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>