From patchwork Tue Jul 12 12:25:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 1655390 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=RihxXwnK; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lj0Tp2L0Vz9sB4 for ; Tue, 12 Jul 2022 22:30:54 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0FC663887F5B for ; Tue, 12 Jul 2022 12:30:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FC663887F5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1657629048; bh=YKS2U1RcYIrjwPnxGd6rsVi8lUmpyzmnn05yZW2ZBbw=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=RihxXwnKqsGxSjY0CfgdJRlven3SxrqEDOl4HUsUfF4vFjuILr25g+N0MbWp45nz/ yH5/KOx2J2EWo0fV8ubfj7gY+r8ZE0tkFmpLMhG+9wz6NjmS/W8VbV8TxIDubpKyuN uDr1uS22x7mu8fxIPOF6zAk8PE7KyKtLM8Uaadhc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 4636C3836F97 for ; Tue, 12 Jul 2022 12:25:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4636C3836F97 Received: by mail-ej1-x630.google.com with SMTP id j22so14020964ejs.2 for ; Tue, 12 Jul 2022 05:25:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=YKS2U1RcYIrjwPnxGd6rsVi8lUmpyzmnn05yZW2ZBbw=; b=wU0Y4xi9zxYOWp1HWvHtIZxeBpGXJwYR5CSpx5k+aMHiOXqA3PiZ1KU+cRorLhz2Mp zNXDTdomaJAaZz5pWFQIqgqHTosK5KjJ4cV34yynZXrWL03g7WL8HCsDOGYA/KPl4QBC CJtgZV6hC3G/+aSPSTZp5Fnsdz03ggDhshKgMb2f+VUKkGnvE73FYn4U0mRTfIhXRn33 C9BtovooOqa3ZtkHHZr5H1TPJXKjaU/YjRDMx5aGetiRbEO8DCSPwbXpiKJ4CiXsO19q TLg5UjJP7bL9E8/h3TDQHAzW+hSq+KOSey2o8FG15oktRJhC2cuHwdKZ1Kp92COAqBVi rxCQ== X-Gm-Message-State: AJIora/H94sAEiQ1ENXcYZNm5uCctIX/NB/TpKhy+Vp+s6D8ptfp5tXb fxNC+/GmFqg3mDx8UKZL1hPHTLVoXwomKQ== X-Google-Smtp-Source: AGRyM1uFLuzBBK+VKgmi/qvlfnHAAk2JHMw7aHXzWjnWQH5Zp883jxoV0B4z1JRodgbOZ6CEBmxpJQ== X-Received: by 2002:a17:906:685:b0:6fa:8e17:e9b5 with SMTP id u5-20020a170906068500b006fa8e17e9b5mr22861214ejb.522.1657628734073; Tue, 12 Jul 2022 05:25:34 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id v5-20020aa7cd45000000b0043a43fcde13sm5971972edw.13.2022.07.12.05.25.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:25:33 -0700 (PDT) Date: Tue, 12 Jul 2022 12:25:33 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] Don't check for misspelling of Not_A_Restriction_Id Message-ID: <20220712122533.GA3404936@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-13.2 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, 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 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: , X-Patchwork-Original-From: Pierre-Marie de Rodat via Gcc-patches From: Pierre-Marie de Rodat Reply-To: Pierre-Marie de Rodat Cc: Piotr Trojanek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" When looking for a misspelling of a restriction identifier we should ignore the Not_A_Restriction_Id literal, because it doesn't represent any restriction. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Fix range of iteration. diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -10561,7 +10561,7 @@ package body Sem_Prag is -- Check for possible misspelling - for J in Restriction_Id loop + for J in All_Restrictions loop declare Rnm : constant String := Restriction_Id'Image (J);