Closed Bug 135796 Opened 22 years ago Closed 11 years ago

warn about use of uninitialized iterators

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: timeless, Assigned: jag+mozilla)

Details

nsACString::const_iterator A,B,C;
searchable.BeginReading(A);
searchable.EndReading(C);

while (B != C) ++B;

ok, so what we have here is some condensed buggy code.

anyone who isn't the author or compiler will read it and quickly note that B is never initialized.

What I'm asking for is a debug warning/assert to complain about the use of an uninitialized iterator.
QA Contact: scc → string
char* is the new iterator and the compiler can warn about that one. WONTFIX.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.