Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!JAN.ULTRA.NYU.EDU!edler From: edler@JAN.ULTRA.NYU.EDU (Jan Edler) Newsgroups: gnu.gcc.bug Subject: gcc warning: empty body in else-statement Message-ID: <9001082242.AA00768@jan.ultra.nyu.edu> Date: 8 Jan 90 22:42:41 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 26 (I'm using the NYU internal version of gcc for the ibm rt pc, if it matters). If I compile with -Wall, I get warnings about else statements with empty bodies, e.g. if (expr) f(); else ; In my case the empty body is generated by a macro. 1) These warnings don't seem very useful to me; am I missing something? Is there a common error that will be caught by the warning? 2) Is there a way to turn them off, and still keep -Wall? 3) I can suppress them by using a null inline function, like static inline void null() { } and change my macro to evaluate to null(); is there a better way? Jan Edler NYU Ultracomputer Research Laboratory edler@nyu.edu