From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10191 invoked by alias); 9 Jul 2019 17:36:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 10176 invoked by uid 89); 9 Jul 2019 17:36:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Jul 2019 17:36:21 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 94D80307D88C for ; Tue, 9 Jul 2019 17:36:18 +0000 (UTC) Received: from redhat.com (unknown [10.20.4.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 94D7E5FCA5; Tue, 9 Jul 2019 17:36:15 +0000 (UTC) Date: Tue, 09 Jul 2019 17:48:00 -0000 From: Marek Polacek To: Matthew Beliveau Cc: gcc-patches@gcc.gnu.org, Jason Merrill Subject: Re: [C++ PATCH] PR c++/90590 Suppress warning for enumeration value not handled in switch warning Message-ID: <20190709173613.GC5989@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-SW-Source: 2019-07/txt/msg00721.txt.bz2 On Tue, Jul 09, 2019 at 11:18:53AM -0400, Matthew Beliveau wrote: > index 00000000000..8aa65cf0afd > --- /dev/null > +++ gcc/testsuite/c-c++-common/pr90590-2.c > @@ -0,0 +1,8 @@ > +#include "pr90590-2.h" > + > +void > +fn () > +{ > + switch (c.b) // { dg-bogus "enumeration value" } > + ; > +} I suppose this test should also have // PR c++/90590 // { dg-options -Wswitch } because without -Wswitch the warning wouldn't trigger in any case. Marek