public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available.
@ 2022-07-23  8:01 Vibhav Pant
  2022-07-25 23:18 ` David Malcolm
  0 siblings, 1 reply; 5+ messages in thread
From: Vibhav Pant @ 2022-07-23  8:01 UTC (permalink / raw)
  To: jit; +Cc: gcc-patches


[-- Attachment #1.1: Type: text/plain, Size: 403 bytes --]

The macro definition for LIBGCCJIT_HAVE_gcc-jit_context_new_bitcast
was earlier located in the documentation comment for
gcc_jit_context_new_bitcast, making it unavailable to code that
consumed libgccjit.h. This patch moves the definition out of the
comment, making it effective.

Thanks,
Vibhav

-- 
Vibhav Pant
vibhavp@gmail.com

GPG: 7ED1 D48C 513C A024 BE3A 785F E3FB 28CB 6AB5 9598


[-- Attachment #1.2: 0001-Uncomment-macro-definition-for-testing-gcc_jit_conte.patch --]
[-- Type: text/x-patch, Size: 1256 bytes --]

From 13f7b010962d57a9a133b657838727486e4241c9 Mon Sep 17 00:00:00 2001
From: Vibhav Pant <vibhavp@gmail.com>
Date: Sat, 23 Jul 2022 13:18:05 +0530
Subject: [[PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available.] 
 Uncomment macro definition for testing gcc_jit_context_new_bitcast support

The macro definition for LIBGCCJIT_HAVE_gcc-jit_context_new_bitcast
was earlier located in the documentation comment for
gcc_jit_context_new_bitcast, making it unavailable to code that
consumed libgccjit.h. This commit moves the definition out of the
comment, making it effective.
---
 gcc/jit/libgccjit.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h
index 062f06d691a..b3c389e93f6 100644
--- a/gcc/jit/libgccjit.h
+++ b/gcc/jit/libgccjit.h
@@ -1252,10 +1252,10 @@ gcc_jit_context_new_cast (gcc_jit_context *ctxt,
 			  gcc_jit_rvalue *rvalue,
 			  gcc_jit_type *type);
 
-/* Reinterpret a value as another type.
-
 #define LIBGCCJIT_HAVE_gcc_jit_context_new_bitcast
 
+/* Reinterpret a value as another type.
+
    The types must be of the same size.
 
    This API entrypoint was added in LIBGCCJIT_ABI_21; you can test for its
-- 
2.37.1


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available.
  2022-07-23  8:01 [PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available Vibhav Pant
@ 2022-07-25 23:18 ` David Malcolm
  2022-07-30 13:48   ` Vibhav Pant
  0 siblings, 1 reply; 5+ messages in thread
From: David Malcolm @ 2022-07-25 23:18 UTC (permalink / raw)
  To: vibhavp, jit; +Cc: gcc-patches

On Sat, 2022-07-23 at 13:31 +0530, Vibhav Pant via Jit wrote:
> The macro definition for LIBGCCJIT_HAVE_gcc-jit_context_new_bitcast
> was earlier located in the documentation comment for
> gcc_jit_context_new_bitcast, making it unavailable to code that
> consumed libgccjit.h. This patch moves the definition out of the
> comment, making it effective.

Good catch!

Do you have push rights to the git repo, or should I push this?

Thanks
Dave


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available.
  2022-07-25 23:18 ` David Malcolm
@ 2022-07-30 13:48   ` Vibhav Pant
  2022-08-09 15:39     ` David Malcolm
  0 siblings, 1 reply; 5+ messages in thread
From: Vibhav Pant @ 2022-07-30 13:48 UTC (permalink / raw)
  To: David Malcolm; +Cc: jit, gcc-patches

I don't have push rights to the repo, so this would need to be applied manually.


Thanks,
Vibhav

On Tue, Jul 26, 2022 at 4:48 AM David Malcolm <dmalcolm@redhat.com> wrote:
>
> On Sat, 2022-07-23 at 13:31 +0530, Vibhav Pant via Jit wrote:
> > The macro definition for LIBGCCJIT_HAVE_gcc-jit_context_new_bitcast
> > was earlier located in the documentation comment for
> > gcc_jit_context_new_bitcast, making it unavailable to code that
> > consumed libgccjit.h. This patch moves the definition out of the
> > comment, making it effective.
>
> Good catch!
>
> Do you have push rights to the git repo, or should I push this?
>
> Thanks
> Dave
>


-- 
Vibhav Pant
vibhavp@gmail.com
GPG: 7ED1 D48C 513C A024 BE3A  785F E3FB 28CB 6AB5 9598

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available.
  2022-07-30 13:48   ` Vibhav Pant
@ 2022-08-09 15:39     ` David Malcolm
  2022-08-09 23:09       ` David Malcolm
  0 siblings, 1 reply; 5+ messages in thread
From: David Malcolm @ 2022-08-09 15:39 UTC (permalink / raw)
  To: Vibhav Pant; +Cc: jit, gcc-patches

On Sat, 2022-07-30 at 19:18 +0530, Vibhav Pant wrote:
> I don't have push rights to the repo, so this would need to be
> applied manually.

I've gone ahead and pushed your fix to trunk (for GCC 13) as r13-2004-
g9385cd9c74cf66.

I plan to also push it to the gcc 12 branch shortly (for gcc 12.2)


Thanks again for the patch.
Dave


> 
> 
> Thanks,
> Vibhav
> 
> On Tue, Jul 26, 2022 at 4:48 AM David Malcolm <dmalcolm@redhat.com>
> wrote:
> > 
> > On Sat, 2022-07-23 at 13:31 +0530, Vibhav Pant via Jit wrote:
> > > The macro definition for LIBGCCJIT_HAVE_gcc-
> > > jit_context_new_bitcast
> > > was earlier located in the documentation comment for
> > > gcc_jit_context_new_bitcast, making it unavailable to code that
> > > consumed libgccjit.h. This patch moves the definition out of the
> > > comment, making it effective.
> > 
> > Good catch!
> > 
> > Do you have push rights to the git repo, or should I push this?
> > 
> > Thanks
> > Dave
> > 
> 
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available.
  2022-08-09 15:39     ` David Malcolm
@ 2022-08-09 23:09       ` David Malcolm
  0 siblings, 0 replies; 5+ messages in thread
From: David Malcolm @ 2022-08-09 23:09 UTC (permalink / raw)
  To: Vibhav Pant; +Cc: jit, gcc-patches

On Tue, 2022-08-09 at 11:39 -0400, David Malcolm wrote:
> On Sat, 2022-07-30 at 19:18 +0530, Vibhav Pant wrote:
> > I don't have push rights to the repo, so this would need to be
> > applied manually.
> 
> I've gone ahead and pushed your fix to trunk (for GCC 13) as r13-
> 2004-
> g9385cd9c74cf66.
> 
> I plan to also push it to the gcc 12 branch shortly (for gcc 12.2)

I've now done this (as r12-8674-g92f2582f3ec7b8).

Thanks again
Dave


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-09 23:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-23  8:01 [PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available Vibhav Pant
2022-07-25 23:18 ` David Malcolm
2022-07-30 13:48   ` Vibhav Pant
2022-08-09 15:39     ` David Malcolm
2022-08-09 23:09       ` David Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).