Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!twinsun.com!coleman From: coleman@twinsun.com (Mike Coleman) Newsgroups: gnu.gcc.bug Subject: suggested improvement to assert.h Message-ID: <9001200425.AA02377@spot.twinsun.com> Date: 20 Jan 90 04:25:50 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 19 calls to the GNU assert macro cause the error message file.c:2059: warning: ANSI C forbids conditional expr with only one void side when compiled with -ansi -pedantic. This can be prevented by changing #define assert(expression) \ ((expression) ? 0 : __assert (#expression, __FILE__, __LINE__)) to #define assert(expression) \ ((expression) ? (void) 0 : __assert (#expression, __FILE__, __LINE__)) in assert.h. The only penalty I can see is the miniscule cost of compiling the extra cast. Mike Coleman coleman@twinsun.com