compilation error for client app w/ clang and 913e9a8
Qinfan Wu
wuqinfan at gmail.com
Tue Sep 23 22:42:17 PDT 2014
You actually need to include stdbool.h:
#include <stdbool.h>
#include <stdlib.h>
#include <jemalloc/jemalloc.h>
On Wed, Sep 24, 2014 at 1:26 AM, Matthew Hall <mhall at mhcomputing.net> wrote:
> Hello,
>
> I'm seeing the following error using this jemalloc version in a client app.
> I'm suspecting the code was supposed to include the header stdbool.h but
> did
> not do so?
>
> I grepped for this header but I did not see it included in the base
> jemalloc
> header. I did see it included in jemalloc_internal_decls.h but jemalloc.h
> only
> includes limits.h and strings.h.
>
> Matthew.
>
> /usr/local/jemalloc/include/jemalloc/jemalloc.h:155:47: error: unknown
> type name 'bool'
> typedef void *(chunk_alloc_t)(size_t, size_t, bool *, unsigned);
> ^
> /usr/local/jemalloc/include/jemalloc/jemalloc.h:156:9: warning: type
> specifier missing, defaults to 'int' [-Wimplicit-int]
> typedef bool (chunk_dalloc_t)(void *, size_t, unsigned);
> ~~~~~~ ^
> /usr/local/jemalloc/include/jemalloc/jemalloc.h:156:14: error: function
> cannot return function type 'int (void *, size_t, unsigned int)'
> typedef bool (chunk_dalloc_t)(void *, size_t, unsigned);
> ^
> /usr/local/jemalloc/include/jemalloc/jemalloc.h:156:15: error: a parameter
> list without types is only allowed in a function definition
> typedef bool (chunk_dalloc_t)(void *, size_t, unsigned);
> _______________________________________________
> jemalloc-discuss mailing list
> jemalloc-discuss at canonware.com
> http://www.canonware.com/mailman/listinfo/jemalloc-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20140924/e2189842/attachment.html>
More information about the jemalloc-discuss
mailing list