diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-01-20 17:01:22 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-01-20 17:01:22 +0100 |
commit | 4a28b181a6164561a56bf02dfa1fd568e3d0ec5b (patch) | |
tree | d8ec142379c7b7924fd770f6a516efecf89fcc58 /gcc/ada/sem_elab.adb | |
parent | 9e540e3750db65b21ed5f6883176a984f5ab451e (diff) | |
download | gcc-4a28b181a6164561a56bf02dfa1fd568e3d0ec5b.zip gcc-4a28b181a6164561a56bf02dfa1fd568e3d0ec5b.tar.gz gcc-4a28b181a6164561a56bf02dfa1fd568e3d0ec5b.tar.bz2 |
[multiple changes]
2014-01-20 Robert Dewar <dewar@adacore.com>
* checks.adb: Make warnings on exceptions into errors in GNATprove mode.
* errout.adb: Implement [ and ] insertion characters.
* errout.ads: Document new [ and ] insertion characters.
* sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
addition of ??? comment.
* lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
* exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
Make warnings on exceptions into errors in GNATprove mode.
* sem_dim.adb: Minor reformatting throughout Quote [ and ]
in error messages.
2014-01-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb: Code clean up.
From-SVN: r206841
Diffstat (limited to 'gcc/ada/sem_elab.adb')
-rw-r--r-- | gcc/ada/sem_elab.adb | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb index 6d94102..0c789c2 100644 --- a/gcc/ada/sem_elab.adb +++ b/gcc/ada/sem_elab.adb @@ -1138,13 +1138,14 @@ package body Sem_Elab is -- Here we definitely have a bad instantiation - Error_Msg_NE ("??cannot instantiate& before body seen", N, Ent); + Error_Msg_Warn := not GNATprove_Mode; + Error_Msg_NE ("cannot instantiate& before body seen<<", N, Ent); if Present (Instance_Spec (N)) then Supply_Bodies (Instance_Spec (N)); end if; - Error_Msg_N ("\??Program_Error will be raised at run time", N); + Error_Msg_N ("\Program_Error [<<", N); Insert_Elab_Check (N); Set_ABE_Is_Certain (N); end Check_Bad_Instantiation; @@ -2178,14 +2179,17 @@ package body Sem_Elab is -- level, and the ABE is bound to occur. if Elab_Call.Last = 0 then + Error_Msg_Warn := not GNATprove_Mode; + if Inst_Case then Error_Msg_NE - ("??cannot instantiate& before body seen", N, Orig_Ent); + ("cannot instantiate& before body seen<<", N, Orig_Ent); else - Error_Msg_NE ("??cannot call& before body seen", N, Orig_Ent); + Error_Msg_NE + ("cannot call& before body seen<<", N, Orig_Ent); end if; - Error_Msg_N ("\??Program_Error will be raised at run time", N); + Error_Msg_N ("\Program_Error [<<", N); Insert_Elab_Check (N); -- Call is not at outer level @@ -2259,17 +2263,19 @@ package body Sem_Elab is and then (Nkind (Original_Node (N)) /= N_Function_Call or else not In_Assertion_Expression (Original_Node (N))) then + Error_Msg_Warn := not GNATprove_Mode; + if Inst_Case then Error_Msg_NE - ("instantiation of& may occur before body is seen??", + ("instantiation of& may occur before body is seen<<", N, Orig_Ent); else Error_Msg_NE - ("call to& may occur before body is seen??", N, Orig_Ent); + ("call to& may occur before body is seen<<", N, Orig_Ent); end if; Error_Msg_N - ("\Program_Error may be raised at run time??", N); + ("\Program_Error ]<<", N); Output_Calls (N); end if; @@ -2364,11 +2370,11 @@ package body Sem_Elab is or else Scope (Proc) = Scope (Defining_Identifier (Decl))) then + Error_Msg_Warn := not GNATprove_Mode; Error_Msg_N - ("task will be activated before elaboration of its body??", + ("task will be activated before elaboration of its body<<", Decl); - Error_Msg_N - ("\Program_Error will be raised at run time??", Decl); + Error_Msg_N ("\Program_Error [<<", Decl); elsif Present (Corresponding_Body (Unit_Declaration_Node (Proc))) |