Commit edda1657 authored by Luca Boccassi's avatar Luca Boccassi

Problem: pragma diagnostic is new in GCC 4.2

Solution: check for GCC version before using pragma diagnostic
in src/tweetnacl.c to avoid an additional warning.
parent abe44500
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
/* /*
Disable warnings for this source only, rather than for the whole Disable warnings for this source only, rather than for the whole
codebase when building with C99 or with Microsoft's compiler codebase when building with C99 (gcc >= 4.2) or with Microsoft's compiler
*/ */
#if defined __GNUC__ && __STDC_VERSION__ < 201112L #if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) && __STDC_VERSION__ < 201112L
# pragma GCC diagnostic ignored "-Wsign-compare" # pragma GCC diagnostic ignored "-Wsign-compare"
#elif defined _MSC_VER #elif defined _MSC_VER
# pragma warning (disable:4018 4244 4146) # pragma warning (disable:4018 4244 4146)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment