From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114025 invoked by alias); 10 Sep 2016 15:08:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 114011 invoked by uid 89); 10 Sep 2016 15:08:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:681 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; Sat, 10 Sep 2016 15:08:00 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (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 02941C057FAC; Sat, 10 Sep 2016 15:07:59 +0000 (UTC) Received: from laptop.zalov.cz (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8AF7uJH010774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 10 Sep 2016 11:07:58 -0400 Received: from laptop.zalov.cz (localhost [127.0.0.1]) by laptop.zalov.cz (8.15.2/8.15.2) with ESMTP id u8AF7sr1019628; Sat, 10 Sep 2016 17:07:55 +0200 Received: (from jakub@localhost) by laptop.zalov.cz (8.15.2/8.15.2/Submit) id u8AF7qpL019627; Sat, 10 Sep 2016 17:07:52 +0200 Date: Sat, 10 Sep 2016 15:13:00 -0000 From: Jakub Jelinek To: Marek Polacek Cc: GCC Patches , Jason Merrill , Joseph Myers Subject: Re: C/C++ PATCH to implement -Wpointer-compare warning (PR c++/64767) Message-ID: <20160910150751.GK2920@laptop.zalov.cz> Reply-To: Jakub Jelinek References: <20160910145843.GJ19950@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160910145843.GJ19950@redhat.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00591.txt.bz2 Hi! Just a minor nit: On Sat, Sep 10, 2016 at 04:58:43PM +0200, Marek Polacek wrote: > Spurred by the recent findings, I decided to > implement a warning that warns when a pointer is compared with a zero character > literal (constant), because this isn't likely to be intended. So e.g. > @@ -4777,6 +4778,7 @@ cp_parser_primary_expression (cp_parser *parser, > case CPP_CHAR32: > case CPP_WCHAR: > case CPP_UTF8CHAR: > + char_literal_p = true; > case CPP_NUMBER: > case CPP_PREPARSED_EXPR: > if (TREE_CODE (token->u.value) == USERDEF_LITERAL) No /* FALLTHRU */ ? Jakub