nimble-code / Spin

Explicit state logic model checking tool -- 2002 winner of the ACM System Software Award.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<stdio.h> header not included

kyechou opened this issue · comments

Problem description

The header <stdio.h> is not included in pan.h, while the type name FILE is used.

How to reproduce

Example source files

/* model.pml */
init {
    c_code {
        ;
    };
}
/* test.c */
#include "pan.h"

int main(void)
{
    return 0;
}

Execution result

$ spin -a model.pml
$ gcc test.c
In file included from test.c:1:
pan.h:501:12: error: unknown type name ‘FILE’
  501 | void usage(FILE *);
      |            ^~~~
pan.h:1:1: note: ‘FILE’ is defined in header ‘<stdio.h>; did you forget to ‘#include <stdio.h>’?
  +++ |+#include <stdio.h>
    1 | #ifndef PAN_H

Tested environment

  • Spin: latest commit on master branch d91a5b8
  • GCC: 9.2.0

true -- there are no header files at all in pan.h
all the standard header files needed to compile pan.c are included in pan.c itself, including pan.h and stdio.h

Thanks!