Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macro expansion producing 'defined' has undefined behavior #19

Open
nazar-pc opened this issue Aug 9, 2017 · 0 comments
Open

macro expansion producing 'defined' has undefined behavior #19

nazar-pc opened this issue Aug 9, 2017 · 0 comments

Comments

@nazar-pc
Copy link
Contributor

nazar-pc commented Aug 9, 2017

When compiling with Clang 4 I'm getting following warnings:

In file included from vendor/src/backend/ref/cipher-chachapoly.c:25:
vendor/src/crypto/donna/poly1305-donna.c:18:6: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if (HAS_SIZEOF_INT128_64BIT || HAS_MSVC_64BIT || HAS_GCC_4_4_64BIT)
     ^
vendor/src/crypto/donna/poly1305-donna.c:14:34: note: expanded from macro 'HAS_SIZEOF_INT128_64BIT'
#define HAS_SIZEOF_INT128_64BIT (defined(__SIZEOF_INT128__) && defined(__LP64__))
                                 ^
vendor/src/crypto/donna/poly1305-donna.c:18:6: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
vendor/src/crypto/donna/poly1305-donna.c:14:64: note: expanded from macro 'HAS_SIZEOF_INT128_64BIT'
#define HAS_SIZEOF_INT128_64BIT (defined(__SIZEOF_INT128__) && defined(__LP64__))
                                                               ^
vendor/src/crypto/donna/poly1305-donna.c:18:33: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if (HAS_SIZEOF_INT128_64BIT || HAS_MSVC_64BIT || HAS_GCC_4_4_64BIT)
                                ^
vendor/src/crypto/donna/poly1305-donna.c:15:25: note: expanded from macro 'HAS_MSVC_64BIT'
#define HAS_MSVC_64BIT (defined(_MSC_VER) && defined(_M_X64))
                        ^
vendor/src/crypto/donna/poly1305-donna.c:18:33: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
vendor/src/crypto/donna/poly1305-donna.c:15:46: note: expanded from macro 'HAS_MSVC_64BIT'
#define HAS_MSVC_64BIT (defined(_MSC_VER) && defined(_M_X64))
                                             ^
vendor/src/crypto/donna/poly1305-donna.c:18:51: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if (HAS_SIZEOF_INT128_64BIT || HAS_MSVC_64BIT || HAS_GCC_4_4_64BIT)
                                                  ^
vendor/src/crypto/donna/poly1305-donna.c:16:28: note: expanded from macro 'HAS_GCC_4_4_64BIT'
#define HAS_GCC_4_4_64BIT (defined(__GNUC__) && defined(__LP64__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4))))
                           ^
vendor/src/crypto/donna/poly1305-donna.c:18:51: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
vendor/src/crypto/donna/poly1305-donna.c:16:49: note: expanded from macro 'HAS_GCC_4_4_64BIT'
#define HAS_GCC_4_4_64BIT (defined(__GNUC__) && defined(__LP64__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4))))
                                                ^
6 warnings generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant