This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Issue errors on illegal contracts unless SPARK_Mode is Off


Illegal Global/Depends contracts should be flagged by frontend in code for
which SPARK_Mode is not specified, as GNATprove relies on contracts being
legal in those cases. The frontend should skip these errors only when
SPARK_Mode is Off. Now fixed, as shown on the following example.

Command:
--------
$ gcc -c notinspark.ads

Output:
-------
     1. package Notinspark is
     2.
     3.    function Get return Integer;
     4.
     5.    procedure Set with
     6.      Global => (In_Out => Get);
                                  |
        >>> global item must denote variable or state

     7.
     8. end Notinspark;

Tested on x86_64-pc-linux-gnu, committed on trunk

2014-10-10  Yannick Moy  <moy@adacore.com>

	* errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]