diff mbox series

Add missing declaration of get_restrict in C++ interface

Message ID CAAOQCfQ3BuvdnvyxvwSP2h_VZK8tEkfKGrANnRomYbJRXvtg6w@mail.gmail.com
State New
Headers show
Series Add missing declaration of get_restrict in C++ interface | expand

Commit Message

Guillaume Gomez Nov. 9, 2023, 8:03 p.m. UTC
Hi,

This patch adds the `get_restrict` method declaration for
the C++ interface as it was forgotten.

Thanks in advance for the review.

Comments

David Malcolm Nov. 9, 2023, 8:49 p.m. UTC | #1
On Thu, 2023-11-09 at 21:03 +0100, Guillaume Gomez wrote:
> Hi,
> 
> This patch adds the `get_restrict` method declaration for
> the C++ interface as it was forgotten.
> 
> Thanks in advance for the review.

Looking at my jit.sum results, it looks like the .cc files are indeed
FAILing on initial compilation, with errors such as:

In file included from gcc/testsuite/jit.dg/test-alignment.cc:4:
gcc/testsuite/../jit/libgccjit++.h:1414:1: error: no declaration matches 'gccjit::type gccjit::type::get_restrict()'
gcc/testsuite/../jit/libgccjit++.h:1414:1: note: no functions named 'gccjit::type gccjit::type::get_restrict()'
gcc/testsuite/../jit/libgccjit++.h:350:9: note: 'class gccjit::type' defined here

which presumably started with r14-3552-g29763b002459cb.

Hence the patch looks good to me - thanks!

Does this patch fix those test cases?

Dave
Guillaume Gomez Nov. 9, 2023, 8:51 p.m. UTC | #2
I confirm it does. I realized it when finalizing our patch for
attributes support.

Le jeu. 9 nov. 2023 à 21:49, David Malcolm <dmalcolm@redhat.com> a écrit :
>
> On Thu, 2023-11-09 at 21:03 +0100, Guillaume Gomez wrote:
> > Hi,
> >
> > This patch adds the `get_restrict` method declaration for
> > the C++ interface as it was forgotten.
> >
> > Thanks in advance for the review.
>
> Looking at my jit.sum results, it looks like the .cc files are indeed
> FAILing on initial compilation, with errors such as:
>
> In file included from gcc/testsuite/jit.dg/test-alignment.cc:4:
> gcc/testsuite/../jit/libgccjit++.h:1414:1: error: no declaration matches 'gccjit::type gccjit::type::get_restrict()'
> gcc/testsuite/../jit/libgccjit++.h:1414:1: note: no functions named 'gccjit::type gccjit::type::get_restrict()'
> gcc/testsuite/../jit/libgccjit++.h:350:9: note: 'class gccjit::type' defined here
>
> which presumably started with r14-3552-g29763b002459cb.
>
> Hence the patch looks good to me - thanks!
>
> Does this patch fix those test cases?
>
> Dave
>
David Malcolm Nov. 9, 2023, 9:02 p.m. UTC | #3
On Thu, 2023-11-09 at 21:51 +0100, Guillaume Gomez wrote:
> I confirm it does. I realized it when finalizing our patch for
> attributes support.

Excellent; thanks for the fix.

Dave
diff mbox series

Patch

From e819fd01cd3e79bfab28a77f4ce78f34156e7a83 Mon Sep 17 00:00:00 2001
From: Guillaume Gomez <guillaume1.gomez@gmail.com>
Date: Thu, 9 Nov 2023 17:53:08 +0100
Subject: [PATCH] Add missing declaration of get_restrict in C++ interface

gcc/jit/ChangeLog:

	* libgccjit++.h:
---
 gcc/jit/libgccjit++.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/jit/libgccjit++.h b/gcc/jit/libgccjit++.h
index 4a04db386e6..f9a0017cae5 100644
--- a/gcc/jit/libgccjit++.h
+++ b/gcc/jit/libgccjit++.h
@@ -360,6 +360,7 @@  namespace gccjit
     type get_volatile ();
     type get_aligned (size_t alignment_in_bytes);
     type get_vector (size_t num_units);
+    type get_restrict ();
 
     // Shortcuts for getting values of numeric types:
     rvalue zero ();
-- 
2.34.1