tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

4.0 vs nested functions



I use nested functions moderately heavily in my code.  Under 1.4T, I
defined them with "static".  Under 3.1, I used "auto".

Under 4.0, there appears to be no way to define them without upsetting
-Wmissing-prototypes, except with a redundant prototype declaration.

To put it another way, I have been unable to find a definition of
NESTED that will make this compile without warnings under 4.0 with
-Wmissing-prototypes:

extern void bar(char **, int, int (*)(int, int));

int main(int, char **);
int main(int ac, char **av)
{
 NESTED int foo(int x, int y)
  { return(x-y);
  }
 bar(av,ac,&foo);
 return(ac);
}

Given the documentation for -Wmissing-prototypes, this seems like a bug
to me ("Warn if a global function is defined without ..." - such
functions are not global).

But the gcc bug-reporting stuff appears to have been stripped.  The gcc
internal doc under 4.0 /usr/src/gnu/dist mentions a BUGS file and a
bugs.html file, and the webpage it points to mentions a gccbug script;
I find none of those anywhere under /usr/src/gnu/dist.  The webpage
also says this should not be reported direct to the gcc people because
it didn't come direct from the gcc people.

What's my correct action here?  Shound I generate a NetBSD PR?  Should
I send mail to gcc-bugs anyway?

/~\ The ASCII                           der Mouse
\ / Ribbon Campaign
 X  Against HTML               mouse%rodents.montreal.qc.ca@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B



Home | Main Index | Thread Index | Old Index