On Wed, Jun 6, 2018 at 10:47 AM, Jason Merrill <ja...@redhat.com> wrote: > If we're going to allow it with a pedwarn, we shouldn't clobber the > decl with an error_mark_node. > > Tested x86_64-pc-linux-gnu, applying to trunk and 8.
I got /export/gnu/import/git/gcc-test/src-8/gcc/testsuite/g++.dg/cpp0x/range-for9.C:8:18: error: range-based 'for' loops only available with -std=c++11 or -std=gnu++11^M /export/gnu/import/git/gcc-test/src-8/gcc/testsuite/g++.dg/cpp0x/range-for9.C:8:18: error: forming reference to reference type 'int (&)[3]'^M compiler exited with status 1 PASS: g++.dg/cpp0x/range-for9.C -std=c++98 (test for errors, line 8) FAIL: g++.dg/cpp0x/range-for9.C -std=c++98 (test for excess errors) Excess errors: /export/gnu/import/git/gcc-test/src-8/gcc/testsuite/g++.dg/cpp0x/range-for9.C:8:18: error: forming reference to reference type 'int (&)[3]' -- H.J.