From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99989 invoked by alias); 9 Feb 2018 14:19:24 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 99974 invoked by uid 89); 9 Feb 2018 14:19:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*mark, H*r:sk:27.2018 X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail-io0-f170.google.com Received: from mail-io0-f170.google.com (HELO mail-io0-f170.google.com) (209.85.223.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Feb 2018 14:19:22 +0000 Received: by mail-io0-f170.google.com with SMTP id x188so3233585iod.1 for ; Fri, 09 Feb 2018 06:19:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:subject:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=JDIQY1ALHbhGMz5uRP4QA2K8ZIl02HZldoEUyphR2aQ=; b=TXLx7Bcqk5KisLbXWtav1ZBZ/EA0CuHhEdpfeFxUYdc4F+rC8cSTMwL2Wc6h46/vs2 sYYmB3jiQ/JhdPiap1a1UJTILhjkTU4/GMcUJULEGEx1KebPm+cpgTIYwyt5N2njOgbe rG0lMNmK94kYONVQHHvTzA+4N2xzb6N1BHlfEX/JWl0DN+K2dS6pjHusTJCoTY9IG4Lf II32wj9fcVHJglrcYvSwZU2qUOatZwqW9krDhe8iauEZZB2pOSKFjEEq5x0arM1m98qR cClVCCPoPdjyutC2NAKLWwrWvlb+MqAo52zQawGrTgl/VO6kSbOxiZBhR/Rb0UO12x2N R3GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:subject:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=JDIQY1ALHbhGMz5uRP4QA2K8ZIl02HZldoEUyphR2aQ=; b=WCOppdi7iE0FBUYqJJ1uA9qeTE4KwneYoa11PHBf/T/yjh4CrxeOvu6o6SI/7qirYJ wsUNvjmCm6aSrcbnOwnz55tjgNG7m/G4rlTbSPivzG/oxdwIQ0dsoCWJJJ1oeo6OOLX3 b7Qa2vKSzWXAH4cIsndEpAze5kaEudMurmeAVlS99y6f79NfcPymHzxhcwCY9CmtZpEG 5r7bXsX0WCq2SWq/hiPBhL6kSL36+KFXeD19hWelTkKpDaKozWqhpOj760dFZAvGZvo5 2uMoPqtPEJEBdXFx4Sd26I8s39EFyWDT6WbmVTEP7Fsd2doRNBsXGyDXxYexfaWUOK7Q i/eQ== X-Gm-Message-State: APf1xPBTJGBmzPcbo8+hw4LLQyJb6byZ/Aylqm2SIU8HQJL9S6UDAtok Ur5fzF6GlV2Rx/w9pSTKZjI= X-Google-Smtp-Source: AH8x227MRkMqfhzmN/wU5cNlAhFZ7m92nFTQS6WGZZF/9106LBChEDDZDjtrWKDKuAinbjB3dVgt6A== X-Received: by 10.107.175.148 with SMTP id p20mr3278424ioo.146.1518185960752; Fri, 09 Feb 2018 06:19:20 -0800 (PST) Received: from ola-842mrw1.ad.garmin.com ([204.77.163.55]) by smtp.googlemail.com with ESMTPSA id c13sm3529652itd.27.2018.02.09.06.19.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Feb 2018 06:19:20 -0800 (PST) From: Joshua Watt X-Google-Original-From: Joshua Watt Message-ID: <1518185959.3509.34.camel@gmail.com> Subject: Re: [PATCH v2] Add fallthrough attributes To: Mark Wielaard , Ulf Hermann Cc: elfutils-devel@sourceware.org Date: Fri, 09 Feb 2018 14:19:00 -0000 In-Reply-To: <20180209092655.GB3320@wildebeest.org> References: <20180208225646.12036-1-JPEWhacker@gmail.com> <20180208233010.11395-1-JPEWhacker@gmail.com> <20180209092655.GB3320@wildebeest.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.2 (3.26.2-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-q1/txt/msg00026.txt.bz2 On Fri, 2018-02-09 at 10:26 +0100, Mark Wielaard wrote: > On Fri, Feb 09, 2018 at 10:08:09AM +0100, Ulf Hermann wrote: > > > [...] > > > +#ifdef HAVE_FALLTHROUGH > > > + __attribute__ ((fallthrough)); > > > +#endif > > > [...] > > > > I would like to see this stanza wrapped in a macro, so that we only > > have one "#ifdef HAVE_FALLTHROUGH" in the code, not another one in > > every place we want to fall through. See the "internal_function" > > macro defined in lib/eu-config.h for a similar case. > > Agreed. Having 4 lines for a fallthrough instead of 1 is really too > much. Also could you explain a bit more why you would like this? > The advantage of the comments really is that they should work > everywhere. I'm attempting to build Yocto using Icecream to do distributed compiling. Icecream pre-processes the file before sending it to the remote compiling node, thus removing the comments and triggering the error. There is a fix in Icecream to allow it to not remove comments when pre- processing, but it will be a while before that change (which hasn't been released yet) trickles down to all the end Icecream users. I figured making the change here wouldn't hurt in the meantime. > > If the comment really doesn't work in your situation maybe we could > do > like gnulib did: > http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=11fdf80b21f2b4 > 0a10687b9a3d16c852b19d512c > > The idea is that those versions of GCC that support > -Wimplicit-fallthrough also have support for the __attribute__ > ((fallthrough)) statement. So they can always be used together. Yes, that is cleaner and makes more sense. I will change my patch to do that. Thanks, Joshua Watt > > Cheers, > > Mark