From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19671 invoked by alias); 5 Dec 2017 16:29:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 19661 invoked by uid 89); 5 Dec 2017 16:29:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:static. X-HELO: mail-wm0-f51.google.com Received: from mail-wm0-f51.google.com (HELO mail-wm0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Dec 2017 16:29:56 +0000 Received: by mail-wm0-f51.google.com with SMTP id g130so19695283wme.0 for ; Tue, 05 Dec 2017 08:29:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=xzxehlrmefFMrKc7J2f3GLmAxcyXAe5Gk5WmxeI1w3s=; b=bfbvDcSeUvDvcOZA61vyYmusmL9DXqAmRYEj+iaCVak/SdYJ4rM8pjgczSsE+BTNZD 7b7omC2xsyve8r2EXwo2p5qSIZx+T+z4bJqXua3A54oG/+PBKfxQTFAbI97pyBHCI5+J BX2tpxMNN4InhjYZ7ELmwy94nCyrgbw2dciHp1oH0HKY2+p7sAtB9l0WhcYKozggFexT 8LmoQFiZPX47w5hSlgBR/jkl5gIfGB1EV4wXP/LC/QyNlhVyQVtINLPIC+lQRtQueKw2 GTOvbxfUjki167ovucglzHqtGqADR1v7ppfjsVRsKbOpIsaSdZtLLZIeazzZ21y6eiyC GZyg== X-Gm-Message-State: AKGB3mJCPXHI1hfVh9v7r3ZktJMzNvLlsNuT/McGxf0DWAKdVV6Saeqw Bji56CQOehIMfy2iQynQLSEWDA== X-Google-Smtp-Source: AGs4zMaEbIUdqxtJoy7Chol8/+rwaesvawgjWPxzSoOl1iY6X8VcP6Y7rwth4ap50a1mieH3lBCuUA== X-Received: by 10.28.13.145 with SMTP id 139mr6436878wmn.24.1512491393831; Tue, 05 Dec 2017 08:29:53 -0800 (PST) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id 34sm591370wra.39.2017.12.05.08.29.52 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 05 Dec 2017 08:29:53 -0800 (PST) From: Yao Qi To: Simon Marchi Cc: Subject: Re: [PATCH] Replace gdb_static_assert with static_assert References: <1512422710-26693-1-git-send-email-simon.marchi@ericsson.com> Date: Tue, 05 Dec 2017 16:29:00 -0000 In-Reply-To: <1512422710-26693-1-git-send-email-simon.marchi@ericsson.com> (Simon Marchi's message of "Mon, 4 Dec 2017 16:25:10 -0500") Message-ID: <86shcpp280.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00108.txt.bz2 Simon Marchi writes: > gdb/ChangeLog: > > * common/gdb_assert.h: Remove. * common/gdb_assert.h (gdb_static_assert): Remove. because you don't remove this file. > -/* A static assertion. This will cause a compile-time error if EXPR, > - which must be a compile-time constant, is false. */ > - > -#define gdb_static_assert(expr) \ > - extern int never_defined_just_used_for_checking[(expr) ? 1 : -1] Did you consider define gdb_static_assert as static_assert ((expr), "")? You don't have to change anywhere else. Additionally, one day we move to c++17, we can replace gdb_static_assert with static_assert globally. --=20 Yao (=E9=BD=90=E5=B0=A7)