From patchwork Thu Aug 1 15:17:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 95060 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 C686C3864C6A for ; Thu, 1 Aug 2024 15:35:19 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id D14DE3864C15 for ; Thu, 1 Aug 2024 15:17:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D14DE3864C15 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D14DE3864C15 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::431 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722525479; cv=none; b=w0rD41fFmcHHy8INasA96u2Mu1vtKBVbnEZWfg1lEeg7sdIuslUQd9amv6pfVZmSluB4ts92EZYDw2YeM73lTGNW52qyuJizTZSJaWLW9GIle6aNVLL0Y0+91qcqCkZfodMw3vUp++EydxX2nBU0FtIIDTQm802UjZOIVxv+iTc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722525479; c=relaxed/simple; bh=0mTxp44rzfMcmyfwHjbgSV8KgCODUgOaOUnvISxNnTE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JWegTVZiTyQlq3+M1TOEpP8pfZAk9BqkgktNMNb3PGgx1pyKXvSmR6dP/dnF0D3c7afIo0IPZZJr2D2pXewMN2J/MmWAzJAkVmUQAiMDxZ2SdvXGXvnFgO4y/LV2pbv9N2npUBXET8Nkb/vsKnB048s52kcsvAd8xxo0bJoXA9Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3683f56b9bdso3582027f8f.1 for ; Thu, 01 Aug 2024 08:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1722525475; x=1723130275; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OtLUOUfxfc+bKclqTVqB4DyZ2Bs/O1i9LNEK0sb4JZY=; b=HRy01JknHz5Zs+emTSA5XMpFYQpp0Ed3U7YecDkRlQ4dAFwjzRQ3rCzDp3mjbM5ZIT tGWUnWtfmBU7nPn12mQhRAEgWnYpcS/YhXDKDa+8efYW7WvyNzQmRvhPQljqUydOQ2Gm SX1VrjoBT5OqDeOTho8VtdMHidy8YLYveurc/f0oJlz6LQP6Y39g6dpeeFIGyRmUWn3z QU9zh2ID2+PL7ySIYyiICXoM6+cH5a/n4N8CoKD6j6jVKL2IPJx7KkfeOWIT4f5ngNwN QFNdH3NDAZH+TwieWauT26Xt5Yuy75Lo8hxci8otHTl4M0iOyoo5deCPWFRK6pFDXB7h P/1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722525475; x=1723130275; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OtLUOUfxfc+bKclqTVqB4DyZ2Bs/O1i9LNEK0sb4JZY=; b=KMEsLHQ1J+L4aMQUmuAyFcmN4Gdqy+4iw6bQHz6lfLDZmMw7g2ue8c1djwlAUUPHC/ ADIWD4bkv0dCEYnpr47J1vNNUahhOwpQnETjGszsyTC9zME2nqiGb13Xt02xguR/QLIX XtUASjlYKR7mW2ZUnsThUcq2+Yo6nW6kXQD5gnI5xPghOud1i8YUTk63xHNaDYMByF6K VtIZz55d9HiIeTkchfv1ncjrQR4U3kX76aEF9T9IMKfkkZU3cLd4b6XCAwY4ekFfdvcd wGXbqsEfGxPdSV7D82ud1uNDUrjGlpdVv+3YTkZFW9yCwKez/tVldxkxsHw4n2us7+ER HtfA== X-Gm-Message-State: AOJu0YzZqvnisOX4nQtJLn8RVVzZwOHBaqiWOxAY406pnIomKPn+ZWvs A+OZRzqQboYLwBqS8WfzYrsmdhIgapS7RSmhNROXHOkd3p5nu3ffiG7MpS2hw24aBfE8LrFteVd LBA== X-Google-Smtp-Source: AGHT+IEBiz/RgmTs8xFwCypw3vLOm8VPpC1K46fGQS6eCHGoikqiuACTIcQ5SB/7coS9im18ArbNTA== X-Received: by 2002:a05:6000:1e97:b0:367:992f:4ac4 with SMTP id ffacd0b85a97d-36bbc00526fmr150587f8f.0.1722525475296; Thu, 01 Aug 2024 08:17:55 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:b6aa:4751:9ea1:da1e]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36857fdesm20065995f8f.75.2024.08.01.08.17.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 08:17:54 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Ghjuvan Lacambre Subject: [COMMITTED 06/30] ada: Stop ignoring Component_Size attribute in CodePeer_Mode Date: Thu, 1 Aug 2024 17:17:14 +0200 Message-ID: <20240801151738.400796-6-poulhies@adacore.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801151738.400796-1-poulhies@adacore.com> References: <20240801151738.400796-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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.30 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 From: Ghjuvan Lacambre This piece of code was introduced in 2011 in order to prevent spurious false positives from appearing on specific code patterns making use of Component_Size. It seems that now this piece of code is causing small false positives instead of preventing them, so let's remove it. gcc/ada/ * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Stop ignoring Component_Size attribute in CodePeer_Mode. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch13.adb | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 957c43d689b..a7936641d34 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -6079,24 +6079,6 @@ package body Sem_Ch13 is Check_Restriction_No_Specification_Of_Aspect (N); end if; - -- Ignore some selected attributes in CodePeer mode since they are not - -- relevant in this context. - - if CodePeer_Mode then - case Id is - - -- Ignore Component_Size in CodePeer mode, to avoid changing the - -- internal representation of types by implicitly packing them. - - when Attribute_Component_Size => - Rewrite (N, Make_Null_Statement (Sloc (N))); - return; - - when others => - null; - end case; - end if; - -- Process Ignore_Rep_Clauses option if Ignore_Rep_Clauses then