Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <536BB69D-6E93-4E32-8303-16D92E07D8AA@oracle.com>
Date: Wed, 23 Jan 2019 06:21:44 -0700
From: William Kucharski <william.kucharski@...cle.com>
To: Jann Horn <jannh@...gle.com>
Cc: Greg KH <gregkh@...uxfoundation.org>, Kees Cook <keescook@...omium.org>,
        kernel list <linux-kernel@...r.kernel.org>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Laura Abbott <labbott@...hat.com>,
        Alexander Popov <alex.popov@...ux.com>,
        xen-devel <xen-devel@...ts.xenproject.org>,
        dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
        intel-wired-lan <intel-wired-lan@...ts.osuosl.org>,
        Network Development <netdev@...r.kernel.org>,
        linux-usb@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Linux-MM <linux-mm@...ck.org>, dev@...nvswitch.org,
        linux-kbuild@...r.kernel.org,
        linux-security-module <linux-security-module@...r.kernel.org>,
        Kernel Hardening <kernel-hardening@...ts.openwall.com>
Subject: Re: [PATCH 1/3] treewide: Lift switch variables out of switches



> On Jan 23, 2019, at 5:09 AM, Jann Horn <jannh@...gle.com> wrote:
> 
> AFAICS this only applies to switch statements (because they jump to a
> case and don't execute stuff at the start of the block), not blocks
> after if/while/... .

It bothers me that we are going out of our way to deprecate valid C constructs
in favor of placing the declarations elsewhere.

As current compiler warnings would catch any reference before initialization
usage anyway, it seems like we are letting a compiler warning rather than the
language standard dictate syntax.

Certainly if we want to make it a best practice coding style issue we can, and
then an appropriate note explaining why should be added to
Documentation/process/coding-style.rst.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.