From: pavenis AT lanet DOT lv To: Eli Zaretskii , djgpp-workers AT delorie DOT com Date: Thu, 21 Jun 2001 14:03:00 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Mysterious id in dbgcom.c Message-ID: <3B31FE94.22734.66BED4@localhost> References: <3B31F58A DOT 23211 DOT 436FF6 AT localhost> In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com On 21 Jun 2001, at 13:32, Eli Zaretskii wrote: > > On Thu, 21 Jun 2001 pavenis AT lanet DOT lv wrote: > > > > > + (void) id; > > > > > > Wait until GCC begins to bitch about "expression has no effect" ;-) > > > > At least it works with gcc-3.0 and earlier versions. I don't know what > > will happen after some years. At least now it seems that explicitly > > casting the result to void removes the warning > > 'warning: statement with no effect'. What is said about this > > in C standard? > > I don't think the standard has something about such warnings. However, > many proprietary compilers, such as the ones from AIX and SGI, are very > noisy about such code, and I'm not sure GCC maintainers think they > shouldn't do the same, judging by the latest changes in warning policy. Yes. However explicit casting to void silences warning at least for GCC versions I tried and also for BCC 5.5 command line compiler Andris