Date: Thu, 21 Jun 2001 13:32:06 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: pavenis AT lanet DOT lv cc: djgpp-workers AT delorie DOT com Subject: Re: Mysterious id in dbgcom.c In-Reply-To: <3B31F58A.23211.436FF6@localhost> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.