Inlined functions can give rise to bogus warnings when they contain statically determined branches. Testcase: static inline int f(int x) { if (1) return 17; } int h(int z) { return f(z); } foo$ gcc -O2 -Wall -c foo.c foo.c: In function 'h': foo.c:2: warning: control may reach end of non-void function 'f' being inlined This kind of code is not uncommon, nor bad style, and makes -Werror useless. This is a regression from gcc 3.4.0. The same warning is given with: static inline int f(int x, int q) { if (q) return 17; } int h(int z) { return f(z, 1); }
*** This bug has been marked as a duplicate of 19699 ***