Re: Semantic Checking - C

hannah@schlund.de (Hannah Schroeter)
11 Feb 2005 22:20:32 -0500

          From comp.compilers

Related articles
Semantic Checking - C johnvoltaire@gmail.com (johnvoltaire) (2005-01-30)
Re: Semantic Checking - C nmm1@cus.cam.ac.uk (2005-02-03)
Re: Semantic Checking - C torbenm@diku.dk (2005-02-03)
Re: Semantic Checking - C jeremy.wright@microfocus.com (Jeremy Wright) (2005-02-03)
Re: Semantic Checking - C jacob@jacob.remcomp.fr (jacob navia) (2005-02-03)
Re: Semantic Checking - C neal.wang@gmail.com (Neal Wang) (2005-02-03)
Re: Semantic Checking - C foobar@nowhere.void (Tommy Thorn) (2005-02-03)
Re: Semantic Checking - C hannah@schlund.de (2005-02-11)
| List of all articles for this month |

From: hannah@schlund.de (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

Hello!


Torben Ęgidius Mogensen <torbenm@diku.dk> 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,


Hannah.


Post a followup to this message

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