Message-Id: <199709021414.KAA11154@delorie.com> From: Oberhumer Markus Subject: 970831: patches To: dj AT delorie DOT com (DJ Delorie), djgpp-workers AT delorie DOT com (djgpp-workers) Date: Tue, 2 Sep 1997 16:09:17 +0200 (METDST) Return-Read-To: markus DOT oberhumer AT jk DOT uni-linz DOT ac DOT at Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk Subject: 970831: patches The current implementation of causes warnings when using compile-time expressions that evaluate to true (like `assert(1);') in combination with the gcc flags `-Wall -pedantic'. Markus *** assert.org Mon Aug 12 18:56:18 1996 --- assert.h Tue Sep 2 14:36:18 1997 *************** *** 1,3 **** ! /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #ifndef __dj_ENFORCE_ANSI_FREESTANDING --- 1,3 ---- ! /* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ #ifndef __dj_ENFORCE_ANSI_FREESTANDING *************** *** 5,11 **** #if defined(NDEBUG) ! #define assert(test) ((void)0) #else ! #define assert(test) ((test)?(void)0:(void)__dj_assert(#test,__FILE__,__LINE__)) #endif --- 5,11 ---- #if defined(NDEBUG) ! #define assert(expr) ((void)0) #else ! #define assert(expr) ((void)((expr)||(__dj_assert(#expr,__FILE__,__LINE__),0))) #endif *************** *** 17,21 **** #endif ! void __dj_assert(const char *,const char *,int); #ifdef __cplusplus --- 17,21 ---- #endif ! void __dj_assert(const char *,const char *,int) __attribute__((__noreturn__)); #ifdef __cplusplus