From patchwork Tue Sep 12 10:16:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 812754 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-461901-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="U/+D2pMC"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xs1104Tpyz9s0Z for ; Tue, 12 Sep 2017 20:16:36 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=pQG1gccO4RfIqtN3W9LQ6hdpc5GwVe7gOcYZVpdVxZBKJbpMLT lD0400e2cdJBGg6X29X3SyAggUnA7dz9iq0ZXiGgCwCCl1CvUFfgDsjowKG271nG sH5zQFDzJUGFJw3tAi8lWwuBQjTpDfu3Jq0eMbxMBLCM568/ysGsoAPz4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=90Q1VygiOV3nOeEPUlyuunGzcd4=; b=U/+D2pMC1y1v1rZCrPGc ibSyfi/MJPJKxhijwKuJClE6asv2A/x4cRFVYvwb9goiE0QIb/kho28Urk4Trn5l 8eyCYgfVSXSiNfTByBrqyiVwzLfNZzdDnbVuBXZXkltmxRDC7VICJJogL4Kzw3w6 5d2xgGh8CgW0k4VJXb/Hlsg= Received: (qmail 17929 invoked by alias); 12 Sep 2017 10:16:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 17859 invoked by uid 89); 12 Sep 2017 10:16:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=UD:L X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Sep 2017 10:16:20 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 0939C56106; Tue, 12 Sep 2017 06:16:19 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5NpYrjJP4R4p; Tue, 12 Sep 2017 06:16:18 -0400 (EDT) Received: from tron.gnat.com (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) by rock.gnat.com (Postfix) with ESMTP id ED55956040; Tue, 12 Sep 2017 06:16:18 -0400 (EDT) Received: by tron.gnat.com (Postfix, from userid 4192) id EC516521; Tue, 12 Sep 2017 06:16:18 -0400 (EDT) Date: Tue, 12 Sep 2017 06:16:18 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Yannick Moy Subject: [Ada] Ignore both Global and Refined_Global in CodePeer mode Message-ID: <20170912101618.GA9706@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Only the first pragma was ignored in CodePeer mode, to allow analysis of legacy code, which caused errors when the second was also present. Now both are ignored in CodePeer mode. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-12 Yannick Moy * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global together with Global when ignoring one in CodePeer mode. Index: gnat1drv.adb =================================================================== --- gnat1drv.adb (revision 252000) +++ gnat1drv.adb (working copy) @@ -66,7 +66,7 @@ with Set_Targ; with Sinfo; use Sinfo; with Sinput.L; use Sinput.L; -with Snames; +with Snames; use Snames; with Sprint; use Sprint; with Stringt; with Stylesw; use Stylesw; @@ -272,9 +272,13 @@ Restrict.Restrictions.Set (Max_Asynchronous_Select_Nesting) := True; Restrict.Restrictions.Value (Max_Asynchronous_Select_Nesting) := 0; - -- Enable pragma Ignore_Pragma (Global) to support legacy code + -- Enable pragma Ignore_Pragma (Global) to support legacy code. As a + -- consequence, Refined_Global pragma should be ignored as well, as + -- it is only allowed on a body when pragma Global is given for the + -- spec. - Set_Name_Table_Boolean3 (Name_Id'(Name_Find ("global")), True); + Set_Name_Table_Boolean3 (Name_Global, True); + Set_Name_Table_Boolean3 (Name_Refined_Global, True); -- Suppress division by zero checks since they are handled -- implicitly by CodePeer.