summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-01-23 15:53:40 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-20 20:18:29 +0100
commit934ef4bcc9d79aeb9c7a62a75e1ad81a61e67f48 (patch)
tree38c5241078f0540f757c111ff2a23876e2994a13 /Source
parentb963a7bc27d491f218abbaee8e9d28d09166bdd4 (diff)
downloadqtwebkit-934ef4bcc9d79aeb9c7a62a75e1ad81a61e67f48.tar.gz
Fix compilation with Intel CC: C code can't have templates
wtf/Assertions.h is compiled in C, C++, Objective C and Objective C++ modes. The C++ parts need to be inside #ifdef __cplusplus, so make sure the templates are hidden by it. But since Intel CC version 13 does not need the trick anymore, we can exclude it from there. Change-Id: Ifa1b168feec31826ecd025d07067852456d41ba1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source')
-rw-r--r--Source/WTF/wtf/Assertions.h4
-rw-r--r--Source/WTF/wtf/Compiler.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/WTF/wtf/Assertions.h b/Source/WTF/wtf/Assertions.h
index b8ac68faa..b26fa368f 100644
--- a/Source/WTF/wtf/Assertions.h
+++ b/Source/WTF/wtf/Assertions.h
@@ -200,7 +200,7 @@ WTF_EXPORT_PRIVATE void WTFCrash() NO_RETURN_DUE_TO_CRASH;
#define ASSERT_NOT_REACHED() ((void)0)
#define NO_RETURN_DUE_TO_ASSERT
-#if COMPILER(INTEL) && !OS(WINDOWS) || COMPILER(RVCT)
+#if defined(__cplusplus) && COMPILER(RVCT)
template<typename T>
inline void assertUnused(T& x) { (void)x; }
#define ASSERT_UNUSED(variable, assertion) (assertUnused(variable))
@@ -271,7 +271,7 @@ while (0)
/* ASSERT_WITH_MESSAGE_UNUSED */
#if ASSERT_MSG_DISABLED
-#if COMPILER(INTEL) && !OS(WINDOWS) || COMPILER(RVCT)
+#if defined(__cplusplus) || COMPILER(RVCT)
template<typename T>
inline void assertWithMessageUnused(T& x) { (void)x; }
#define ASSERT_WITH_MESSAGE_UNUSED(variable, assertion, ...) (assertWithMessageUnused(variable))
diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h
index 644bbf2db..493894c09 100644
--- a/Source/WTF/wtf/Compiler.h
+++ b/Source/WTF/wtf/Compiler.h
@@ -312,7 +312,7 @@
/* UNUSED_PARAM */
-#if COMPILER(INTEL) && !(defined(WIN32) || defined(_WIN32)) || COMPILER(RVCT)
+#if COMPILER(RVCT)
template<typename T>
inline void unusedParam(T& x) { (void)x; }
#define UNUSED_PARAM(variable) unusedParam(variable)