C++ parser: Should we get rid of cp_parser_declarator_id?

Nathan Sidwell nathan@codesourcery.com
Wed Dec 7 15:59:00 GMT 2005


Gabriel Dos Reis wrote:

> If we make it "static inline", would not we gain the same efficiency
> and preserve the comments and all that?  In general, the methodoly
> seems to have a function for each non-terminal -- following a long
> tradition of recursive descent parser -- and maintaining that
> principle is helpful for code clarity.

There's no need to make it inline.  The optimizers are now smart enough to 
inline a static function into its only caller.

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



More information about the Gcc mailing list