Message ID | 20210428010119.806184-14-tom@tromey.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=GrBxepsh; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FVL384zzZz9sWc for <incoming@patchwork.ozlabs.org>; Wed, 28 Apr 2021 11:03:00 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2B2A539D68AC; Wed, 28 Apr 2021 01:01:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from gateway20.websitewelcome.com (gateway20.websitewelcome.com [192.185.65.13]) by sourceware.org (Postfix) with ESMTPS id 9808139B8C18 for <gcc-patches@gcc.gnu.org>; Wed, 28 Apr 2021 01:01:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9808139B8C18 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 181D8400ED506 for <gcc-patches@gcc.gnu.org>; Tue, 27 Apr 2021 19:50:20 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id bYaFlqT0UL7DmbYaFlsbCm; Tue, 27 Apr 2021 20:01:43 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=zk7s0REWR+Jm74Nkr4BSGxO++Kn9SwMnMIBAiHK9r90=; b=GrBxepshuIiE05Xo3Aq+U7gRtG 0sSKnZ7/lPQFKNe2xv9lkCUELtMnjKsJL9Qa3WaSrQzOCBM3BU0A05LvaZwmvLl3BtSiNvMfJf7yF ukaFLzFAHKpPtnLa61e70clBd; Received: from 97-122-70-176.hlrn.qwest.net ([97.122.70.176]:32966 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from <tom@tromey.com>) id 1lbYaE-003tiR-Px; Tue, 27 Apr 2021 19:01:42 -0600 From: Tom Tromey <tom@tromey.com> To: gcc-patches@gcc.gnu.org Subject: [PATCH v2 13/21] libcc1: use static_assert Date: Tue, 27 Apr 2021 19:01:11 -0600 Message-Id: <20210428010119.806184-14-tom@tromey.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210428010119.806184-1-tom@tromey.com> References: <20210428010119.806184-1-tom@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.70.176 X-Source-L: No X-Exim-ID: 1lbYaE-003tiR-Px X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-70-176.hlrn.qwest.net (localhost.localdomain) [97.122.70.176]:32966 X-Source-Auth: tom+tromey.com X-Email-Count: 14 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3031.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, URIBL_CSS, URIBL_CSS_A autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Cc: Tom Tromey <tom@tromey.com> Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces@gcc.gnu.org> |
Series |
C++11-based improvements for libcc1
|
expand
|
On 4/27/2021 7:01 PM, Tom Tromey wrote: > This changes one spot in libcc1 to use static_assert rather than the > old-style array declaration. > > libcc1/ChangeLog > 2021-04-27 Tom Tromey <tom@tromey.com> > > * libcp1plugin.cc: Use static assert. OK jeff
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index 3cbad5c6f021..ba6c5ef2efce 100644 --- a/libcc1/libcp1plugin.cc +++ b/libcc1/libcp1plugin.cc @@ -82,8 +82,8 @@ int plugin_is_GPL_compatible; -static int ATTRIBUTE_UNUSED -check_symbol_mask[GCC_CP_SYMBOL_MASK >= GCC_CP_SYMBOL_END ? 1 : -1]; +static_assert (GCC_CP_SYMBOL_MASK >= GCC_CP_SYMBOL_END, + "GCC_CP_SYMBOL_MASK >= GCC_CP_SYMBOL_END"); // This is put into the lang hooks when the plugin starts.