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] How would one annotate a function in an external header?


  • Subject: [Frama-c-discuss] How would one annotate a function in an external header?
  • From: pascal.cuoq at gmail.com (Pascal Cuoq)
  • Date: Fri, 6 Sep 2013 09:45:54 +0200
  • In-reply-to: <CAC3Lx=bHp=48NVsjXTChrhpbAK=NhTgqxaqa24HVpoYKObpszg@mail.gmail.com>
  • References: <fb24ac843d13.52296d63@langara.bc.ca> <CAC3Lx=bHp=48NVsjXTChrhpbAK=NhTgqxaqa24HVpoYKObpszg@mail.gmail.com>

>
> In Frama-C libc headers, notation "((char*)ptr)[0..(nmemb*size)]" is used:
>
> /*@ assigns ((char*)ptr)[0..(nmemb*size)] \from *stream; */
> size_t fread(void * restrict ptr,
>      size_t size, size_t nmemb,
>      FILE * restrict stream);


This nmemb*size should be nmemb*size-1. This is already fixed in Frama-C's
development version.

Pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20130906/6031282e/attachment.html>