In C: Why is so that only inline functions with internal linkage (ie declared with static) may reference (ie copy address, read, write, or call) a variable or function at file scope with static storage duration while other inline functions may not?
+2
A:
This is how things are defined.
The inlined function would be inserted in the module where it is called. So, it can't access the private stuff in its module where it is defined.
If the inlined function is only used in that module(internal linkage). Then it is safe to grant it an access to the "private" stuff of that module.
AraK
2010-03-07 21:45:58