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 1jWTdF-0007mh-Sn for pgsql-hackers@arkaria.postgresql.org; Wed, 06 May 2020 23:39:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jWTdE-0008Rk-Px for pgsql-hackers@arkaria.postgresql.org; Wed, 06 May 2020 23:39:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWTdE-0008Rd-CT for pgsql-hackers@lists.postgresql.org; Wed, 06 May 2020 23:39:16 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jWTdA-0001g0-QD for pgsql-hackers@lists.postgresql.org; Wed, 06 May 2020 23:39:15 +0000 Received: by mail-qk1-x743.google.com with SMTP id f13so4180594qkh.2 for ; Wed, 06 May 2020 16:39:12 -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=inzV7y0wI/S3N6zI60wU0RgO0Ygg/dxK+PiHm/HQzdo=; b=NGa9SudrO1jRRy7zzh66w57/1WuYdHIxFsBh6WG0S/sZlxBO9PEQNMYMN5zJCBDrrf gNkDx4J4iMWlVmXYZLbmF3jil0h1ueXYDoLODaOCbAqSd3NfVXPDC1LbvLJ7nGioP5Wf pDXTSplejWmxlPaX++0z6ggT5BTyqCwA/zN3+gu+1y+QpuADM+hHATtEzB7w9Kg3iA/a aDq1YpjlrRL0caFuuJxHMLxlKvznZoKcVBGJ/a4Y0FCucFCpkPJUVnGx9j0aTOKTRx8M c2avKKdWRpt8V4J+vaNFueDrlSK1DJQgWVVyUQ7NCgjwH2CwuSDBIzkLPKW0J1OwDSE6 YkvQ== 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=inzV7y0wI/S3N6zI60wU0RgO0Ygg/dxK+PiHm/HQzdo=; b=iJ71Ij0XwMAsC0cm09+9SNKeGhWlGymvvreUcTRGaNjCx/8iuMwjNbimUdCHw8lnoi whBjiVVcnLGbg7sTkfKzeVWL/ntQSefdC48A0A8H2JPOTRLMQCT0urdVyjLDjdH5CrHB j31T3cQLbeOd44glBgkdaWED5nKvM9A2rnhZzd5r8F0PDl5EwI7pv1UNdgQ+mcYlU8Y0 Zk/xSh0eKI2XR+YgtxbBeqOfYptaztnWD1y/OBMLWWP/PmDOGK5KTXIBiU3h8hyJwybC DukN86sI74v8CWUuGaeTZddhvjM+RHjAuPTKDfsF7scuna+W/xt6TLMDi3rBnZeNSBy2 ATvQ== X-Gm-Message-State: AGi0PubHl6CvJr4zaEqXYHYgwlqd/BAoOws356O/BRsFxFwHUeR2it0I hqnQ0NwxRJJKw/YmDVW9d+Q+iQ== X-Google-Smtp-Source: APiQypJnVN/BR8oQskCOY/bfbUT9brMGW97VSlNbAeJtWa9W33u/SMM22BimpVnmDuKTmzOmSArgAA== X-Received: by 2002:a37:aac5:: with SMTP id t188mr11431817qke.393.1588808346792; Wed, 06 May 2020 16:39:06 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id x19sm2742051qkb.136.2020.05.06.16.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 16:39:06 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 92EFE301FCF; Wed, 6 May 2020 19:39:03 -0400 (-04) Date: Wed, 6 May 2020 19:39:03 -0400 From: Alvaro Herrera To: Tom Lane Cc: Julien Rouhaud , pgsql-hackers@lists.postgresql.org Subject: Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql: Support FETCH FIRST WITH TIES) Message-ID: <20200506233903.GA24861@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <15010.1586703320@sss.pgh.pa.us> 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-Apr-12, Tom Lane wrote: > The only more-restrictive alternative, short of disabling > the comments altogether, is > > * -Wimplicit-fallthrough=4 case sensitively matches one of the > following regular expressions: > > *<"-fallthrough"> > *<"@fallthrough@"> > *<"lint -fallthrough[ \t]*"> > *<"[ \t]*FALLTHR(OUGH|U)[ \t]*"> > > Thoughts? This doesn't allow whitespace between "fall" and "through", which means we generate 217 such warnings currently. Or we can just use -Wimplicit-fallthrough=3, which does allow whitespace (among other detritus). For my own reference, the manual is at https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Warning-Options.html#index-Wimplicit-fallthrough -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services