[Bug c++/38335] New: Code warning

2008-11-30 Thread adam dot c dot scott at gmail dot com
Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: adam dot c dot scott at gmail dot com GCC build triplet: dmd GCC

[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). Example

[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