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 to write assign for void* type argument of a function
- Subject: [Frama-c-discuss] How to write assign for void* type argument of a function
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- Date: Sun, 8 Dec 2013 17:01:27 +0100
- In-reply-to: <CAA1cxujF0zdab4k+y5qYuY-q8rMfQKRADK11q+CWy966wG0Oqg@mail.gmail.com>
- References: <CAA1cxujF0zdab4k+y5qYuY-q8rMfQKRADK11q+CWy966wG0Oqg@mail.gmail.com>
On Sun, Dec 8, 2013 at 4:54 PM, David Yang <abiao.yang at gmail.com> wrote: > > While there has a void pointer argument in function, I found I could > not write assign for these arguments. > > e.g. > > /*@ assigns *data; */ > int f(void * data); > > Well, void is an ?incomplete type?. C does not let you dereference a pointer to void either: as an incomplete type, void has no size so the C compiler would not know what to read. Use: assigns *((int *)data); or anything that is appropriate to your case. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20131208/319e7cfb/attachment.html>
- Follow-Ups:
- [Frama-c-discuss] How to write assign for void* type argument of a function
- From: abiao.yang at gmail.com (David Yang)
- [Frama-c-discuss] How to write assign for void* type argument of a function
- References:
- [Frama-c-discuss] How to write assign for void* type argument of a function
- From: abiao.yang at gmail.com (David Yang)
- [Frama-c-discuss] How to write assign for void* type argument of a function
- Prev by Date: [Frama-c-discuss] How to write assign for void* type argument of a function
- Next by Date: [Frama-c-discuss] How to write assign for void* type argument of a function
- Previous by thread: [Frama-c-discuss] How to write assign for void* type argument of a function
- Next by thread: [Frama-c-discuss] How to write assign for void* type argument of a function
- Index(es):