Skip to content
Snippets Groups Projects
Commit 8ef9773d authored by Robert Maynard's avatar Robert Maynard
Browse files

Don't use clang diagnostic pragma's when compiling with ICC on OSX.

The ICC frontend on OSX is clang, and therefore the "__clang__" define exists,
but it doesn't support the clang diagnostic pragma syntax.

Change-Id: I6947bd22c77af8066b85a6b00be7cf6019e7d06e
parent 2418443e
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
it in a single source file instead of a separate header and
implementation file. */
#if defined(__clang__)
#if defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wcast-align"
#endif
......@@ -433,7 +433,7 @@ static void md5_finish(md5_state_t *pms, md5_byte_t digest[16])
digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
}
#if defined(__clang__)
#if defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma clang diagnostic pop
#endif
......
......@@ -1595,12 +1595,12 @@ static void kwsysProcessVolatileFree(volatile void* p)
{
/* clang has made it impossible to free memory that points to volatile
without first using special pragmas to disable a warning... */
#if defined(__clang__)
#if defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wcast-qual"
#endif
free((void*)p); /* The cast will silence most compilers, but not clang. */
#if defined(__clang__)
#if defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma clang diagnostic pop
#endif
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment