From patchwork Thu May 19 14:16:19 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: 1633293 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=yQF5VhAp; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4L3srF3d9Gz9tkj for ; Fri, 20 May 2022 00:37:00 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 47E9E3838019 for ; Thu, 19 May 2022 14:36:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 47E9E3838019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1652971018; bh=Lkd22x6EnS3eW23vEJ51h1mO3ELm/EXBMUTVnYuy5MI=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=yQF5VhAp32HjFZuXOb/Go74Mc7ReypJj9tfi9zVYj3PN5jXX/1ilspmdYjQbQ71Nu 8TxeGIKmRXnAJV/dnoQcoMyOP8f6yLMlv4zphymXiXYJdNmknPQ82+Oy+Wa5y8Ptzi fHOsG4PT2Rpe8gsad5aSdFttTW5q/BIP0zPfI3UE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 4467D383E820 for ; Thu, 19 May 2022 14:16:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4467D383E820 Received: by mail-wm1-x331.google.com with SMTP id i20-20020a05600c355400b0039456976dcaso3615731wmq.1 for ; Thu, 19 May 2022 07:16:21 -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=Lkd22x6EnS3eW23vEJ51h1mO3ELm/EXBMUTVnYuy5MI=; b=zioNsXKx07CUQosJNX3QWY0bljiQKlvtqzWpRbx7SAAETmaEbRdev9Rq7qNFxnPXRR DQlDKhiDKXkjH9i/pEk+N/HFa8wP9puM/NqCfml5cf1XVNDRwwBRuvCc9QCvzPfxWB11 4iGea0Mvrl+LktZz6wbsXJKpYT8JH6MOc2+XX2GaD8XqdGBxTcwIf8MisZpcvjyUHNak JxQYbpnJyOiilTwE0PdWOz7ZvtCO8vb6PXaGXw/bEHoDJvpLVatLzsPeWHAlz8vha3Kj UQPyOk7XyMtOmVPLNUljuesUtYvTj3ptDyc4eSTpVrvSq8LwyVzMNl731c+wHLbVw0S3 osSQ== X-Gm-Message-State: AOAM5300G21GiYh15DFvFu5tyKCNkXzjghUdUY3DchaVUluc6hvRlht0 CEeyssVDYQkpsliJfABRRdQKKWdWXsK6qA== X-Google-Smtp-Source: ABdhPJzKs4LvI4lRTph7J3RfWSwQZXBckzZaf7OKlEXaQQffjd9sxy42apMpQRI5ezXpjoEOrd2Vcw== X-Received: by 2002:a05:600c:1d08:b0:394:54ee:c994 with SMTP id l8-20020a05600c1d0800b0039454eec994mr4004060wms.137.1652969780671; Thu, 19 May 2022 07:16:20 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id o16-20020a05600c511000b003942a244ec8sm4742486wms.13.2022.05.19.07.16.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 07:16:20 -0700 (PDT) Date: Thu, 19 May 2022 14:16:19 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] Remove redundant marking of illegal pragma with error posted Message-ID: <20220519141619.GA3723455@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" We flag illegal pragma Elaborate with a call to Error_Msg on the pragma argument, which in turn calls Set_Error_Posted on the enclosing statement, i.e. on the pragma itself. The explicit call to Set_Error_Posted on the pragma itself was redundant. Cleanup related to handling of illegal code when detecting uninitialized scalar objects. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_prag.adb (Analyze_Pragma): Remove redundant call to Set_Error_Posted. 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 @@ -16008,7 +16008,6 @@ package body Sem_Prag is end loop Innr; if Citem = N then - Set_Error_Posted (N); Error_Pragma_Arg ("argument of pragma% is not withed unit", Arg); end if;