Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > | Another approach I've considered is to skip parsing functions until > | they are needed. Since the parser dominates the -O0 compilation time, > | and since large C++ projects have hundreds of inline functions which > | are never needed by any particular compilation, I think there could be > | a big -O0 benefit from only parsing functions as needed. > > That defered parsing might work with C (I don't really know), but it > certainly is problematic with C++ because there are bindings that > need to be in overload sets, and you cannot accurately capture those if > you don't parse the function bodies. Sadly.
You do clearly need to parse the function declarations--the name and the parameters--but do you really need to parse the function bodies themselves? If so, then my idea would certainly fail. Ian