public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: Basile Starynkevitch <basile@starynkevitch.net>
To: jit@gcc.gnu.org
Subject: error handling in GCCJIT?
Date: Thu, 01 Jan 2015 00:00:00 -0000	[thread overview]
Message-ID: <20150709105154.GB789@ovh.starynkevitch.net> (raw)

Hello all,

What is the design philosophy of GCCJIT w.r.t. errors? Is the calling
application supposed to avoid as much as possible any errors, or on
the contrary can it rely on GCCJIT error checking and not do the
checking itself?

For examples:

   should the caller check that every case in a switch statement 
is unique and non-overlapping for case ranges, or should it leave that to GCCJIT?

   should the caller check that arithmetic operations are only done on
numeric variables I guess that gcc_jit_context_new_binary_op with
GCC_JIT_BINARY_OP_PLUS of two pointer variables is a non-sense, as it
is in C. Or is that checked (and does gcc_jit_context_new_binary_op
returns NULL in that case)?

   what happens (and when?) if gcc_jit_block_end_with_conditional is
   given a non-boolean boolval?

etc....

PS. Perhaps the documentation might tell more about this...

Regards.
-- 
Basile Starynkevitch         http://starynkevitch.net/Basile/
France

             reply	other threads:[~2015-07-09 10:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-01  0:00 Basile Starynkevitch [this message]
2015-01-01  0:00 ` David Malcolm
2015-01-01  0:00   ` Basile Starynkevitch

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=20150709105154.GB789@ovh.starynkevitch.net \
    --to=basile@starynkevitch.net \
    --cc=jit@gcc.gnu.org \
    /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).