------- Comment #14 from pinskia at gcc dot gnu dot org 2007-03-19 23:18 ------- But the user can see the code, it is what is produced by what the C++ standard says is produced, now you could say the user has no control over fixing it, it is also true with the template case. Both cases are hard to fix without much thought. There is also something like:
static inline int f(int a) { if (a) return g(); return 0; } int h(void) { return f(0); } With -Wunreachable-code -O1, we warn that we cannot reach the line containing return g(); Now should we, it is the same case, how can an user fix that code if the static inline function comes in from a header, they cannot. -Wunreachable-code warning is useless except if you want to see if you do coverage. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31246