From 3aff78bdae113e1c576cf6c9626c18ce03de3c15 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Mon, 31 Oct 2016 10:18:16 +0100 Subject: [PATCH] Use type qualifier __restrict__ instead of keyword restrict because C++ does not have the latter. FWIW, CUDA already used __restrict__ before this commit! I guess that means, `CudaRestrictPointer` could be deprecated? --- cgen/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgen/__init__.py b/cgen/__init__.py index 0fa65cc..3e9ae70 100644 --- a/cgen/__init__.py +++ b/cgen/__init__.py @@ -303,7 +303,7 @@ class Pointer(NestedDeclarator): class RestrictPointer(Pointer): def get_decl_pair(self): sub_tp, sub_decl = self.subdecl.get_decl_pair() - return sub_tp, ("*restrict %s" % sub_decl) + return sub_tp, ("*__restrict__ %s" % sub_decl) mapper_method = "map_restrict_pointer" -- GitLab