From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 84D1A3858029 for ; Fri, 2 Feb 2024 14:49:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 84D1A3858029 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=linux.intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 84D1A3858029 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706885363; cv=none; b=kwnAsu7qHreImtEDVJgsGp4FXaxvJXQ6KUVNTbfQLnFDanqGAPTl+rpyOWibhnMZMB2XZIqMOpk9ibVkaFJvP5kfcIWyiZf3dllRO3QGOVhhRU14kceDgbKd2v4aOVao5PRfgId5MOurJ2n7IHXuxT187fcw/hjsokimBNyYsdY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706885363; c=relaxed/simple; bh=onrzqrKRBYsg7KSiP0qh6jB7S88IW1Sf7W2f7zI6PCI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=cWJKvYcbQKS8x/lz109ZVaDsWJjfmdJMkgJNHyPQJ73HU2ZY24ybgnag3sXWj6zZcmNA79l2kaG6MyMxmZcivnhi1VQgve8ZIdQUmBCWT2nOs4nfSjbSSY9dTibccMuittjz2xEpeJ/0WjT8aZxv2avjFpNjC5ofA8UXgZCkYP0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mgamail.intel.com ([198.175.65.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVuqz-0002yb-SH for gcc-patches@gnu.org; Fri, 02 Feb 2024 09:49:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706885357; x=1738421357; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=onrzqrKRBYsg7KSiP0qh6jB7S88IW1Sf7W2f7zI6PCI=; b=dxevaKeF+vm/7bLt2rrgg2xFhORLnCko/JuKgKKq+dmvQHKFwTO6mKes qGUROAFdB3ekPNZbMFS5PYoSdYSKQg91zy6/LVTvlzzedDZDlAnQ7WIrl xAWas0MKiYCL5hAGey40DJrOFVqXAESlHBS/lGNQ4KnNrqKLKDzpfp3wK +nQiUkbAKL/KkDL0CJcTAGVJbhEZOuBbtw+02gfKsGbCyw18gXU9xJyCB kpm4+C7kL452d0ejmYKs1UhfdRK6f81H/VdEjqZbh9aB2nx9csEB+BsWT qA0w2cR/5A6aJJZlroIEjbleMorLGofshNOQkJSX/e1/cGlmwdKlfOi/p w==; X-IronPort-AV: E=McAfee;i="6600,9927,10971"; a="82082" X-IronPort-AV: E=Sophos;i="6.05,238,1701158400"; d="scan'208";a="82082" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2024 06:49:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,238,1701158400"; d="scan'208";a="4683509" Received: from tassilo.jf.intel.com (HELO tassilo) ([10.54.38.190]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2024 06:49:16 -0800 Date: Fri, 2 Feb 2024 06:49:14 -0800 From: Andi Kleen To: Joseph Myers Cc: gcc-patches@gnu.org Subject: Re: Updated musttail patches Message-ID: References: <20240202091322.1898280-1-ak@linux.intel.com> <8cdcb471-a75f-3a4c-32cf-3caba0433abb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cdcb471-a75f-3a4c-32cf-3caba0433abb@redhat.com> Received-SPF: none client-ip=198.175.65.19; envelope-from=ak@linux.intel.com; helo=mgamail.intel.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9,DKIMWL_WL_HIGH=-2.276,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_EF=-0.1,SPF_HELO_NONE=0.001,SPF_NONE=0.001,T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-14.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Feb 02, 2024 at 01:18:06PM +0000, Joseph Myers wrote: > On Fri, 2 Feb 2024, Andi Kleen wrote: > > > This patchkit implements a [[musttail]] attribute for C/C++. > > > > v4: > > Addressed all feedback except clang::musttail is still supported > > (I don't want to force an #ifdef to most users) and I'm also still > > I'm fine with supporting [[clang::musttail]]. What shouldn't be supported > is plain unnamespaced [[musttail]], at least for C, and I don't see any It's unsupported since v4 ("" -> "gnu" for the lookups) > tests that that's not supported (there are tests of [[musttail]] on things > that aren't returns, but that's mixing two different issues - > [[gnu::musttail]] shouldn't be accepted on non-returns, while [[musttail]] > shouldn't be accepted anywhere, including on returns, because it's not a > standard attribute). I added some extra tests for this (passing) diff --git a/gcc/testsuite/c-c++-common/musttail5.c b/gcc/testsuite/c-c++-common/musttail5.c index 71f4de40fc6d..7938e7ff80e4 100644 --- a/gcc/testsuite/c-c++-common/musttail5.c +++ b/gcc/testsuite/c-c++-common/musttail5.c @@ -19,7 +19,10 @@ int foo2(int p) int i; -void foo3(void) +int foo3(void) { [[musttail]] i++; /* { dg-warning "attribute" } */ + [[musttail]] if (i > 10) /* { dg-warning "attribute" } */ + [[musttail]] return foo2(i); /* { dg-warning "attribute" } */ + return 0; }