Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Dec 2007 20:23:31 +0100
From:      Christoph Mallon <christoph.mallon@gmx.de>
To:        Poul-Henning Kamp <phk@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/include assert.h
Message-ID:  <4751B4B3.6020300@gmx.de>
In-Reply-To: <200712011856.lB1Iuoiw042995@repoman.freebsd.org>
References:  <200712011856.lB1Iuoiw042995@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
> phk         2007-12-01 18:56:50 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     include              assert.h 
>   Log:
>   Add missing #ifndef _ASSERT_H_ protection against multiple inclusions

This change violates ANSI C:
"The assert macro is redefined according to the current state of NDEBUG 
each time that <assert.h> is included." (ISO C99 §7.2)

Please also see the comment in assert.h:
/*
  * Unlike other ANSI header files, <assert.h> may usefully be included
  * multiple times, with and without NDEBUG defined.
  */

	Christoph



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4751B4B3.6020300>