[cfe-dev] Is this valid code ?

Manasij Mukherjee manasij7479 at gmail.com
Sat Jul 11 01:25:03 PDT 2015


Hi
Clang and MSVC accepts the following code.
But I get
error: use of 'x' before deduction of 'auto'
with GCC (5.1, C++14 enabled)

int main() {
  int x[] = {1,2,3,4,5};
  for (auto x : x) {
  }
}

Thanks,
Manasij Mukherjee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150711/a0f089f5/attachment.html>


More information about the cfe-dev mailing list