From owner-cvs-all Wed Feb 27 11: 8: 6 2002 Delivered-To: cvs-all@freebsd.org Received: from mail-blue.research.att.com (mail-blue.research.att.com [135.207.30.102]) by hub.freebsd.org (Postfix) with ESMTP id 3E37C37B400; Wed, 27 Feb 2002 11:07:57 -0800 (PST) Received: from alliance.research.att.com (alliance.research.att.com [135.207.26.26]) by mail-blue.research.att.com (Postfix) with ESMTP id 9418B4CE5F; Wed, 27 Feb 2002 14:07:52 -0500 (EST) Received: from windsor.research.att.com (windsor.research.att.com [135.207.26.46]) by alliance.research.att.com (8.8.7/8.8.7) with ESMTP id OAA18120; Wed, 27 Feb 2002 14:07:52 -0500 (EST) From: Bill Fenner Received: (from fenner@localhost) by windsor.research.att.com (8.8.8+Sun/8.8.5) id LAA08891; Wed, 27 Feb 2002 11:07:52 -0800 (PST) Message-Id: <200202271907.LAA08891@windsor.research.att.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII To: julian@elischer.org Subject: Re: cvs commit: src/sys/dev/usb ohci.c uhci.c Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org Date: Wed, 27 Feb 2002 11:07:52 -0800 Versions: dmail (solaris) 2.3/makemail 2.9b Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >maybe a comment may stall that.. This is a relatively harmless instance; /* this should be for(x;y;z) except gcc sucks */ but what about when it requires completely rearchitecting the code to silence the buggy compiler? I wish I could find this example, but I only noted it and said "ugh" and moved on -- when comparing our code with that of another project, they had completely rewritten some very straightforward code that looked more or less like: switch (x) { case foo: fmt = "%s foo"; break; case bar: fmt = "%s bar"; break; } printf(fmt, bletch); (but many more cases and many more printf arguments) to include the printf in every case -- presumably to avoid warnings from a mechanical tool that "knew" that any non-constant format string was an opening for format string vulnerabilities. That change opened up lots of opportunities for cut'n'paste errors, maintenance problems if you wanted to change the printf argument list, etc -- for what benefit? I think asmodai said it quite succinctly: "compilers and related tools should facilitate the programming, the programming should not facilitate the compiler and tools." Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message