diff mbox

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

Message ID 4CA1583F.1080402@codesourcery.com
State New
Headers show

Commit Message

Jie Zhang Sept. 28, 2010, 2:51 a.m. UTC
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?

Comments

Mark Mitchell Sept. 28, 2010, 2:47 p.m. UTC | #1
On 9/27/2010 7:51 PM, Jie Zhang wrote:

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

OK.
Jie Zhang Sept. 28, 2010, 3:10 p.m. UTC | #2
On 09/28/2010 10:47 PM, Mark Mitchell wrote:
> On 9/27/2010 7:51 PM, Jie Zhang wrote:
>
>> Adding -fno-short-enums in gcc.dg/Wcxx-compat-12.c would silence these
>> warnings and make it test what intended.
>
> OK.
>
Committed on trunk. Thanks.
diff mbox

Patch


	* 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 };