From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16623 invoked by alias); 9 Jul 2015 10:51:58 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 16611 invoked by uid 89); 9 Jul 2015 10:51:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.98.7 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: ovh.starynkevitch.net Date: Thu, 01 Jan 2015 00:00:00 -0000 From: Basile Starynkevitch To: jit@gcc.gnu.org Subject: error handling in GCCJIT? Message-ID: <20150709105154.GB789@ovh.starynkevitch.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-q3/txt/msg00050.txt.bz2 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