Re: smbfs bug introduced at smbfs_vnops.c:1.58

From: Chuck Swiger <cswiger_at_mac.com>
Date: Sun, 10 Apr 2005 13:10:28 -0400
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
Received on Sun Apr 10 2005 - 15:10:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:31 UTC