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 1jYbT2-0004Ch-La for pgsql-hackers@arkaria.postgresql.org; Tue, 12 May 2020 20:25:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYbT1-0000nj-Hi for pgsql-hackers@arkaria.postgresql.org; Tue, 12 May 2020 20:25:31 +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 1jYbT1-0000mA-Ay for pgsql-hackers@lists.postgresql.org; Tue, 12 May 2020 20:25:31 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jYbSy-0001JM-OW for pgsql-hackers@lists.postgresql.org; Tue, 12 May 2020 20:25:30 +0000 Received: by mail-qt1-x841.google.com with SMTP id c24so5868088qtw.7 for ; Tue, 12 May 2020 13:25:28 -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=Bjr0xZAdAB6iwxEosd7RxhjqRKNUwv5c9HdVJG3Tnp8=; b=vmO4Lf++Q6W1xSr7eeoFIpkCUZHOBK9SvkPjQo7TDJjVGbRCtQmXnprh7Xhqdqe9HX ObICJ9aC0WvoxLrI7hcf8J8edmpKxm7TY+kX8xBdHsT2f6hRK9FWls6wDnwwTKtI3GL5 dXR4XU/kTkvgzcs5U7OrltyfBsXnAqETxSDpxtgo9RzNzO35ioULhjoRvn9pJuAVNcF9 7xn0V14cjz1VqQyp8iP15T57hFx0g+nfm96c5j5Z4WMIUkva/9SBvCqyhbf2lGZD/faD umni9AMJs3TeA7kYMos/sCOR977cpNUmyTM8gChlBLzMyekPTUhN/Ax0d8IUf5Hoa5Gr cC0A== 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=Bjr0xZAdAB6iwxEosd7RxhjqRKNUwv5c9HdVJG3Tnp8=; b=T0H5siHZpvXTB/kv5cSDUvrF7ttosql6t0xvciVPl/LkHion0zYjjXvleu96Z5Vmv5 VcASFOlB2rtztmTzTQfoLOvlRTp8vCOhkGJ6SFYIgGZAcnZJyIr/bbZfyuZAiVMbvvrv k1qBN7rWwXMz9Y66h8QkwjiVVXiOr5ttOvbYAfDS3X8QPr2cTpPzEArxATRBzdW3BJFF DE14LQ5VJrMtdjE99JMKNAhNTbFtdpEKaYYN0kgmBqV0j81mJ8GKGioBgt49QovQ6MtM IGvXxRQEBXR6YhOz37txvaezMgY8wpFn9gaaGFxG7G6Jiu4bJ28pju3q6VALuWhUU5cV 6Bhg== X-Gm-Message-State: AOAM533zeOezCkCNvr9Uzq9kusq+v0MxjNNFK6/1XedRA2qPgPDD06Qs majvLemEkGKxyhQPMHJFWEvZoA== X-Google-Smtp-Source: ABdhPJwAF8ZxWaKED6FWWVKONmJkjfIGWxf3vRhsiTspIQJFGp3aAipPqOMmTv+lCiKpvOcogM1npQ== X-Received: by 2002:ac8:5191:: with SMTP id c17mr5967914qtn.79.1589315126865; Tue, 12 May 2020 13:25:26 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id l184sm1675519qkf.84.2020.05.12.13.25.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 13:25:26 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 59B643005C2; Tue, 12 May 2020 16:25:24 -0400 (-04) Date: Tue, 12 May 2020 16:25:24 -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: <20200512202524.GA30825@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200512201451.GA6186@alvherre.pgsql> 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-12, Alvaro Herrera wrote: > 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. Fixed one straggler in contrib, and while testing it I realized why ccache doesn't pay attention to the changes I was doing in the file: ccache compares the *preprocessed* version of the file and only if that differs from the version that was cached last, ccache sends the new one to the compiler; and of course these comments are not present in the preprocessed version, so changing only the comment accomplishes nothing. You have to touch one byte outside of any comments. I bet this is going to bite someone ... maybe we'd be better off going all the way to -Wimplicit-fallthrough=5 and use the __attribute__((fallthrough)) stuff instead. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services