On Wed, Nov 03, 2010 at 10:24:30AM +0900, Isaku Yamahata wrote: > On Tue, Nov 02, 2010 at 02:57:12PM +0200, Michael S. Tsirkin wrote: > > > +static void pcie_aer_clear_error(PCIDevice *dev); > > > +static void pcie_aer_msg(PCIDevice *dev, const PCIEAERMsg *msg); > > > + > > > > so what exactly is the order of calls that makes > > removing the forward declarations impractical? > > Is there a recursive call? If yes I'd like to > > see it documented much better. > > Why do you think forward declaration is so bad? > I don't see any such consensus and I don't think they aren't > accused generally like goto. > Can you please elaborate why you're trying so hard to prevent it?
Well no, I do not claim they are that bad. In my opinion avoiding them just makes for a slightly better code usually: - They make for code duplication where if you change a function there's another place to edit. - Just generally add more code. - Avoiding forward declarations makes you put functions in some sensible order. - Also makes you avoid recursion where a loop will do. But all this doesn't always apply. I was trying to understand whether there's recursion here that I am missing. If there is a comment might be helpful. > -- > yamahata