This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/86060, c++98 ICE with range for
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 7 Jun 2018 03:51:24 -0700
- Subject: Re: C++ PATCH for c++/86060, c++98 ICE with range for
- References: <CADzB+2=QbA=gknNfxzYzpmzyyWomEioLhNmVzVO1MwwhpywACQ@mail.gmail.com>
On Wed, Jun 6, 2018 at 10:47 AM, Jason Merrill <jason@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.