From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A221C8267A for ; Mon, 16 Nov 2020 12:37:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF02220855 for ; Mon, 16 Nov 2020 12:37:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="u+GhjXrG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728290AbgKPLYC (ORCPT ); Mon, 16 Nov 2020 06:24:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726837AbgKPLYC (ORCPT ); Mon, 16 Nov 2020 06:24:02 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F0C6C0613CF for ; Mon, 16 Nov 2020 03:24:02 -0800 (PST) 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=n5RWyxF/1o51mhBxCJh/MN7BX1oForKK9amGV75hSIk=; b=u+GhjXrG8l0eHV7xH3gNEOQHYu AZSvBNJle3i6tx/8O3YRHmXkFU5amsZxS1f33bv8TMc+Fbpj3vQ/iqZVH4MtRaMIRrTQVA26InutJ kPmTejeeMegJtQbWaV3AFykb9n5e0C3PtnZ4l81OmZ3WrY8MvWc4secy8wmzBXUj8msU//Z9Bb78a 5hBJh7Q2qpXDM0U8rLzvk6m5SBy+yaORQ4QKIM54McIl3U8m+z5n10Dfio4RonbYXNcE5m5qBzliR xELIsGGct+tff7NNF/7cQ0TLn96UYVUpDoIheyp2AXPGCFV36x61Dl9vxGhvMHJlrgfxWkJ+eicV4 WQpbPagw==; 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 1kecbx-0008MD-O7; Mon, 16 Nov 2020 11:23:53 +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 509063012C3; Mon, 16 Nov 2020 12:23:51 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0EC1F20247F13; Mon, 16 Nov 2020 12:23:51 +0100 (CET) Date: Mon, 16 Nov 2020 12:23:50 +0100 From: Peter Zijlstra To: Richard Biener Cc: "Uecker, Martin" , "gcc@gcc.gnu.org" , "amonakov@ispras.ru" , "ubizjak@gmail.com" , "luto@kernel.org" , linux-toolchains@vger.kernel.org, Will Deacon , Linus Torvalds Subject: Re: Re: typeof and operands in named address spaces Message-ID: <20201116112350.GA3121429@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: <20201116111056.GA3121378@hirez.programming.kicks-ass.net> Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Mon, Nov 16, 2020 at 12:10:56PM +0100, Peter Zijlstra 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. FWIW, clang seems to support this extension as well..