From patchwork Tue Jan 6 09:07:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 425572 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 7FC8B140082 for ; Tue, 6 Jan 2015 20:07:47 +1100 (AEDT) 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=kGpcM915nsjhrlR+eq7Hm4hjbMNhC2SECDTnUFa6Xo14jT7uh2 /FEWekrAdJnzi7sJZqU8RtxPGRbPZIMnyt4eAwYcu/+VjYiC5od8U6MxtNa+tXfi 3KN0tNP4iXd4kZgh8wsG6VyE1hP6xTxHuadywEI2nmesewia/OXLFSWpE= 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=Lv8hmeAElNwIAJkQnd4AWwAyx9g=; b=qAHDORt/jHWW+Z5LAru/ fFyalx991SbGif78fxiFL86yYPZAH+NNCGGaSCUClUPmBTFOCXCvOiOW6xYrrD0l gJ5Yt2XyDzUf7XX6eISN/K8A22jscamynL1Vz0jgQNYZGAWMi9ZvZB2pkrU1L2CM NsRZFICE1QbHIvvMbPMxpI8= Received: (qmail 11777 invoked by alias); 6 Jan 2015 09:07:40 -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 11763 invoked by uid 89); 6 Jan 2015 09:07:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 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 (AES256-SHA encrypted) ESMTPS; Tue, 06 Jan 2015 09:07:38 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F0DD3116432; Tue, 6 Jan 2015 04:07:35 -0500 (EST) 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 qIQfjeoX6k3J; Tue, 6 Jan 2015 04:07:35 -0500 (EST) Received: from kwai.gnat.com (kwai.gnat.com [IPv6:2620:20:4000:0:7a2b:cbff:fe60:cb11]) by rock.gnat.com (Postfix) with ESMTP id E1F1311642E; Tue, 6 Jan 2015 04:07:35 -0500 (EST) Received: by kwai.gnat.com (Postfix, from userid 4192) id DDDDD91A7D; Tue, 6 Jan 2015 04:07:35 -0500 (EST) Date: Tue, 6 Jan 2015 04:07:35 -0500 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Robert Dewar Subject: [Ada] Add warning for Suppress (Elaboration_Check) in SPARK Message-ID: <20150106090735.GA22352@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) This adds an additional warning message for Suppress (Elaboration_Check) in SPARK mode: The following is compiled with -gnatj55 1. pragma SPARK_Mode (On); 2. package SupEcheck is 3. pragma Suppress (Elaboration_Check); | >>> warning: Suppress of Elaboration_Check ignored in SPARK, elaboration checking rules are statically enforced (SPARK RM 7.7) 4. X : Integer; 5. end; Tested on x86_64-pc-linux-gnu, committed on trunk 2015-01-06 Robert Dewar * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning for ignoring pragma Suppress (Elaboration_Check) in SPARK mode. Index: sem_prag.adb =================================================================== --- sem_prag.adb (revision 219222) +++ sem_prag.adb (working copy) @@ -9050,7 +9050,9 @@ if C = Elaboration_Check and then SPARK_Mode = On then Error_Pragma_Arg - ("Suppress of Elaboration_Check ignored in SPARK??", Arg1); + ("Suppress of Elaboration_Check ignored in SPARK??", + "\elaboration checking rules are statically enforced " + & "(SPARK RM 7.7)", Arg1); end if; -- One-argument case