title: Pointer and Index in C - What is wrong?
body: <p>Update: I got the confirmation that the behaviour is due to a bug in the code checker (see comment to answer #2)</p>
  
  <p>I am trying out a static Code checker and it complains:</p>
  
  <p>Array pointer `sensorConf' is accessed with index [8,8] which may be out of array bounds [0,UNKNOWN]    MISRAC2012-Rule-18.1_d  </p>
  
  <p>The Code is:</p>
  
  <pre><code>typedef struct
  {
      int16_t signalOrig;
  } TT;
  
  typedef struct
  {
     int iii; // &lt;-- see below: int16_t iii would work without warning!
     uint16_t numCalibPairs; 
    TT calib[5];
  } SS;
  
  void Test(const SS* sensorConf);
  
  void Test(const SS* sensorConf)
  {
    const int16_t f = sensorConf-&gt;calib[0].signalOrig;
    }
  </code></pre>
  
  <p>I had asked:
  Why is it saying "Array pointer"? Why does it think that the Index is [8,8]? Is it just a problem of the code checker or is there a problem with my code?</p>
  
  <p>Edit:
  The Code checker (C-STAT) gives not only one but 3 rules which all have the meaning that there is an Access out of bounds of an Array.
  Now, if I remove the first or second integer in struct SS the warning disappears. It also disappears if I Change "iii" from int (32bit, ARM cortex M4) to int16_t. The warning does not appear if there are only 4 Bytes before the Array in struct SS. Looks like a bug in the checker?</p>