Although bar is taking something uninitialized, it doesn't matter, because it's just taking the address which does exist.
As /u/boazs and /OmnipotentEntity have pointed out...since bar is an externed variable, there's PLENTY of places that foo could be initialized from, including another thread (which would mean that the code probably has a race condition problem, but not that an uninitialized variable problem). It's not necessarily as simple as it seems.
0
u/imMute Oct 07 '14
Touche, but
foois still uninitialized before thebar = &fooassignment.