Philosophical question on dependencies, etc.
Andrew Pinski
pinskia@gmail.com
Thu Nov 9 18:45:00 GMT 2006
On Thu, 2006-11-09 at 01:18 -0800, Brooks Moses wrote:
> FX Coudert wrote:
> >>And, if there should be some active checking, is a gcc_assert() a
> >>sufficient way of doing it? From a cursory glance, it looks like
> >>gcc_assert() is defined as a no-op in everything but Stage 1, which
> >>I think would mean that it's largely a no-op in anything meaningful
> >>with gfortran
> >
> > No, it's not. When the assert if false, it actually triggers an ICE
> > with front-end file and line number displayed. I don't know how it
> > does that (and can't look right now), but I'm pretty sure it does.
>
> In gcc/system.h, it's defined as follows (slightly reformatted to avoid
> line-wrapping):
>
> #if ENABLE_ASSERT_CHECKING
> #define gcc_assert(EXPR) \
> ((void)(!(EXPR)?fancy_abort (__FILE__, __LINE__, __FUNCTION__),0:0))
> #else
> /* Include EXPR, so that unused variable warnings do not occur. */
> #define gcc_assert(EXPR) ((void)(0 && (EXPR)))
> #endif
--enable-checking=release which is default on release branches also
enable assert checking.
If someone uses --disable-checking then they are turned off.
I can point to the previous discussion about gcc_assert on the gcc@ list
if someone needs more information about it.
Thanks,
Andrew Pinski
More information about the Fortran
mailing list