Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Apr 2002 17:51:36 -0700 (MST)
From:      "M. Warner Losh" <imp@village.org>
To:        dillon@FreeBSD.org
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/i386 critical.c src/sys/i386/include cpufunc.h critical.h src/sys/i386/isa apic_vector.s icu_vector.s src/sys/kern kern_fork.c kern_proc.c kern_switch.c src/sys/alpha/alpha critical.c src/sys/alpha/include cpufunc.h ...
Message-ID:  <20020401.175136.106024419.imp@village.org>
In-Reply-To: <200204012351.g31NpO890339@freefall.freebsd.org>
References:  <200204012351.g31NpO890339@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200204012351.g31NpO890339@freefall.freebsd.org>
            Matt Dillon <dillon@FreeBSD.org> writes:
:   Note: In general, developers should not gratuitously move declarations out
:   of sub-blocks.  They are where they are for reasons of structure, grouping,
:   readability, compiler-localizability, and to avoid developer-introduced bugs
:   similar to several found in recent years in the VFS and VM code.

Yes.  Style(9) says don't do this unless the code is really complicated:

     Parts of a for loop may be left empty.  Do not put declarations inside
     blocks unless the routine is unusually complicated.

I suspect that the stuff you are working on is complicated enough to
justify their use.  Style(9) doesn't say never do this.

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020401.175136.106024419.imp>