From patchwork Tue Sep 28 02:51:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhang X-Patchwork-Id: 65932 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id EF768B6F07 for ; Tue, 28 Sep 2010 12:51:54 +1000 (EST) Received: (qmail 25863 invoked by alias); 28 Sep 2010 02:51:51 -0000 Received: (qmail 25845 invoked by uid 22791); 28 Sep 2010 02:51:50 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Sep 2010 02:51:45 +0000 Received: (qmail 24264 invoked from network); 28 Sep 2010 02:51:43 -0000 Received: from unknown (HELO ?192.168.1.106?) (jie@127.0.0.2) by mail.codesourcery.com with ESMTPA; 28 Sep 2010 02:51:43 -0000 Message-ID: <4CA1583F.1080402@codesourcery.com> Date: Tue, 28 Sep 2010 10:51:43 +0800 From: Jie Zhang User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100918 Icedove/3.1.4 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: [testsuite] Add -fno-short-enums in gcc.dg/Wcxx-compat-12.c X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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? * 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 };