[cfe-dev] new -Wuninitialized implementation in Clang

Ted Kremenek kremenek at apple.com
Fri Feb 4 08:45:26 PST 2011

On Feb 4, 2011, at 8:12 AM, Nico Weber wrote:

> Unrelated: From an implementation perspective, s it reasonable to
> propagate __attribute__((noreturn))? I noticed that |int a; _exit(0);
> use(a);| does not warn, but |void g() { _exit(0); } int a; g();
> use(a);| does.

This requires inter-procedural analysis, which compiler warnings shouldn't get in the business of doing.  Instead, I believe we should warn that 'g' isn't labeled attribute 'noreturn' when it could be and have the user fix their code.

More information about the cfe-dev mailing list