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]

[testsuite] Add -fno-short-enums in gcc.dg/Wcxx-compat-12.c


Some targets, like some ARM targets, default to -fshort-enums. For such targets, GCC doesn't report expected warnings for gcc.dg/Wcxx-compat-12.c. Instead it reports:

gcc.dg/Wcxx-compat-12.c:7:19: warning: initialization from incompatible pointer type
gcc.dg/Wcxx-compat-12.c:10:23: warning: initialization from incompatible pointer type


Adding -fno-short-enums in gcc.dg/Wcxx-compat-12.c would silence these warnings and make it test what intended.

OK?


-- Jie Zhang CodeSourcery
	* gcc.dg/Wcxx-compat-12.c: Add -fno-short-enums.

Index: gcc.dg/Wcxx-compat-12.c
===================================================================
--- gcc.dg/Wcxx-compat-12.c	(revision 164675)
+++ gcc.dg/Wcxx-compat-12.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Wc++-compat" } */
+/* { dg-options "-fno-short-enums -Wc++-compat" } */
 
 enum E { A };
 

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