<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jul 11, 2015 at 1:25 AM, Manasij Mukherjee <span dir="ltr"><<a href="mailto:manasij7479@gmail.com" target="_blank">manasij7479@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hi</div><div><div>Clang and MSVC accepts the following code.</div><div>But I get </div><div><span style="color:rgb(51,51,51);font-family:Monaco,Menlo,Consolas,'Courier New',monospace;font-size:13px;line-height:20px;white-space:pre-wrap">error: use of 'x' before deduction of 'auto'</span></div><div>with GCC (5.1, C++14 enabled)</div></div><div><br></div><div>int main() {</div><div>  int x[] = {1,2,3,4,5};</div><div>  for (auto x : x) {</div><div>  }</div><div>}</div><div><br></div><div>Thanks,</div><div>Manasij Mukherjee</div></div>
</blockquote></div><br></div><div class="gmail_extra">This is a longstanding bug in GCC (and arguably the wrong mailing list for a GCC-centric question).</div><div class="gmail_extra"><br></div><div class="gmail_extra">See <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__gcc.gnu.org_bugzilla_show-5Fbug.cgi-3Fid-3D54430&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=snjR89QUQN6r89jnD7dtlDhnGbFoSUuAU4RhViwGQd0&s=fRUwVNrb7Bk84-gKBf8tj_umEXjTpWaVg3Lqlw5_4M0&e=">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54430</a> for the bug's history.</div><div class="gmail_extra"><br></div><div class="gmail_extra">-- James</div><div class="gmail_extra"><br></div></div>