On Fri, Aug 16, 2024 at 02:58:05PM +0200, Torbjörn SVENSSON wrote: > Ok for trunk and releases/gcc-14? > > -- > > For some targets, like Cortex-M on arm-none-eabi, the -fshort-enums is > enabled by default. For these targets, the test case fails as > sizeof(Alpha) < sizeof(int). > To make the test case bahave identical for targets that does enable > -fshort-enums and those that does not, force the option in the test > case and verify that the warning is emitted. > > Regtested on x86_64-pc-linux-gnu and arm-none-eabi. > > gcc/testsuite/ChangeLog: > > * g++.dg/warn/pr33738.C: Added -fshort-enums and removed xfail.
That looks wrong, what the test tested is no longer tested on most arches. Better would be to use -fno-short-enums explicitly, and add another test which #includes (or copies over) this test and has -fshort-enums and tests what happens in that case. > > Signed-off-by: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com> Jakub