As I read here inline functions doesn't have to be inlined. So let's say we have code like this:
int a = 0;
inline void myFunc(){
extern int a;
a = 1;
}
int main(){
int a = 0;
myFunc();
}
- Does standard guarantee which
a
variable will be assigned1
? - Are inline function compiled to a certain code before inlining? If so, what if I use
register
keyword fora
inmain
?
EDIT: the global int a
doesn't have to be declared in the same .c file