This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[testsuite] Add -fno-short-enums in gcc.dg/Wcxx-compat-12.c
- From: Jie Zhang <jie at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 28 Sep 2010 10:51:43 +0800
- Subject: [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 };