From patchwork Fri Nov 17 02:53:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Carlotti X-Patchwork-Id: 165977 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp263250vqn; Thu, 16 Nov 2023 18:53:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHIZ4tEV85jVI5zGoi1QFzK8kScTTprseghtzw1hSnthyc0HrULYjh6PdZ3/F2oJWqJ7abz X-Received: by 2002:ad4:4e6d:0:b0:66d:2435:b3f8 with SMTP id ec13-20020ad44e6d000000b0066d2435b3f8mr9192961qvb.4.1700189635128; Thu, 16 Nov 2023 18:53:55 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1700189635; cv=pass; d=google.com; s=arc-20160816; b=yioZ1yvTEYr1e7RWDanBtEwlLnz5ete48RY3SRlICw0Br4xsVgXAwG2ZQdP+uiWv7b 7M8NGayR5SRsxVpTb3mPOug7t+RmEl279Nr6M6NCyaV1FN0u81FWYFxL95/LOLxSrwpB otjVWdIu8pfTC70Qn/gBk22GvT/1EjqA31SVTzzKQDrEfY9onno2i7/z82oeZ8qUVOCm E9iXIGdJGagiacUiW/J0i3vHD6mQ7cw773s4HWqWtSVaCEeM4jceHhBN4LmaV5P5OHjC HH8DpicEBk/AXEr1McEw66qfWqspHO4LnIohw8HIWKLP1sddczL8O6TiBJt22Pec3ax3 DJrw== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date :authentication-results-original:dkim-signature:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=fJxy/sfd3UtXmE9kM+UB8m46uqW7+wjMwQqVELxYwOU=; fh=c97l7tNY4uySJtRltYKrq/HN5hcV15xwhnkOEwrZ84g=; b=1GEoQUirwcyZ/ZvKPzKEJkwGtJVCjoWOsBlUxWL8Tra9EaI1sq2l+P4aKLKHGRhCM9 ZZul2KFujTEMqNGR4dU1g/xM+aygia+/g2O6eLLfMwWHuzHPsiJLQHn6IUX4/53Hw5hj tU40TCBwKFeMP7OrAz28xjTLiP2WbTOBEfzR1Mds7xXs+0viqTR7RVh2hXY+HQL1o7qA LXF+0SVdGqps6KVA3nzm8UJzgOFoA5fciWlexyofgdfbJ1ygCf6uD9dKCto8Y198r9vz hw///mOmb25nEzG0z/im3EU3L1UoXEOYaT0OzSgFf+fVlMVIQJJNuJLpkymtNLFs88sK OmcQ== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=fetfYMQL; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=fetfYMQL; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v7-20020ad45287000000b00646f2d31709si804974qvr.178.2023.11.16.18.53.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 18:53:55 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=fetfYMQL; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=fetfYMQL; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D6F033858414 for ; Fri, 17 Nov 2023 02:53:54 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2081.outbound.protection.outlook.com [40.107.7.81]) by sourceware.org (Postfix) with ESMTPS id 161D53858D37 for ; Fri, 17 Nov 2023 02:53:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 161D53858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 161D53858D37 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.7.81 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1700189610; cv=pass; b=yB7/8T6zEJJS1Ktij0HPz29pcmfIrs5lslMtysY9WAF/08erpZMwM4A6IIvDa/ZJqJ5ny26EOQ8bOK0k+8yttRl9LvY9SycgD0aoN3HRqUvSpVJpIc3oXhYywm5N940tjJOI68mU53E+BHJbLAtVoz2UoAV9XG0hwVet0chL1zg= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1700189610; c=relaxed/simple; bh=P6ghWGBIhLPS+oMowenngwHYi+szUSx70ZTw/DqM3BY=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=Vcgv3y9prBC8H6IlMvpQQjD+QhBayhnkXDZ4Rb/Cegne9Y6EPsJe/x4sWjJLpFSgG8pMGrWj3+M3mqPiA5qwLnO8AxPXkuqVruV1mflWB7iY98CTHddr9mr7WonbAJFwHeLwC5v16CM6Mq6EFNcpbfPwftRJ/r8c6NsE5j+95EE= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=HOts3yjNtVLb+kwDjixySsLmQ/BLzsR2rVakTT/5Ug0B3A+cjn4Ke79HNtHgFOQsiITz4S397qyMF4vBk9mKuLMUSmdBc6KRZa/z32ZVW6R+vDxHMSdPYxXKSjc0sUtUkXd557h6kRokO/1zjCrqZRGGAmdCfgkLzjRbTcqkN61iusXscQ+FfViYnn76cw1Gt1sXxmVTC/Djl4KyTGNm/7oQJlqrcAhMEybtERCQip8pKgCpqec+aT2hxtQk+nh5Q2o6Zf9LNL7kHXVivoM2n2LiHArTMslNg6tMNqyjL7xmoZ+DLccXVYA48RHA5031NHneFRBCH4FAbDsNg8Wljg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fJxy/sfd3UtXmE9kM+UB8m46uqW7+wjMwQqVELxYwOU=; b=Rnom4Ei/uVEdOZ7Z/zcbl7USy5E+WrXHP+1ZQnEbTQUH9QqQsyNJdtwLW5T1UaflkF7aONeSf/iRb9QJ+gufPRwhM4xa/L03a+0u+i/3cjVE1jpLvBmj/rKB0KNuB9JASBNl0rG0HZxX2FKlELv/Nz7BrVHN5O6XNsAmN8SkTRI3mHbCs73KSmkLheK3+sxadWOUUD5V0BZlVJ+zQ/Q3SwTvqV5sh+PM97PVlLK05NmR4vOChZToi6B1hdZ7ZaJjzE1QKZ7tc/9q6x2n/yokK7D7c3Xu6JwF41BVgI7NOEcI3KCtrT9TfkGLppu7Dy9bPR1NCdJv9kJIpX/3Qin95g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fJxy/sfd3UtXmE9kM+UB8m46uqW7+wjMwQqVELxYwOU=; b=fetfYMQLMCJ/acXE3NS2Zx+4sTj7+QBHgZeLENa0k/y3Ge+KNjTAj8kSnTYikTLfhp2b2hfEGKeMU3OajgMZ9QsS1svLyYdSm6penKkux8wFJJ+mqcHN/AY1hzl8MYvbymBj8NI4YfhkyEKryXysHPMmCgh8KFFDLqSaJxOY4e8= Received: from AS9PR05CA0360.eurprd05.prod.outlook.com (2603:10a6:20b:490::12) by AS8PR08MB9573.eurprd08.prod.outlook.com (2603:10a6:20b:61b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.18; Fri, 17 Nov 2023 02:53:22 +0000 Received: from AM2PEPF0001C714.eurprd05.prod.outlook.com (2603:10a6:20b:490:cafe::4e) by AS9PR05CA0360.outlook.office365.com (2603:10a6:20b:490::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.21 via Frontend Transport; Fri, 17 Nov 2023 02:53:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM2PEPF0001C714.mail.protection.outlook.com (10.167.16.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.19 via Frontend Transport; Fri, 17 Nov 2023 02:53:22 +0000 Received: ("Tessian outbound 26ee1d40577c:v228"); Fri, 17 Nov 2023 02:53:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 90b4c45a5148ad8c X-CR-MTA-TID: 64aa7808 Received: from 836e2e00f4ae.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1ABF7DE1-34BA-4AB7-A45D-8F796F8F3DE4.1; Fri, 17 Nov 2023 02:53:11 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 836e2e00f4ae.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 17 Nov 2023 02:53:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e2WhWhsJyJWtM3Ak0M4z658bYh/8dLGanc24KIkOBah0gvtNol59ZSL/FQG+lJkLDfeCtRtyXMxdg5hW6D4NDYzldHwx3hu/Ubeean+L5JMdeLALUpgvleQXrnMTmrRMyXGVSXMP7of6l06OPB12JIcso4j/X31cONH2KCHGeJoDlvrybB5cxkLwlD7qxMG6XV5PDkPfSiMFP4fpJwjOmWnTsKdukiMt/zcyN7MYcr6Ofxa5Wa2nhhNmmm3PfWJ77vsZD46KRVb7hpueOqQpbSm7gqSCEngmMefEQmJJfvv1yRQlMA0wKADKAtR6/PI4oHrXCpz1D4m8LbPa9s3vmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fJxy/sfd3UtXmE9kM+UB8m46uqW7+wjMwQqVELxYwOU=; b=eOWVYpSwo4KLAbOCUIFREQeZMwqKhK0Gzted3PEKNn6GqyowEY5zrE6oyp7yEmYuW7v8YY02RCPVrEwZgO2Fd+sT7bVsv5F/qI4CJGrNsksd6Nf4gG6FiejhbXDnER+3UYbqBtTKr/Eu7N+mNo9V7NaCZ+v8I3SP1EvVW5wcoX+4MjBFiD0N6K5OdEn88LqzAW5zuQVBt0yxVVJ2mOerPSbKW642dmplie0rdyQ0ER55Rz0KMb8k2fIu/X/NcTiPSjm/wjmjNkskxXtllKcUyvF/WEsnImVXzXa6TTb0eTLTG2G95U7DfezkgoEvogt+2NIS7ubSv6M14ZQWpMcEAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fJxy/sfd3UtXmE9kM+UB8m46uqW7+wjMwQqVELxYwOU=; b=fetfYMQLMCJ/acXE3NS2Zx+4sTj7+QBHgZeLENa0k/y3Ge+KNjTAj8kSnTYikTLfhp2b2hfEGKeMU3OajgMZ9QsS1svLyYdSm6penKkux8wFJJ+mqcHN/AY1hzl8MYvbymBj8NI4YfhkyEKryXysHPMmCgh8KFFDLqSaJxOY4e8= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) by AS8PR08MB9409.eurprd08.prod.outlook.com (2603:10a6:20b:5a8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.21; Fri, 17 Nov 2023 02:53:10 +0000 Received: from AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::af15:c9d7:cd8c:6da2]) by AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::af15:c9d7:cd8c:6da2%7]) with mapi id 15.20.7002.022; Fri, 17 Nov 2023 02:53:10 +0000 Date: Fri, 17 Nov 2023 02:53:05 +0000 From: Andrew Carlotti To: gcc-patches@gcc.gnu.org Cc: jason@redhat.com, nathan@acm.org, rguenther@suse.de, richard.sandiford@arm.com, richard.earnshaw@arm.com Subject: [PATCH v2 2/5] c-family: Simplify attribute exclusion handling Message-ID: <408e5c77-961f-4613-009f-d0dea61a37ca@e124511.cambridge.arm.com> References: <88dc78af-82a3-9a9f-4b8e-461c41d296cc@e124511.cambridge.arm.com> Content-Disposition: inline In-Reply-To: <88dc78af-82a3-9a9f-4b8e-461c41d296cc@e124511.cambridge.arm.com> X-ClientProxiedBy: LO4P123CA0181.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a4::6) To AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6678:EE_|AS8PR08MB9409:EE_|AM2PEPF0001C714:EE_|AS8PR08MB9573:EE_ X-MS-Office365-Filtering-Correlation-Id: 188b2fd9-047c-4630-a9b1-08dbe7185ce4 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: q9xYPhzFvJBC0MsUuKO5ZqNTmy1jzPLyE2/LuyWmihsrq/iNhtNVbmmrLkB+VMYitIpTLkbWUc/9Scfa8Vh18wr0kQxkHYxTDzM+MrXUOS34bOtrpVdgyb9ic0r3ywwbz3LlGpGvUX5DTzodeY+61YWPRZ1QZrohUzZNOc/TQZ11L/pXWoAFjlbdhzfrcx3uyQpfYRLl39VLUTk4veCIQwbkq+CzLuvmKTtaH0KkJci/JlTPYmyxI01bQAQbsT6AzzW1BzbA/4qq7WC5T0MrAOji1YELnwOxGpbm0TsE7isaLZ2BSbXT6X8fnMdHc32i6RGf1FRCC3CUNLLAMz3XN2WyeWCDk7LqF3XCRXpx5nJtqTWIzzYpjhMt0Y3I06JKk1Ao/A/tS41uLv/gd09XuEAPJB+3OXEm44p3Fwi64LWngyEK15PXO9zzTYe59opKxkcgFPfB6YUwHQKYNZ77u9LKDW5ZOEoAnnPNP3AKRaiHD+K2AZyB2vQpJtS1C5zzu6ITJD25Kvm2/5F+/gpUqf8Ms4IA+LHVV0FHLeNqKaB0cc80mUO/eRMxLOsvsbNfQkfgjOj6x7+vc/ouoK6OcLZFJC6NPMoU4/oaYnWQlPwF6GJ6HVEMaxdL8rlmUyez X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB6678.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(366004)(39860400002)(376002)(396003)(136003)(230273577357003)(230922051799003)(230173577357003)(1800799009)(186009)(64100799003)(451199024)(2906002)(31686004)(38100700002)(31696002)(86362001)(5660300002)(44832011)(4326008)(41300700001)(8936002)(8676002)(83380400001)(6916009)(6512007)(316002)(26005)(66556008)(66946007)(66476007)(6666004)(478600001)(6506007)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9409 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM2PEPF0001C714.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6867f7c7-6e72-4799-2f29-08dbe7185562 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AMvbYYNdxMtwDRcfmy1oVhtaOsMJsKRQgrO6np3lGXQo3I9kBYyzIWJpm18mYGIzZWx0ZA39XNwG7TBX+XA53VUAyxFFHCOU49awVayyBdn9tDRvNqF+aIOGB4kjdIwIJ3Kha1utj80RnOu+LtR0p6am8X6xrkarLWaQt/Ux6LfqHADBY3uV3nl/XAox0R3uHVgfb4ELjp/KErpq9Ck9EWa2/0/+9QracTj3hUGI6825m1J3l/HohL7/IOADaMYa4e4ZiJgHDEaOef5RJ5/DkeywliDwKc5Tm4nOi222ebSRtH6LWWBSKXhmWLly6BMhCxjnnHUIMi3jDnKFhDU/oA/jBP3gZz/+sItRhXzaB3fbdugvIkeOzjCmXl3hDrZP/HyLVAxnAoQX30kEaYg2uxITVizKQt+UoDupKfevWjtqM+xtuA+rHAd8YhRwg3mNbXYyvIu+dOqtW4BF8sMw+93b+MQ/CZCrRjT5BQty0Y35sOYbVVATaQpzhAKOMq1fW2W7A+P0wYFfmUfYyL5NLV10Jl35FqjUAcWHRLchOi5vMAi56r6gNyj5dbqHH9d7lY7o+L7PP6HE7F81nwkBmQ220mhguRFacr9eaMnbQoXYOTrvRCVTjJYsev8y/zLfsfmXryf7Mmk7slwYLlFb/fOSymlXcNe+FNgN5sRE4HfR2QOsIjzUngX/wLIffDdkwM2j4uGu2rkHbJYVV3KDEzzT7DJ7y4vykrYjrRNsclwycZgjf2lrN3z1a8xbzJ7F6a6fy4ECsZP6mEJCok59joniLmhajrn4IMd8Hyn5/hQ= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(4636009)(376002)(136003)(396003)(346002)(39860400002)(230922051799003)(230273577357003)(230173577357003)(186009)(1800799009)(451199024)(64100799003)(82310400011)(40470700004)(46966006)(36840700001)(31696002)(2906002)(478600001)(6486002)(6512007)(6506007)(40460700003)(6666004)(86362001)(70206006)(5660300002)(44832011)(70586007)(8676002)(316002)(36860700001)(8936002)(6916009)(41300700001)(47076005)(82740400003)(31686004)(4326008)(81166007)(356005)(83380400001)(26005)(336012)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2023 02:53:22.6153 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 188b2fd9-047c-4630-a9b1-08dbe7185ce4 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C714.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9573 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782778047130217519 X-GMAIL-MSGID: 1782778047130217519 This patch changes the handling of mutual exclusions involving the target and target_clones attributes to use the generic attribute exclusion lists. Additionally, the duplicate handling for the always_inline and noinline attribute exclusion is removed. The only change in functionality is the choice of warning message displayed - due to either a change in the wording for mutual exclusion warnings, or a change in the order in which different checks occur. Ok for master? gcc/c-family/ChangeLog: * c-attribs.cc (attr_always_inline_exclusions): New. (attr_target_exclusions): Ditto. (attr_target_clones_exclusions): Ditto. (c_common_attribute_table): Add new exclusion lists. (handle_noinline_attribute): Remove custom exclusion handling. (handle_always_inline_attribute): Ditto. (handle_target_attribute): Ditto. (handle_target_clones_attribute): Ditto. gcc/testsuite/ChangeLog: * g++.target/i386/mvc2.C: * g++.target/i386/mvc3.C: diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc index 461732f60f7c4031cc6692000fbdddb9f726a035..b3b41ef123a0f171f57acb1b7f7fdde716428c00 100644 --- a/gcc/c-family/c-attribs.cc +++ b/gcc/c-family/c-attribs.cc @@ -214,6 +214,13 @@ static const struct attribute_spec::exclusions attr_inline_exclusions[] = ATTR_EXCL (NULL, false, false, false), }; +static const struct attribute_spec::exclusions attr_always_inline_exclusions[] = +{ + ATTR_EXCL ("noinline", true, true, true), + ATTR_EXCL ("target_clones", true, true, true), + ATTR_EXCL (NULL, false, false, false), +}; + static const struct attribute_spec::exclusions attr_noinline_exclusions[] = { ATTR_EXCL ("always_inline", true, true, true), @@ -221,6 +228,19 @@ static const struct attribute_spec::exclusions attr_noinline_exclusions[] = ATTR_EXCL (NULL, false, false, false), }; +static const struct attribute_spec::exclusions attr_target_exclusions[] = +{ + ATTR_EXCL ("target_clones", true, true, true), + ATTR_EXCL (NULL, false, false, false), +}; + +static const struct attribute_spec::exclusions attr_target_clones_exclusions[] = +{ + ATTR_EXCL ("always_inline", true, true, true), + ATTR_EXCL ("target", true, true, true), + ATTR_EXCL (NULL, false, false, false), +}; + extern const struct attribute_spec::exclusions attr_noreturn_exclusions[] = { ATTR_EXCL ("alloc_align", true, true, true), @@ -332,7 +352,7 @@ const struct attribute_spec c_common_attribute_table[] = handle_leaf_attribute, NULL }, { "always_inline", 0, 0, true, false, false, false, handle_always_inline_attribute, - attr_inline_exclusions }, + attr_always_inline_exclusions }, { "gnu_inline", 0, 0, true, false, false, false, handle_gnu_inline_attribute, attr_inline_exclusions }, @@ -483,9 +503,11 @@ const struct attribute_spec c_common_attribute_table[] = { "error", 1, 1, true, false, false, false, handle_error_attribute, NULL }, { "target", 1, -1, true, false, false, false, - handle_target_attribute, NULL }, + handle_target_attribute, + attr_target_exclusions }, { "target_clones", 1, -1, true, false, false, false, - handle_target_clones_attribute, NULL }, + handle_target_clones_attribute, + attr_target_clones_exclusions }, { "optimize", 1, -1, true, false, false, false, handle_optimize_attribute, NULL }, /* For internal use only. The leading '*' both prevents its usage in @@ -1397,16 +1419,7 @@ handle_noinline_attribute (tree *node, tree name, int ARG_UNUSED (flags), bool *no_add_attrs) { if (TREE_CODE (*node) == FUNCTION_DECL) - { - if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (*node))) - { - warning (OPT_Wattributes, "%qE attribute ignored due to conflict " - "with attribute %qs", name, "always_inline"); - *no_add_attrs = true; - } - else - DECL_UNINLINABLE (*node) = 1; - } + DECL_UNINLINABLE (*node) = 1; else { warning (OPT_Wattributes, "%qE attribute ignored", name); @@ -1487,22 +1500,9 @@ handle_always_inline_attribute (tree *node, tree name, { if (TREE_CODE (*node) == FUNCTION_DECL) { - if (lookup_attribute ("noinline", DECL_ATTRIBUTES (*node))) - { - warning (OPT_Wattributes, "%qE attribute ignored due to conflict " - "with %qs attribute", name, "noinline"); - *no_add_attrs = true; - } - else if (lookup_attribute ("target_clones", DECL_ATTRIBUTES (*node))) - { - warning (OPT_Wattributes, "%qE attribute ignored due to conflict " - "with %qs attribute", name, "target_clones"); - *no_add_attrs = true; - } - else - /* Set the attribute and mark it for disregarding inline - limits. */ - DECL_DISREGARD_INLINE_LIMITS (*node) = 1; + /* Set the attribute and mark it for disregarding inline + limits. */ + DECL_DISREGARD_INLINE_LIMITS (*node) = 1; } else { @@ -5650,12 +5650,6 @@ handle_target_attribute (tree *node, tree name, tree args, int flags, warning (OPT_Wattributes, "%qE attribute ignored", name); *no_add_attrs = true; } - else if (lookup_attribute ("target_clones", DECL_ATTRIBUTES (*node))) - { - warning (OPT_Wattributes, "%qE attribute ignored due to conflict " - "with %qs attribute", name, "target_clones"); - *no_add_attrs = true; - } else if (! targetm.target_option.valid_attribute_p (*node, name, args, flags)) *no_add_attrs = true; @@ -5696,19 +5690,7 @@ handle_target_clones_attribute (tree *node, tree name, tree ARG_UNUSED (args), } } - if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (*node))) - { - warning (OPT_Wattributes, "%qE attribute ignored due to conflict " - "with %qs attribute", name, "always_inline"); - *no_add_attrs = true; - } - else if (lookup_attribute ("target", DECL_ATTRIBUTES (*node))) - { - warning (OPT_Wattributes, "%qE attribute ignored due to conflict " - "with %qs attribute", name, "target"); - *no_add_attrs = true; - } - else if (get_target_clone_attr_len (args) == -1) + if (get_target_clone_attr_len (args) == -1) { warning (OPT_Wattributes, "single % attribute is ignored"); diff --git a/gcc/testsuite/g++.target/i386/mvc2.C b/gcc/testsuite/g++.target/i386/mvc2.C index 7c1fb6518d04f404123086660c32853dcd9f65ba..04ee0573d607f6de2e7ea382e891f62884c18ea7 100644 --- a/gcc/testsuite/g++.target/i386/mvc2.C +++ b/gcc/testsuite/g++.target/i386/mvc2.C @@ -3,7 +3,7 @@ __attribute__((target_clones("avx","arch=slm","default"))) __attribute__((target("avx"))) -int foo (); /* { dg-warning "'target' attribute ignored due to conflict with 'target_clones' attribute" } */ +int foo (); /* { dg-warning "ignoring attribute 'target' because it conflicts with attribute 'target_clones'" } */ __attribute__((target_clones("avx","arch=slm","default"),always_inline)) -int bar (); /* { dg-warning "'always_inline' attribute ignored due to conflict with 'target_clones' attribute" } */ +int bar (); /* { dg-warning "ignoring attribute 'always_inline' because it conflicts with attribute 'target_clones'" } */ diff --git a/gcc/testsuite/g++.target/i386/mvc3.C b/gcc/testsuite/g++.target/i386/mvc3.C index 5d634fd7ea68b905a0e93ca1c25f6907bc9d2858..5ad1f88fd2d7da74fafcafcff24b77cb2d12a5a0 100644 --- a/gcc/testsuite/g++.target/i386/mvc3.C +++ b/gcc/testsuite/g++.target/i386/mvc3.C @@ -3,7 +3,7 @@ __attribute__((target("avx"))) __attribute__((target_clones("avx","arch=slm","default"))) -int foo (); /* { dg-warning "'target_clones' attribute ignored due to conflict with 'target' attribute" } */ +int foo (); /* { dg-warning "ignoring attribute 'target_clones' because it conflicts with attribute 'target'" } */ __attribute__((always_inline,target_clones("avx","arch=slm","default"))) -int bar (); /* { dg-warning "'target_clones' attribute ignored due to conflict with 'always_inline' attribute" } */ +int bar (); /* { dg-warning "ignoring attribute 'target_clones' because it conflicts with attribute 'always_inline'" } */