On Wed, 18 May 2022, Marek Polacek via Gcc-patches wrote:

> diff --git a/gcc/testsuite/gcc.dg/Wenum-int-mismatch-1.c 
> b/gcc/testsuite/gcc.dg/Wenum-int-mismatch-1.c
> new file mode 100644
> index 00000000000..f71a308bc19
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/Wenum-int-mismatch-1.c
> @@ -0,0 +1,35 @@
> +/* PR c/105131 */
> +/* { dg-do compile } */
> +/* { dg-options "-Wall" } */

Since some Arm targets default to -fshort-enums, I think it would be best 
for the tests to use -fno-short-enums or otherwise ensure the enums are 
compatible with the expected type, so that they test what's intended.  
Additional tests that don't use the -W options but #include the main tests 
might also be a good idea, to verify that all the types in the tests 
really are compatible as intended.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to