[Bug c++/38335] Code warning

2008-11-30 Thread adam dot c dot scott at gmail dot com
--- Comment #3 from adam dot c dot scott at gmail dot com 2008-12-01 06:47 --- With my version of g++ I didn't get your example warning about subscript. This would be great. In response to your objection... If any line of code modified the index of a for loop then why use a for loop?

[Bug c++/38335] Code warning

2008-11-30 Thread adam dot c dot scott at gmail dot com
--- Comment #2 from adam dot c dot scott at gmail dot com 2008-12-01 06:30 --- (In reply to comment #0) > Add warning about modifying an index in a for loop. > > Without this warning the kind of errors introduced in code are likely to be > very difficult to debug (core dump). > > Exa

[Bug c++/38335] Code warning

2008-11-30 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2008-11-30 19:50 --- You mean like g++ -S -O2 t.C -Wall t.C: In function ‘int main(int, char**)’: t.C:12: warning: array subscript is above array bounds ? Seriously, there is too many code around modifying the induction variable in a