This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH for c++/86060, c++98 ICE with range for


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]