This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Prototypes [was Re: Patch for bugs 772 and 17913]
> > i.e. there seems to be no good reason for prototyping a function as
> > "extern" immediately before it's definition. Unless of course I'm
> > missing something?
>
> I typically do this for dump/debug functions that we want to
> call from gdb but are usually not called from anywhere else. If
> you declare them static, you get warnings and/or they get dropped
> from the final binary.
>
> If there's a better method, then let's use it. I don't feel any
> particular attachment to this idiom.
> Diego.
I believe attribute `used' is meant to force GCC to emit the function.
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu