From: Arnaud Charlet <charlet@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Robert Dewar <dewar@adacore.com>
Subject: [Ada] Add warning for Suppress (Elaboration_Check) in SPARK
Date: Tue, 06 Jan 2015 09:07:00 -0000 [thread overview]
Message-ID: <20150106090735.GA22352@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 708 bytes --]
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 <dewar@adacore.com>
* sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 583 bytes --]
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
reply other threads:[~2015-01-06 9:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150106090735.GA22352@adacore.com \
--to=charlet@adacore.com \
--cc=dewar@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).