Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Apr 2005 13:10:28 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        Daniel Ellard <ellard@eecs.harvard.edu>
Cc:        freebsd-current@freebsd.org
Subject:   Re: smbfs bug introduced at smbfs_vnops.c:1.58
Message-ID:  <42595E04.60705@mac.com>
In-Reply-To: <20050410082945.H66651@bowser.eecs.harvard.edu>
References:  <200504100251.j3A2pLEH055107@sana.init-main.com> <20050410074009.N66651@bowser.eecs.harvard.edu> <1892195662.20050410140423@andric.com> <20050410082945.H66651@bowser.eecs.harvard.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Ellard wrote:
> On Sun, 10 Apr 2005, Dimitry Andric wrote:
[ ... ]
> At least the gcc folk now do detect this old chestnut:
> 
> 	{
> 	    int a;
> 
> 	    a /= 0;
> 	}
> 
> which was used to provoke arguments in compiler
> classes for many years.  (Optimized, nothing happens.
> Unoptimized, a division-by-zero error happens...)

Great example.

If the optimized code fails to generate a division-by-zero error here, the 
optimizer is buggy.  (I won't quote Aho, Sethi, and Ullman again.... :-)

-- 
-Chuck



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