Mail Archives: djgpp-workers/2001/06/21/06:42:10
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.
- Raw text -