From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway20.websitewelcome.com (gateway20.websitewelcome.com [192.185.65.13]) by sourceware.org (Postfix) with ESMTPS id 58BC4388E807 for ; Thu, 17 Dec 2020 14:21:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 58BC4388E807 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway20.websitewelcome.com (Postfix) with ESMTP id E4F82400CCD47 for ; Thu, 17 Dec 2020 08:17:09 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id puAAkJYa3uDoApuAAkisjJ; Thu, 17 Dec 2020 08:21:50 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Z/KvvwldmEHqAME+dd7Ji3RMUc4FLDEdJLlQ+/3yTmI=; b=Ju4LuAJidw9hSm50OIy3rdoY5R Vd1Zvkv3n7i1wEUpsQqLJDvMVERTlm1nHog5ckn0Ee2GdOk/Guc+IKthGnd97cbUyNo4myXUS5oSr mp7Q0AQG5xAxiR6KRfCMgEm1f; Received: from 97-122-89-243.hlrn.qwest.net ([97.122.89.243]:36646 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kpuAA-000czX-3V; Thu, 17 Dec 2020 07:21:50 -0700 From: Tom Tromey To: Martin Sebor Cc: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Re: [07/23] Add a class that multiplexes two pointer types In-Reply-To: (Richard Sandiford via Gcc-patches's message of "Thu, 17 Dec 2020 00:17:59 +0000") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) X-Attribution: Tom Date: Thu, 17 Dec 2020 07:21:49 -0700 Message-ID: <878s9wpl6q.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.89.243 X-Source-L: No X-Exim-ID: 1kpuAA-000czX-3V X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-89-243.hlrn.qwest.net (murgatroyd) [97.122.89.243]:36646 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3027.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_ABUSEAT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2020 14:22:02 -0000 >>>>> "Richard" == Richard Sandiford via Gcc-patches writes: Richard> +// A class that stores a choice "A or B", where A has type T1 * and B has Richard> +// type T2 *. Both T1 and T2 must have an alignment greater than 1, since Richard> +// the low bit is used to identify B over A. T1 and T2 can be the same. It seems like the alignment requirement could be static_assert'd, which would make using this class a bit safer. Tom