Browse Source

use restrict keyword in c++

Julius Pfrommer 9 years ago
parent
commit
a91404198d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      include/ua_config.h.in

+ 2 - 0
include/ua_config.h.in

@@ -78,6 +78,8 @@
 /* Define non-aliasing pointers */
 /* Define non-aliasing pointers */
 #ifdef _MSC_VER
 #ifdef _MSC_VER
 # define UA_RESTRICT __restrict
 # define UA_RESTRICT __restrict
+#elif defined(__GNUC__)
+# define UA_RESTRICT __restrict__
 #else
 #else
 # define UA_RESTRICT restrict
 # define UA_RESTRICT restrict
 #endif
 #endif