[Bug c++/69784] Range-based for loop can't handle same variable name in range declaration and in range expression

2016-02-12 Thread oszi at inf dot u-szeged.hu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69784 --- Comment #3 from Csaba Osztrogonác --- In WebKit project we had to submitted at least 2 workarounds due to this bug: - https://bugs.webkit.org/show_bug.cgi?id=151622 - https://bugs.webkit.org/show_bug.cgi?id=154162 ( side note: clang builds t

[Bug c++/69784] Range-based for loop can't handle same variable name in range declaration and in range expression

2016-02-12 Thread oszi at inf dot u-szeged.hu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69784 --- Comment #2 from Csaba Osztrogonác --- If we explicitly add the type of element, we get a different error: main.cpp:10:18: error: ‘begin’ was not declared in this scope for (int i : i) ^ main.cpp:10:18: note: suggested

[Bug c++/69784] Range-based for loop can't handle same variable name in range declaration and in range expression

2016-02-12 Thread oszi at inf dot u-szeged.hu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69784 Csaba Osztrogonác changed: What|Removed |Added Summary|Range-based for loop can|Range-based for loop can't

[Bug c++/69784] New: Range-based for loop can

2016-02-12 Thread oszi at inf dot u-szeged.hu
: unassigned at gcc dot gnu.org Reporter: oszi at inf dot u-szeged.hu Target Milestone: --- #include #include using namespace std; int main() { array i = {1,2,3,4,5}; for (auto& i : i) { cout << i <