From patchwork Tue Oct 26 03:10:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Li X-Patchwork-Id: 281472 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9Q3A7Np027531 for ; Tue, 26 Oct 2010 03:10:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755681Ab0JZDKE (ORCPT ); Mon, 25 Oct 2010 23:10:04 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:35037 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753989Ab0JZDKD (ORCPT ); Mon, 25 Oct 2010 23:10:03 -0400 Received: by iwn10 with SMTP id 10so1568911iwn.19 for ; Mon, 25 Oct 2010 20:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=2qp3PYhkFuThJLuFA7CLR8Xddl714k8qptIq+i5pp6M=; b=pTydGcUa+PfrNj9N46iPb0sNO/eFoU+9eZ8q2xaifnRpLQ6f5CnJyyXTyE+2Xu8zVX +Cjo0DC0yh+exlQRN/h+PRefXs7V5G1fAIWVQOqWC7IygX6hPPL425DhhetFtHPQOXfz ZTeCRAaUiADrYnXWTizED3fZshpd9ZeiAt634= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=NKAhuyeCwuCxUtw5VnuxxUA9IFDSheo5cpIbUmD32aQdollghgjR7zZg08l5VSdy5U nLEwH08mpnxoq77ag41xPpm/1zgEsYQK29HUbruM/584j78pr/+NyHzpaA4En/J9DtIp Xh24dOdE2Qj0nh7nZEhkIoR5qKFXKbi99J090= MIME-Version: 1.0 Received: by 10.42.134.69 with SMTP id k5mr2044192ict.133.1288062602686; Mon, 25 Oct 2010 20:10:02 -0700 (PDT) Received: by 10.42.169.196 with HTTP; Mon, 25 Oct 2010 20:10:02 -0700 (PDT) In-Reply-To: References: <20101025213145.GA1822@redhat.com> <20101025223957.GA5561@redhat.com> Date: Mon, 25 Oct 2010 20:10:02 -0700 X-Google-Sender-Auth: ORXkR3GPRG6Nj8-2k2P44FnCz1g Message-ID: Subject: Re: bad asm goto ? From: Christopher Li To: Dave Jones Cc: linux-sparse@vger.kernel.org Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 26 Oct 2010 03:10:07 +0000 (UTC) diff --git a/evaluate.c b/evaluate.c index f8343c2..1fb03ed 100644 --- a/evaluate.c +++ b/evaluate.c @@ -3221,7 +3221,7 @@ static void evaluate_asm_statement(struct statement *stmt) FOR_EACH_PTR(stmt->asm_clobbers, expr) { if (!expr) { - sparse_error(stmt->pos, "bad asm output"); + sparse_error(stmt->pos, "bad asm clobbers"); return; } if (expr->type == EXPR_STRING) diff --git a/parse.c b/parse.c index 537055f..6b7d656 100644 --- a/parse.c +++ b/parse.c @@ -1894,7 +1894,8 @@ static struct token *parse_asm_clobbers(struct token *token, struct statement *s do { token = primary_expression(token->next, &expr); - add_expression(clobbers, expr); + if (expr) + add_expression(clobbers, expr); } while (match_op(token, ',')); return token;