public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Add warning for Suppress (Elaboration_Check) in SPARK
@ 2015-01-06  9:07 Arnaud Charlet
  0 siblings, 0 replies; only message in thread
From: Arnaud Charlet @ 2015-01-06  9:07 UTC (permalink / raw)
  To: gcc-patches; +Cc: Robert Dewar

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-06  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-06  9:07 [Ada] Add warning for Suppress (Elaboration_Check) in SPARK Arnaud Charlet

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).