Re: Semantic Checking - C (Hannah Schroeter)
11 Feb 2005 22:20:32 -0500

          From comp.compilers

Related articles
Semantic Checking - C (johnvoltaire) (2005-01-30)
Re: Semantic Checking - C (2005-02-03)
Re: Semantic Checking - C (2005-02-03)
Re: Semantic Checking - C (Jeremy Wright) (2005-02-03)
Re: Semantic Checking - C (jacob navia) (2005-02-03)
Re: Semantic Checking - C (Neal Wang) (2005-02-03)
Re: Semantic Checking - C foobar@nowhere.void (Tommy Thorn) (2005-02-03)
Re: Semantic Checking - C (2005-02-11)
| List of all articles for this month |

From: (Hannah Schroeter)
Newsgroups: comp.compilers
Date: 11 Feb 2005 22:20:32 -0500
Organization: Schlund + Partner AG
References: 05-01-098 05-02-009
Keywords: C, debug, semantics
Posted-Date: 11 Feb 2005 22:20:32 EST


Torben Ęgidius Mogensen <> wrote:

>> 3. Division by zero

>You will rarely be able to find this statically. You may be able to
>issue a warning that the division _may_ be by zero, but you will get
>many false positives. But a static analysis might find cases where it
>can see that the divisor is non-zero, so a dynamic check can be
>removed. But with C, you might not want dynamic checks.

Many architectures trap division by zero in hardware anyway, so unless
you want a special kind of handling when it happens, compilers usually
don't need to include instructions for checking the divisor before the
division (attempt).


Kind regards,


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.