From patchwork Wed Oct 5 11:49:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 58389 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 53B15385E037 for ; Wed, 5 Oct 2022 11:50:10 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 008463853556 for ; Wed, 5 Oct 2022 11:49:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 008463853556 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 24AFD1F899 for ; Wed, 5 Oct 2022 11:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1664970594; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xTiZN9Hmw93D2rz9DRrrxVmPZmmiTE5MTximsr/JU7w=; b=aaLevVc1sdSyohHluzRvfTKY8gWCp0WmGAva2Nwh1qJnZg6cj/kbopoyMAnc2HVaGLIXaY NIdoylHd3+8BEOqcz2vS55cr8GUwZ3uh1CBqHxKRDIYd4bs8chVxVGjoISsl1x6PTLx0p9 taAoX9w9FI5OKkow8qpee0SRsiVoZiQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1664970594; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xTiZN9Hmw93D2rz9DRrrxVmPZmmiTE5MTximsr/JU7w=; b=S80NT5h1cqpvRo4R4jyK38M7NYZag0r0FDaUjYf30VmYBtvB/B8mBA3CcB+ioy1fdQWBdV woGsT5DxPDxqLtDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0DD4A13345 for ; Wed, 5 Oct 2022 11:49:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id lqQIAmJvPWPTWAAAMHmgww (envelope-from ) for ; Wed, 05 Oct 2022 11:49:54 +0000 Message-ID: Date: Wed, 5 Oct 2022 13:49:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] c: support attribs starting with '_' To: gcc-patches@gcc.gnu.org References: Content-Language: en-US In-Reply-To: X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" PR c/107156 gcc/ChangeLog: * attribs.h (lookup_attribute_by_prefix): Support attributes starting with underscore (like _noreturn, or __Noreturn). --- gcc/attribs.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/attribs.h b/gcc/attribs.h index b2836560fc2..706d35e63d8 100644 --- a/gcc/attribs.h +++ b/gcc/attribs.h @@ -274,8 +274,6 @@ lookup_attribute_by_prefix (const char *attr_name, tree list) } const char *p = IDENTIFIER_POINTER (name); - gcc_checking_assert (attr_len == 0 || p[0] != '_'); - if (strncmp (attr_name, p, attr_len) == 0) break;