Is there any way to know / warn if a global variable is uninitialized with gcc ?
I got it for local/ atomic variables “-Wuninitialized”
No! Global and static variables are initialized implicitly if your code doesn't do it explicitly as mandated by the C standard. In short, global and static variables are never left uninitialized.
2.1m questions
2.1m answers
60 comments
57.0k users