Comment # 11 on bug 1224402 from Martin Jambor
I will look into why the variable was not promoted to const
automagically in this case because that seems to be somewhat lame (but
maybe some real reason escaped me).  However, failing that, GCC cannot
reliably identify every piece of unreachable code.  If, for example,
the address of the non-const array escaped the compilation unit, then
GCC simply might not do anything better than what it does.

(Well, GCC 13 has a new option -funreachable-traps which puts a trap
before the "fall-through" but we have just discovered its current
documentation is not correct and since ATM I cannot really estimate
its costs, I cannot really recommend using it or even evaluating it.)


You are receiving this mail because: