[Bug middle-end/54299] Array parameter does not allow for iterator syntax

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Aug 17 15:43:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54299

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-08-17 15:43:02 UTC ---
It would be nice if G++ told you the type of the range, as Clang++ does:

a.cc:9:15: error: use of undeclared identifier 'begin'
  for (auto i : arr)
              ^
a.cc:9:15: note: range has type 'int *'



More information about the Gcc-bugs mailing list