Article View: gnu.gcc.bug
Article #896suggested improvement to assert.h
From: Mike Coleman
Date: Sat, 20 Jan 1990 04:25
Date: Sat, 20 Jan 1990 04:25
19 lines
950 bytes
950 bytes
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
Technical Details
Message-ID:
<9001200425.AA02377@spot.twinsun.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!twinsun.com!colemanShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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