On Mon, Jan 28, 2019 at 11:55:21AM -0500, Jason Merrill wrote: > > > The new test fails on arm-eabi (with newlib, but passes on on arm*linux*): > > > FAIL: g++.dg/cpp0x/enum37.C -std=c++14 (test for excess errors) > > > FAIL: g++.dg/cpp0x/enum37.C -std=c++17 (test for excess errors) > > > > > > The log says: > > > /gcc/testsuite/g++.dg/cpp0x/enum37.C:24:41: error: aggregate > > > 'same<unsigned int, unsigned char> s2' has incomplete type and cannot > > > be defined > > I imagine that this is because arm-eabi defaults to -fshort-enums; you > can check for this in the testsuite with { target short_enums }.
Indeed, I wasn't aware of this. > > Clearly the additional checking I added won't fly; Jason, can I commit > > this? > > > > Tested on x86_64-linux, ok for trunk? > > > > 2019-01-28 Marek Polacek <pola...@redhat.com> > > > > * g++.dg/cpp0x/enum37.C: Remove a check. > > I'd prefer to make the check conditional. In which case, this. I think it's better than making the whole test conditional on short_enums. Tested on x86_64-linux, ok for trunk? 2019-01-28 Marek Polacek <pola...@redhat.com> * g++.dg/cpp0x/enum37.C: Add dg-error. diff --git gcc/testsuite/g++.dg/cpp0x/enum37.C gcc/testsuite/g++.dg/cpp0x/enum37.C index 6aa3d4015d7..b67720d5ea0 100644 --- gcc/testsuite/g++.dg/cpp0x/enum37.C +++ gcc/testsuite/g++.dg/cpp0x/enum37.C @@ -21,4 +21,4 @@ enum E { }; same<E,decltype(x)> s; -same<unsigned int,__underlying_type(E)> s2; +same<unsigned int,__underlying_type(E)> s2; // { dg-error "incomplete type" "" { target short_enums } }