← Back to team overview

dolfin team mailing list archive

Re: assert

 

2008/4/3, Anders Logg <logg@xxxxxxxxx>:
> On Thu, Apr 03, 2008 at 07:15:47PM +0200, Garth N. Wells wrote:
>  > I just picked up some problems in my code because I painstakingly used
>  > 'assert' rather than 'dolfin_assert'. What I'm wondering is
>  >
>  > - Where is assert declared?
>
>
> Not anywhere in DOLFIN as far as I can see. It's in assert.h and
>  that's not included anywhere either.

I suspect it leaks through other (gcc) system headers.

>  > - Why didn't assert work? Is it because we use '-DNDEBUG'? (which is
>  > necessary to make uBLAS run reasonably)
>
>
> Don't know.

Yes, by inspection of /usr/lib/assert.h that's it.

--
Martin


References