On Thu, Aug 3, 2017 at 6:35 PM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > That very early inlining was actually a fairly big design decision > originally - at some point I actually wanted to allow sparse to have What is the reason behind it? > inline functions act as untyped "templates" that it inlined, and that > had their types evaluated only within the context of being used. Sound a lot like macro then. Can it do any thing macro can not do? > I have this memory of that actually even working to some degree at > some point (ie you could leave arguments to inline functions untyped, > and they would take their type from the invocation). But that may have > been with special patches. > > But yes, for this particular case it's apparently a horrible choice, > exactly because it inlines very early before any actual evaluation of > anything. Sounds like reason to implement inline at the instruction level. I think it should be easier to copy instructions than AST. I recall the inline copying of AST is very error prone, e.g. forget to copy a member of the AST struct. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html