Strange definition in gcrypt.h, bug?

Gabriele Monti psicus78 at
Mon Nov 12 09:39:48 CET 2007

I was having a look at libgcrypt source code. I found what could be a
bug, or maybe something meant to. I'd just like to report it:

#if _GCRY_GCC_VERSION >= 300200
#define _GCRY_GCC_ATTR_MALLOC  __attribute__ ((__malloc__))

since _GCRY_GCC_VERSION is computed using:

#define _GCRY_GCC_VERSION (__GNUC__ * 10000 \
                             + __GNUC_MINOR__ * 100 \
                             + __GNUC_PATCHLEVEL__)

It will never be greater than 300200, maybe you meant 30200, or maybe
the code is there but attribute __malloc__ is not used yet?


More information about the Gcrypt-devel mailing list