From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103203 invoked by alias); 14 Jan 2019 08:42:44 -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 102513 invoked by uid 89); 14 Jan 2019 08:42:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:532 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; Mon, 14 Jan 2019 08:42:43 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 784CE81E05; Mon, 14 Jan 2019 08:42:41 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED8915D70A; Mon, 14 Jan 2019 08:42:40 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x0E8gctm021431; Mon, 14 Jan 2019 09:42:38 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x0E8gbVS021430; Mon, 14 Jan 2019 09:42:37 +0100 Date: Mon, 14 Jan 2019 08:42:00 -0000 From: Jakub Jelinek To: Richard Biener Cc: Jonathan Wakely , libstdc++ , GCC Patches , Marc Glisse Subject: Re: [PATCH] Use __builtin_is_constant_evaluated in std::less etc. (PR tree-optimization/88775) Message-ID: <20190114084237.GA30353@tucnak> Reply-To: Jakub Jelinek References: <20190110090219.GT30353@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00753.txt.bz2 On Mon, Jan 14, 2019 at 09:29:03AM +0100, Richard Biener wrote: > So why is this not just > > return (__UINTPTR_TYPE__)__x > (__UINTPTR_TYPE__)__y; > > or with the casts elided? Does the C++ standard say pointers are > to be compared unsigned here? Or do all targets GCC support > lay out the address space in a way that this is correct for pointers > into distinct objects? See PR78420 for details on why it is done that way. Jakub