Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Array elements passed as reference

  • Subject: [Frama-c-discuss] Array elements passed as reference
  • From: Boris.Hollas at (Hollas Boris (CR/AEY1))
  • Date: Mon, 8 Jun 2009 10:20:31 +0200


Consider the code below (example code from bug Copy is called with array elements passed as reference.

In the absence of a modifies-clause, which of the following assumptions does Jessie make in this situation?
  1) Copy may modify arbitrary elements in a[]
  2) Copy may modify at most a[0] and a[i]



void Copy(int *p, int *q)
  *q = *p;

int foo(int a[]) {
  int i=1;

  Copy(&a[0], &a[i]);
  return i;