From patchwork Fri Sep 16 10:15:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 670774 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sbB551hB0z9sBg for ; Fri, 16 Sep 2016 20:16:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=etPjNi1v; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=YMSNYERnGz7tg05WvfBfRNKJSzhAritHkYsAaoGvlmq+RihjPb+kH tqpBIinkGckWvwRHTTXhYXqaA6kU8qtQSebettK8ZZKyGPHYWtu99AB7MRiYAJZn 6NMJgxG8BwgqbXByjKkjf8WZuBkDCLuJcSwzvvK7Q/Ximeh1jVpSU8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=e+vURHekBquxkGKw0ScWFT/Zqrw=; b=etPjNi1vZaJ8ktNRXTl2 53OakVLdi66nLTymR2qFyq3BqYYIisDaPIXMUfqGAag3M2DX6xg5JL5m3QbnxWC0 8OgxR5j6oUc0G399PCpLES7KiwRCsmiTPEfbVQfBVHwazyOAqKjiWnwt05QLeysV C+pBhdrm4FwjSEsJNddPspM= Received: (qmail 32905 invoked by alias); 16 Sep 2016 10:15:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 32841 invoked by uid 89); 16 Sep 2016 10:15:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Sep 2016 10:15:49 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3907144BDC for ; Fri, 16 Sep 2016 10:15:48 +0000 (UTC) Received: from redhat.com (ovpn-204-22.brq.redhat.com [10.40.204.22]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8GAFj3x028197 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 16 Sep 2016 06:15:47 -0400 Date: Fri, 16 Sep 2016 12:15:44 +0200 From: Marek Polacek To: GCC Patches Subject: [committed] Use true/false instead of 1/0 in lvalue_p Message-ID: <20160916101544.GC19950@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.0 (2016-08-17) lvalue_p returns bool but was using 0/1 as return values. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2016-09-16 Marek Polacek * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0. Marek diff --git gcc/c/c-typeck.c gcc/c/c-typeck.c index 4dec397..059ad1f 100644 --- gcc/c/c-typeck.c +++ gcc/c/c-typeck.c @@ -4631,7 +4631,7 @@ lvalue_p (const_tree ref) case COMPOUND_LITERAL_EXPR: case STRING_CST: - return 1; + return true; case INDIRECT_REF: case ARRAY_REF: @@ -4647,7 +4647,7 @@ lvalue_p (const_tree ref) return TREE_CODE (TREE_TYPE (ref)) == ARRAY_TYPE; default: - return 0; + return false; } }