KDE/kdevplatform/language/duchain

Andreas Pakulat apaku at gmx.de
Thu Dec 18 13:21:35 UTC 2008


On 18.12.08 11:12:22, Esben Mose Hansen wrote:
> On Thursday 18 December 2008 01:39:41 David Nolden wrote:
> > That the code within assertions is also executed in release-mode is such a
> > big surprise?
> 
> That would surprise anymore used to the standard assert macro from libc. Which 
> I think is basically every C and C++ programmer :)

Why? assert() has the same semantics as Q_ASSERT, namely generating _no
code_ if NDEBUG is defined (i.e. in release mode).

Especially see the BUGS section in man assert, it explicitly warns against
using code with assert() that has side-effects.

Andreas

-- 
Good night to spend with family, but avoid arguments with your mate's
new lover.




More information about the KDevelop-devel mailing list