--- layout: fc_discuss_archives title: Message 49 from Frama-C-discuss on June 2015 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Error with size_t



Hi,

On 06/08/2015 05:26 PM, Guanhua Yan wrote:
> Am trying to use the gui tool to load file utils.h:
>
> ------------------------------------------
> #ifndef __UTILS_H__
> #define __UTILS_H__ 1
>
> void pure_memzero(const void * pnt, const size_t len);
>
> #endif
> --------------------------------------------
>
> However, frama-c-gui complains that there is an "invalid user input".
> However, if I replace size_t with int, it would not complain.
>
> Any ideas about what happened?

Your C file is not correct. Note that gcc also complains.

$ gcc utils.h
utils.h:4:1: error: unknown type name ‘size_t’

Adding "#include <stdlib.h>" before using size_t should fix your issue.

Hope this helps,
Julien