Xref: news2.mv.net comp.os.msdos.djgpp:7426 From: Sengan Short Newsgroups: comp.os.msdos.djgpp Subject: Re: __attribute__ probs Date: 3 Aug 1996 19:09:47 GMT Organization: University of Durham, Durham, UK. Lines: 29 Message-ID: <4u085r$4np@mercury.dur.ac.uk> References: <6DuayK2cWSB AT xyz DOT prima DOT ruhr DOT de> NNTP-Posting-Host: whitby.dur.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp : I want to get rid off the 'unused variable XXX' warning messages, : especially in the following case: : void Test(int a) : { : }; : int a is unused, of course, therefor I get a warning message. To overcome : this warning message I tried to use the __attribute__((unused)) in the : following way: : #define UNUSED __attribute__((unused)) : void Test(int a UNUSED) : { : }; Try using the UNUSED in the prototype but NOT the definition: void Test(int a UNUSED); void Test(int a) { }; This works for other attributes, which have the nice property of crashing gcc if you put them in the defintion. Sengan