This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: warning: operation on 'zero' may be undefined
- From: Robert Dewar <dewar at gnat dot com>
- To: "Steven L. Zook" <SLZook at Qualstar dot com>
- Cc: Nathan Sidwell <nathan at codesourcery dot com>,Paul Schlie <schlie at comcast dot net>, gcc at gcc dot gnu dot org
- Date: Thu, 30 Sep 2004 19:43:27 -0400
- Subject: Re: warning: operation on 'zero' may be undefined
- References: <9E27B4AB55478346B9F7848926E49B7F4F7162@exchange1.qualstar.com>
It is confusing to describe this problem in terms of ambiguity, or
from the point of view of where the increment can occur. The point
is that the semantics is undefined. Period. You can then ask why
was this made undefined, and the answer is that it is a simple
general rule that captures all the real nasty cases, and so what
if it captures some non-nasty cases.