Date: Mon, 25 Nov 1996 08:50:19 +0000 From: Bill Currie Subject: Re: v2 unwanted warnings To: "A.Appleyard" Cc: DJGPP AT delorie DOT com Reply-to: billc AT blackmagic DOT tait DOT co DOT nz Message-id: <32995DCB.26C7@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <131D93180C AT fs2 DOT mt DOT umist DOT ac DOT uk> A.Appleyard wrote: > When v2 compiled this just now:- > > #define nu __attribute__ ((unused)) > class point{public: double x,y;}; > int miaow(point nu w,double nu z){} > main(){} > > I got this:- > > C:\AMNEW>gcc t$$$.cc -Wall > t$$$.cc:3: warning: `unused' attribute ignored > t$$$.cc:3: warning: `unused' attribute ignored > t$$$.cc: In function `int miaow(class point, double)': > t$$$.cc:3: warning: unused parameter `class point w' > t$$$.cc:3: warning: unused parameter `double z' > t$$$.cc:3: warning: control reaches end of non-void function `miaow(point, doubl > e)' Since your using C++, just drop the names of any unused parameters (this is standard c++). ie class point{public: double x,y;}; int miaow(point, double){} main(){} The __attribute__((unused)) is for C bacause the language doesn't allow unnamed paramters. Bill -- Leave others their otherness.