Mail Archives: djgpp/1999/07/26/18:16:32
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
- Raw text -