Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYbIq-0003m7-Qb for pgsql-hackers@arkaria.postgresql.org; Tue, 12 May 2020 20:15:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYbIp-0002yz-No for pgsql-hackers@arkaria.postgresql.org; Tue, 12 May 2020 20:14:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYbIp-0002wT-An for pgsql-hackers@lists.postgresql.org; Tue, 12 May 2020 20:14:59 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jYbIl-00033I-BG for pgsql-hackers@lists.postgresql.org; Tue, 12 May 2020 20:14:57 +0000 Received: by mail-qk1-x743.google.com with SMTP id 190so9485968qki.1 for ; Tue, 12 May 2020 13:14:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=RTANc2t77vsRjJAoN3WfkxCYwUBPnRPNDEe4jQmoqe0=; b=xEWukDDWqSwfbWT71paQmfC4xD6AM4FPhBp4ci90mcuqIrYlXFi8/lXvywiBHxDFL6 Mg5RLDq3jcR/lq59wCNkl+ypGBJc821AD1fpcPz34wIaDLolTon24Kg8Ugtf5G5kTXQF lHzHksBDCfp0ratu3kHZtH1o9+K4tGT/q0so5cvfApoavXV1NdUkXSv7A2srGZJ7WSDJ U/YhTbfI60m0JcitnkW1OkjQAwztK0RBk61phNlhhlRxkqHwhCdA7bzl8TqdAkEyd5iS obJ1ku9DcLNUJI7lz7BB4ZyKFw3Nu+KYaRAT9Um2XGKq7tv6DaRmOElrpu85DJ99faOK rXqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=RTANc2t77vsRjJAoN3WfkxCYwUBPnRPNDEe4jQmoqe0=; b=m6rDVRTFaFQSaoSpDaeTxzhVmg/KIf1UO8N7+CbhtD4Lhtbgf5fj9GkDg3UrWn/t3z c95bjlGidxSEPwtSeXSxYlEvt9MzsjizoOPkcHl1C69GXjShZNo4xcQBeTS54KAU+Ucl lGV4Z2eYSJvNweexZyVODMEEKDFppDT/QqwvuxAwZzC7CEoJbTyoxxygPsvssyqr8MD0 /I2RPo2Mt+ScWMrOSQL32WdPV9TBO2HwMmj9QZ/KN+QttfrrXf+1LMAKa0hr3e2tCjQG 06HkKRahKdqmSgYJ0+lKk3rsJqAf5vcmFnrJwb3Vgy3nbJCVS9rk/5UXRIGkzLR3+lQ7 Oh8Q== X-Gm-Message-State: AGi0PuYDcegVtY7VQMf3QK5qZQJaktZJgdZMTMfqHKf+usHbCP8qPAbX 9TaO1fobiZzodpXW/kxZ4FmOGw== X-Google-Smtp-Source: APiQypIh/86tJGfoLU++zpqAsAUx2BuhkYmitczLKANotlQy8ahst1apByXEc1sfL7wWnsQUWOY0HA== X-Received: by 2002:a05:620a:1326:: with SMTP id p6mr24344620qkj.373.1589314494357; Tue, 12 May 2020 13:14:54 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id g1sm11995714qkm.123.2020.05.12.13.14.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 13:14:53 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id A33133005C2; Tue, 12 May 2020 16:14:51 -0400 (-04) Date: Tue, 12 May 2020 16:14:51 -0400 From: Alvaro Herrera To: Julien Rouhaud Cc: Tom Lane , PostgreSQL Hackers Subject: Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql: Support FETCH FIRST WITH TIES) Message-ID: <20200512201451.GA6186@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-May-11, Julien Rouhaud wrote: > On Mon, May 11, 2020 at 4:40 PM Tom Lane wrote: > > > > Julien Rouhaud writes: > > > On Mon, May 11, 2020 at 3:41 PM Tom Lane wrote: > > >> Why? It uses "fallthrough" which is a legal spelling per level 4. > > > > > GCC documentation mentions [ \t]*FALLTHR(OUGH|U)[ \t]* for level 4 > > > (out of the view other alternatives), which AFAICT is case sensitive > > > (level 3 has fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?). > > > > Oh, I'd missed that that was case sensitive. Ugh --- that seems > > unreasonable. Maybe we'd better settle for level 3 after all; > > I don't think there's much room to doubt the intentions of a > > comment spelled that way. > > Agreed. Pushed, thanks. I ended up using level 4 and dialling back to 3 for zic.c only (different make trickery though). I also settled on FALLTHROUGH rather than FALLTHRU because the latter seems ugly as a spelling to me. I'm not a fan of the uppercase, but the alternative would be to add a - or @s. I get no warnings with this (gcc 8), but ccache seems to save warnings in one run so that they can be thrown in a later one. I'm not sure what to make of that, but ccache -d proved that beyond reasonable doubt and ccache -clear got rid of the lot. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services