compilation error for client app w/ clang and 913e9a8

Matthew Hall mhall at mhcomputing.net
Tue Sep 23 22:26:31 PDT 2014


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);


More information about the jemalloc-discuss mailing list