This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Prototypes [was Re: Patch for bugs 772 and 17913]


On Thu, May 05, 2005 at 02:45:22PM -0600, Roger Sayle wrote:

> >> extern bool cfg_layout_can_duplicate_bb_p (basic_block);
> >>
> >> bool
> >> cfg_layout_can_duplicate_bb_p (basic_block bb)
> >> {
> >>   ...
> 
> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]