lclint-interest message 156

From Mon Sep 22 15:27:25 1997
X-Env: ( ->
Date: Mon, 22 Sep 1997 16:43:09 +0200
From: (Harald Kirsch)
Subject: How to annotate

Again I am having trouble with annotating some code. Please have a look
at that:

  float f;
  int i=19;

  if( i>0 ) {
    f = 1.0;

  if( i>0 ) {
    float g = f;	/***** Variable f used before definition */

  return 0;

I understand that the case is for lclint not as trivial as it may appear
to us. It has to prove that the value of `i' does not change between the
two if-statements.

However, I thought lclint does some data-flow analysis and I cannot
decide, if it should know that `f' is defined at the place where it
gives the error.


Harald Kirsch,, +49 721 6091 369 | Now I rebooted.
FhG/IITB,      Fraunhoferstr.1, 76131 Karlsruhe  |     --- Jerry Pournelle

Previous Message Next Message Archive Summary LCLint Home Page David Evans
University of Virginia, Computer Science