diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-07-06 15:38:37 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-07-06 15:38:37 +0200 |
commit | d030f3a45173ca7496c50d47e651638e3ff2f00f (patch) | |
tree | ad27a4d348abcf31d84547e3e7c75bcc828006d9 /gcc/ada/sem_intr.adb | |
parent | 6ffe854859e61fd04e1db8694e2c519f4010647b (diff) | |
download | gcc-d030f3a45173ca7496c50d47e651638e3ff2f00f.zip gcc-d030f3a45173ca7496c50d47e651638e3ff2f00f.tar.gz gcc-d030f3a45173ca7496c50d47e651638e3ff2f00f.tar.bz2 |
[multiple changes]
2016-07-06 Arnaud Charlet <charlet@adacore.com>
* lib.adb (Check_Same_Extended_Unit): Complete previous change.
* sem_intr.adb (Errint): New parameter Relaxed. Refine previous
change to only disable errors selectively.
* sem_util.adb: minor style fix in object declaration
2016-07-06 Yannick Moy <moy@adacore.com>
* sem_warn.adb (Check_Infinite_Loop_Warning.Find_Var): Special case a
call to a volatile function, so that it does not lead to a warning in
that case.
2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
* gnat1drv.adb: Code clean up. Do not emit any
code generation errors when the unit is ignored Ghost.
2016-07-06 Ed Schonberg <schonberg@adacore.com>
* sem_eval.adb (Check_Non_Static_Context): If the expression
is a real literal of a floating point type that is part of a
larger expression and is not a static expression, transform it
into a machine number now so that the rest of the computation,
even if other components are static, is not evaluated with
extra precision.
2016-07-06 Javier Miranda <miranda@adacore.com>
* sem_ch13.adb (Freeze_Entity_Checks): Undo previous patch and move the
needed functionality to Analyze_Freeze_Generic_Entity.
(Analyze_Freeze_Generic_Entity): If the entity is not already frozen
and has delayed aspects then analyze them.
2016-07-06 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Pragma.Process_Inline.Set_Inline_Flags):
Special case for unanalyzed body entity of ghost expression function.
From-SVN: r238050
Diffstat (limited to 'gcc/ada/sem_intr.adb')
-rw-r--r-- | gcc/ada/sem_intr.adb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ada/sem_intr.adb b/gcc/ada/sem_intr.adb index e26443a..c038dc4 100644 --- a/gcc/ada/sem_intr.adb +++ b/gcc/ada/sem_intr.adb @@ -62,11 +62,14 @@ package body Sem_Intr is -- as for Check_Intrinsic_Subprogram (i.e. the entity of the subprogram -- declaration, and the node for the pragma argument, used for messages). - procedure Errint (Msg : String; S : Node_Id; N : Node_Id); + procedure Errint + (Msg : String; S : Node_Id; N : Node_Id; Relaxed : Boolean := False); -- Post error message for bad intrinsic, the message itself is posted -- on the appropriate spec node and another message is placed on the -- pragma itself, referring to the spec. S is the node in the spec on -- which the message is to be placed, and N is the pragma argument node. + -- Relaxed is True if the message should not be emitted in + -- Relaxed_RM_Semantics mode. ------------------------------ -- Check_Exception_Function -- @@ -432,7 +435,7 @@ package body Sem_Intr is then Errint ("first argument for shift must have size 8, 16, 32 or 64", - Ptyp1, N); + Ptyp1, N, Relaxed => True); return; elsif Non_Binary_Modulus (Typ1) then @@ -450,7 +453,7 @@ package body Sem_Intr is then Errint ("modular type for shift must have modulus of 2'*'*8, " - & "2'*'*16, 2'*'*32, or 2'*'*64", Ptyp1, N); + & "2'*'*16, 2'*'*32, or 2'*'*64", Ptyp1, N, Relaxed => True); elsif Etype (Arg1) /= Etype (E) then Errint @@ -465,12 +468,13 @@ package body Sem_Intr is -- Errint -- ------------ - procedure Errint (Msg : String; S : Node_Id; N : Node_Id) is + procedure Errint + (Msg : String; S : Node_Id; N : Node_Id; Relaxed : Boolean := False) is begin -- Ignore errors on Intrinsic in Relaxed_RM_Semantics mode where we can -- be more liberal. - if not Relaxed_RM_Semantics then + if not (Relaxed and Relaxed_RM_Semantics) then Error_Msg_N (Msg, S); Error_Msg_N ("incorrect intrinsic subprogram, see spec", N); end if; |