From patchwork Thu May 16 20:56:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Wang X-Patchwork-Id: 2580091 Return-Path: X-Original-To: patchwork-linux-sparse@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 1BD21E00E6 for ; Thu, 16 May 2013 20:57:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753332Ab3EPU5j (ORCPT ); Thu, 16 May 2013 16:57:39 -0400 Received: from mail-ye0-f176.google.com ([209.85.213.176]:43499 "EHLO mail-ye0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752332Ab3EPU5j (ORCPT ); Thu, 16 May 2013 16:57:39 -0400 Received: by mail-ye0-f176.google.com with SMTP id m12so516267yen.7 for ; Thu, 16 May 2013 13:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=k3V7ofCumuTDb4zehO6lJ6EJxWAnhw3CgpEzs3Jcpxg=; b=0BQX5cHD0OV19sIL2hI/GkvN5eC05DM0i7D264JHSsBx5wYgDmiTiSyGZIg804wcZt q59CWjoYxTVSsRMVvVRpgbhPRkEMBtLH9qE0EHEVfDb1W8oRA1TfntmVgTBMkHmtbC4z 0cYb1NlsNuPEGiiYiolUDiHfrjOqT/d8inf6poFjAl8NtBS0DYpuzyMyYc4rTEivLaIK /Anq5rBlL5fUGuh1xcqMwd0If6fdyAO0nBnxBAYDFBNObfRnSN+pfL3AzjSXDSaVKOSX /8RxOi6fqSO4nVxoTKk6Zc+WRsegqU84v3t9X3xtlxMXfHibbebySbfOkdwLnm9X44Bo wIWw== X-Received: by 10.236.200.200 with SMTP id z48mr23865517yhn.136.1368737858664; Thu, 16 May 2013 13:57:38 -0700 (PDT) Received: from hchen.csail.mit.edu (hchen.csail.mit.edu. [18.26.5.5]) by mx.google.com with ESMTPSA id v27sm11946901yhk.5.2013.05.16.13.57.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 May 2013 13:57:38 -0700 (PDT) From: Xi Wang To: linux-sparse@vger.kernel.org Cc: sparse@chrisli.org, Xi Wang Subject: [PATCH] fix floating point ! type Date: Thu, 16 May 2013 16:56:13 -0400 Message-Id: <1368737773-6559-1-git-send-email-xi.wang@gmail.com> X-Mailer: git-send-email 1.8.1.2 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org The expression type of zero testing should be EXPR_COMPARE, rather than EXPR_BINOP. Signed-off-by: Xi Wang --- evaluate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evaluate.c b/evaluate.c index a090028..c345a50 100644 --- a/evaluate.c +++ b/evaluate.c @@ -1807,7 +1807,7 @@ static struct symbol *evaluate_preop(struct expression *expr) warning(expr->pos, "testing a 'safe expression'"); if (is_float_type(ctype)) { struct expression *arg = expr->unop; - expr->type = EXPR_BINOP; + expr->type = EXPR_COMPARE; expr->op = SPECIAL_EQUAL; expr->left = arg; expr->right = alloc_expression(expr->pos, EXPR_FVALUE);