Community
Participate
Working Groups
An assignment inside an if statement seems to be parsed incorrectly when the right-hand side of the assignment is a call to a template function, and the if statement itself occurs in a template function: template <int> void* foo(int); template <typename T> void f(T t) { if (T* i = foo<0>(0)) // ERROR HERE return 0; } The error on the indicated line is: "Symbol 'i' could not be resolved" The code compiles just fine with GCC.
Thanks! Added testcase and fix.
*** cdt git genie on behalf of Markus Schorn *** Bug 362976: Directly nested ambiguity node. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=0ebca71a1d033d48e706a847f113a4c8c86951de
*** Bug 353265 has been marked as a duplicate of this bug. ***