From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by sourceware.org (Postfix) with ESMTPS id ABA9F3959C87 for ; Mon, 16 Nov 2020 13:07:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ABA9F3959C87 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: sourceware.org; spf=none smtp.mailfrom=peterz@infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=xRWOpHigiF7SKdsJz8hcMkpRjIgcR5kT1IzWesHNxvw=; b=UfQpl2CsZGd3/8YF8qxYRkNZe+ 9+XoEuF4eJPw5l1oScuccx9651bAdvWurw/MhgVWEweRCd1+il5lHDHYFy7xgHKAwztZiaxERgjOQ dgby+qeA8il5XmxVl3sBI7NEgD3yoj8iRjyLB4y6tgG7u01JhGy9lf4qSwuVF/0G9bFT6rcnS1Jbt aB2r2rHHCXvLRcPEUZbIGGHnGH2spXIwak2CcVd4LQ49/Q8mkj1hfXCHDUHJf3JbUHmtittxLNyBT Jsgp62OYbSn0uagGWTo1jeX4QvaCcQZdvAqDTQeOkJ4Uhp5EP7HKWDTO+pTFdhH+nZfvRBu7WSsl7 pPol9GyA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1keeEC-0007yp-Ex; Mon, 16 Nov 2020 13:07:28 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id DF1AD3012C3; Mon, 16 Nov 2020 14:07:26 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B177920282DFC; Mon, 16 Nov 2020 14:07:26 +0100 (CET) Date: Mon, 16 Nov 2020 14:07:26 +0100 From: Peter Zijlstra To: "Uecker, Martin" Cc: "richard.guenther@gmail.com" , "gcc@gcc.gnu.org" , "ubizjak@gmail.com" , "will@kernel.org" , "luto@kernel.org" , "amonakov@ispras.ru" , "linux-toolchains@vger.kernel.org" , "torvalds@linux-foundation.org" Subject: Re: Re: typeof and operands in named address spaces Message-ID: <20201116130726.GD3121392@hirez.programming.kicks-ass.net> References: <1605437478.5370.9.camel@med.uni-goettingen.de> <20201116111056.GA3121378@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2020 13:07:31 -0000 On Mon, Nov 16, 2020 at 12:23:17PM +0000, Uecker, Martin wrote: > > > > Another way to drop qualifiers is using a cast. So you > > > > can use typeof twice: > > > > > > > > typeof((typeof(_var))_var) tmp__; > > > > > > > > This also works for non-scalars but this is a GCC extension. > > (That casts drop qualifiers is standard C. The extensions > are 'typeof' and that casts can be used for non-scalar types.) Ah, I'll clarify. Thanks!