Message-ID: <379CDE99.3E957B4@unb.ca> Date: Mon, 26 Jul 1999 18:18:01 -0400 From: Endlisnis X-Mailer: Mozilla 4.51 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp AT delorie DOT com Subject: Re: __attribute__((unused)), gcc get's confused...? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > On Sun, 25 Jul 1999, Endlisnis wrote: > > I'm having a problem with unused parameters. This code: > > char **__crt0_glob_function (__attribute__((unused)) char * _argument) > __attribute__ should come *after* the name, like this: > char **__crt0_glob_function (char * _argument __attribute__((unused))) > If you study carefully the GCC docs that describe __attribute__, you > will see that all the examples there put __attribute__ after the name, > not before it. I had looked in the info pages for gcc, and I did find that, but the way I posted it was the only way it didn't get a parse error. Here is a program I tried just now. And the output from gcc. int main(int argc __attribute__((unused)), char** argv) { return 0; } b.cc(1) Error: parse error before `__attribute__' In function `int main(...)': b.cc(4) Error: confused by earlier errors, bailing out There were some errors I'm using gcc v2.8.1 -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT HotMail DOT com ICQ: 32959047