This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: , operand with no effect warning


On 30-Jul-2001, Phil Edwards <pedwards@disaster.jaj.com> wrote:
> On Mon, Jul 30, 2001 at 08:30:03PM +0100, John Levon wrote:
> > 
> > Why does gcc warn for :
> > 
> > 	p1, p2;
> 
> Because this has no effect.
> 
> > but not :
> > 	delete p1, p2;
> 
> Because this does have an effect.

Yes, but it contains a subexpression whose result is discarded
and which has no side effects.  It should get a warning.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]