This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use assert()s for optimization?


On Fri, 7 Nov 2003, Alex Rosenberg wrote:

> Unfortunately, assert(exp) is guaranteed not to evaluate "exp" when
> NDEBUG is set.

Of course, my point was not to use assert(), but a custom my_assert()
which would invoke undefined behavior in optimized case, if the condition
is not met.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]