public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: "Li, Yicheng" <yli137@vols.utk.edu>,
	Basile Starynkevitch <basile@starynkevitch.net>,
	"jit@gcc.gnu.org" <jit@gcc.gnu.org>
Subject: Re: Question on libgccjit
Date: Mon, 20 Mar 2023 19:23:01 -0400	[thread overview]
Message-ID: <1e44090dfc6fd8ae473cd0676735617b9e1bede8.camel@redhat.com> (raw)
In-Reply-To: <07AE3E1A-1B09-4BC2-A654-1417C833EA92@vols.utk.edu>

On Mon, 2023-03-20 at 19:38 +0000, Li, Yicheng via Jit wrote:
> Hi,
> 
> Here’s the question for libgccjit on pointer arithmetic.
> There’s error for type mismatching with char* and int.
> Please see full code at https://github.com/yli137/libgccjit_test
> 

GCC_JIT_BINARY_OP_PLUS doesn't properly work on pointers; libgccjit
currently requires you to express pointer arithmetic as an array
access; see:
https://gcc.gnu.org/onlinedocs/jit/topics/expressions.html#c.GCC_JIT_BINARY_OP_PLUS

Sorry that this is a bit clunky.
Dave


  reply	other threads:[~2023-03-20 23:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4895236c-a56f-a8aa-d581-476e3072f72c@starynkevitch.net>
     [not found] ` <AFDF0F71-5CB3-47A0-95FF-2E23877F3DE7@vols.utk.edu>
     [not found]   ` <f942f395-42b5-18cd-45a8-433437fcf752@starynkevitch.net>
2023-03-20 19:38     ` Li, Yicheng
2023-03-20 23:23       ` David Malcolm [this message]
2023-03-20 19:16 Li, Yicheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e44090dfc6fd8ae473cd0676735617b9e1bede8.camel@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=basile@starynkevitch.net \
    --cc=jit@gcc.gnu.org \
    --cc=yli137@vols.utk.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).