From Boris.Hollas at de.bosch.com Wed Sep 24 09:21:53 2008 From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1)) Date: Wed, 24 Sep 2008 18:21:53 +0200 Subject: [splint-discuss] Function interface annotations Message-ID: <7A407C25F211BE428DF593363B385D93036373F2@si-mail02.de.bosch.com> Hi, I want to use annotations to specify the interface of a function. I want to specify every variable that is an input to the function (except variables passed by value; this is obvious by the parameter list) and every variable that is output of that function (if not returned by return()). Also, i want to specify the side-effects of the function. For that purpose, I want to use @in@, @out@, @modifies@, @globals@ annotations. Is this the correct approach? I have some questions on these annotations: /*@in@*/ int *p: Is p or *p mutable? /*@out@*/ int *p: Does p have to be allocated? That is, if p==NULL, does splint generate an error? Do I have to include *p in @modifies@? @globals@: How do I specify that a function does not use any globals? Regards, Boris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20080924/78408d30/attachment.html From Boris.Hollas at de.bosch.com Wed Sep 24 09:26:13 2008 From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1)) Date: Wed, 24 Sep 2008 18:26:13 +0200 Subject: [splint-discuss] C99 types Message-ID: <7A407C25F211BE428DF593363B385D93036373F3@si-mail02.de.bosch.com> Hi, I have a problem with C99 types, such as uint8_t, int32_t. It seems that Splint knows these types even if I don't include a header file that contains definitions for these types (eg, types.h or stdint.h). However, the compiler won't accepts C99 types without a corresponding header file. On the other hand, if I include the header file containing definitions for these types, Splint complains about improper definitions. How do I resolve this problem? Regards, Boris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20080924/2debb8fa/attachment-0001.html From JHolland at FASTSOFT.COM Wed Sep 24 11:29:05 2008 From: JHolland at FASTSOFT.COM (Jake Holland) Date: Wed, 24 Sep 2008 11:29:05 -0700 Subject: [splint-discuss] C99 types References: <7A407C25F211BE428DF593363B385D93036373F3@si-mail02.de.bosch.com> Message-ID: > I have a problem with C99 types, such as uint8_t, int32_t. It seems > that Splint knows these types even if I don't include a header file > that contains definitions for these types (eg, types.h or stdint.h). > However, the compiler won't accepts C99 types without a corresponding > header file. > On the other hand, if I include the header file containing definitions > for these types, Splint complains about improper definitions. It sounds like it might help you to try -skipposixheaders. If that doesn't work, you might get a better response if you include example code that's giving you trouble. This gave me no errors from splint or gcc (on cygwin), with no extra arguments to either: #include int main(void) { uint32_t x = 72; return (int)x; } No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.169 / Virus Database: 270.6.21/1678 - Release Date: 9/24/2008 6:29 AM -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20080924/f915ef67/attachment.html