From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41147 invoked by alias); 25 Jun 2015 22:46:48 -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 41137 invoked by uid 89); 25 Jun 2015 22:46:48 -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.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW 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: mail-yk0-f181.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=8xYR8xRFLa5v4sHbtr/Xc2maju123U8EeOkfNcZna48=; b=kBUx+flThJMr3Yt3RPcLHSO95+Bbkps9biDUG9k+L19lxDGzmIfMD6fjrnkH3aQMEo d1F5AQrymE7Nqv46TqRGmNWqlNOIoryj0eX7e6QB/fJ5EjdUA84CL988SvbSzN4onbjJ W3O5IJ2w5cAFCu/Fu13hzkJ2oN3eqLPA6hWXsqtdJzIg7d3Q6X/aUax1Japxy22UG5mW /lTndSMnyrZCDrFxiWMt7tJBntgpKk9GXc7Kgkvx89LXxb/MyRXU6Qbp0J/DTw85o/dv qCG0GKfOLx2frPIW+JOZbBovJoM3PzxEFbADjRkeo3jAFamuEpr/37XJzE138FJBFNp9 Gz+A== X-Gm-Message-State: ALoCoQk79HqGlX2Yx/c5bOcwZCDRICcMZ5WrpqIjewqoJoqfYnWFGpvocPQ9DuZWAZt0vwD+XIhB MIME-Version: 1.0 X-Received: by 10.13.204.142 with SMTP id o136mr58834385ywd.171.1435272405350; Thu, 25 Jun 2015 15:46:45 -0700 (PDT) Date: Thu, 01 Jan 2015 00:00:00 -0000 Message-ID: Subject: Compilation error involving comparison and logical operator From: Dibyendu Majumdar To: jit@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-q2/txt/msg00111.txt.bz2 Hi Dave, I am getting an error in an expression such as this: int bvalue_0_2; bvalue_0_2 = &base[(int)0]->tt_ == (int)1 && &base[(int)0]->value_.b == (int)0; Of course the expression above really is: bvalue_0_2 = ((&base[(int)0]->tt_ == (int)1) && (&base[(int)0]->value_.b == (int)0)); The error I get is this: libgccjit.so: error: gcc_jit_block_add_assignment: mismatching types: assignment to bvalue_0_2 (type: int) from &base[(int)0]->tt_ == (int)0 (type: bool) I notice that the error message doesn't show the full expression above - is this just an issue with the dump or is there a problem with the expression evaluation? Also, I am confused by the error as I am not sure if this means I need to store the result of the expression in a bool value. In fact if I do that then: libgccjit.so: error: gcc_jit_block_add_assignment: mismatching types: assignment to bvalue_0_2 (type: bool) from &base[(int)0]->tt_ == (int)1 && &base[(int)0]->value_.b == (int)0 (type: int) Now the full expression is shown but the error is different. I will send you dumps tomorrow for this but if you could let me know what the rules are for assigning boolean values to variables that would be great. Thanks and Regards Dibyendu