Subject: Re: CVS commit: src/sbin/fsck
To: Simon Burge <simonb@NetBSD.org>
From: Christos Zoulas <christos@zoulas.com>
List: source-changes
Date: 12/15/2006 08:54:49
On Dec 15,  1:19pm, simonb@NetBSD.org (Simon Burge) wrote:
-- Subject: Re: CVS commit: src/sbin/fsck

| Tom Spindler wrote:
| 
| > > > Sprinkle volatile, instead of using the (void)&foo; which does not work on
| > > > gcc 4.
| > > 
| > > Doesn't "volatile" cause the compiler to constantly load/store
| > > those variables to the stack all the time instead of just keeping
| > > them in registers if it can?  In other words, we now take a
| > > performance hit just to shut up some gcc warnings?
| > 
| > Personally, I'd like to see the case where the cpu hit for vfstype,
| > or the option parsing, is measurable compared to the time used in
| > waiting for the device you're fscking.
| 
| Specifically for fsck, this obviously shouldn't be an issue.  But as a
| general fix for compiler warnings, I think it's a big step in the wrong
| direction.

What do you mean? You have a function calling setjmp(), longjmp(), vfork()
which are known to have an unorthodox flow control and the compiler is
warning you about the possibility of some variables on the stack being
clobbered? How do you suggest that we should fix them?

christos