diff options
author | Robert Dewar <dewar@adacore.com> | 2014-05-21 13:26:53 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-05-21 15:26:53 +0200 |
commit | 0688dac82602c0763e0459f07b3cb4cc8f3ecba4 (patch) | |
tree | 1f2c8d0e503e716f8065664c74fc870db490da29 /gcc/ada/sem_util.adb | |
parent | ee6208f2d5fb8527b4f2504103e7b884f28660dc (diff) | |
download | gcc-0688dac82602c0763e0459f07b3cb4cc8f3ecba4.zip gcc-0688dac82602c0763e0459f07b3cb4cc8f3ecba4.tar.gz gcc-0688dac82602c0763e0459f07b3cb4cc8f3ecba4.tar.bz2 |
layout.adb: Minor reformatting.
2014-05-21 Robert Dewar <dewar@adacore.com>
* layout.adb: Minor reformatting.
* sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
dummy procedure ip.
2014-05-21 Robert Dewar <dewar@adacore.com>
* restrict.ads (Implementation_Restriction): Add entry for
No_Fixed_IO.
* rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
Ada.[Wide_[Wide_]Text_IO.
* s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
* sem_attr.adb (Analyze_Attribute): Disallow fixed point types
for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
Wide_Wide_Value if restriction No_Fixed_IO is set.
* sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
From-SVN: r210710
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r-- | gcc/ada/sem_util.adb | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 84570fb..afb62c1 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -15867,12 +15867,6 @@ package body Sem_Util is Set_Entity (N, Val); - -- Remaining checks are only done on source nodes - - if not Comes_From_Source (N) then - return; - end if; - -- The node to post on is the selector in the case of an expanded name, -- and otherwise the node itself. @@ -15882,6 +15876,44 @@ package body Sem_Util is Post_Node := N; end if; + -- Check for violation of No_Fixed_IO + + if Restriction_Check_Required (No_Fixed_IO) + and then + ((RTU_Loaded (Ada_Text_IO) + and then (Is_RTE (Val, RE_Decimal_IO) + or else + Is_RTE (Val, RE_Fixed_IO))) + + or else + (RTU_Loaded (Ada_Wide_Text_IO) + and then (Is_RTE (Val, RO_WT_Decimal_IO) + or else + Is_RTE (Val, RO_WT_Fixed_IO))) + + or else + (RTU_Loaded (Ada_Wide_Wide_Text_IO) + and then (Is_RTE (Val, RO_WW_Decimal_IO) + or else + Is_RTE (Val, RO_WW_Fixed_IO)))) + + -- A special extra check, don't complain about a reference from within + -- the Ada.Interrupts package itself! + + and then not In_Same_Extended_Unit (N, Val) + then + Check_Restriction (No_Fixed_IO, Post_Node); + end if; + + -- Remaining checks are only done on source nodes. Note that we test + -- for violation of No_Fixed_IO even on non-source nodes, because the + -- cases for checking violations of this restriction are instantiations + -- where the refernece in the instance has Comes_From_Source False. + + if not Comes_From_Source (N) then + return; + end if; + -- Check for violation of No_Abort_Statements, which is triggered by -- call to Ada.Task_Identification.Abort_Task. @@ -15907,6 +15939,7 @@ package body Sem_Util is Is_RTE (Val, RE_Exchange_Handler) or else Is_RTE (Val, RE_Detach_Handler) or else Is_RTE (Val, RE_Reference)) + -- A special extra check, don't complain about a reference from within -- the Ada.Interrupts package itself! |