[cfe-dev] Question about use of bool in asan_interface.h

Oliver Schneider oliver at f-prot.com
Tue Apr 8 06:20:06 PDT 2014


Hi,

I am trying to make use of the ASAN callbacks from C. However,
asan_interface.h uses bool in the public interface. This type has "only"
been introduced in C99. Unfortunately for me this means I have it not
available.

Is it sufficient to do something like:

#   if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
    typedef unsigned char bool;
#   endif
#   include<sanitizer/asan_interface.h>

or would this break anything? If it breaks something, what alternatives
do I have if I cannot use C99 mode?

Thanks,

// Oliver

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 553 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140408/c45e3c38/attachment.sig>


More information about the cfe-dev mailing list