diff options
Diffstat (limited to 'gcc/ada/freeze.adb')
| -rw-r--r-- | gcc/ada/freeze.adb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index d8fdc30..fc39cc7 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -4872,16 +4872,19 @@ package body Freeze is if Nkind (Original_Node (Parent (E))) = N_Full_Type_Declaration then Warn_Node := Parent (E); - - if Formal = First_Formal (E) then - Error_Msg_NE ("??in inherited operation&", Warn_Node, E); - end if; else Warn_Node := Formal; end if; Error_Msg_NE ("?x?type of argument& is unconstrained array", Warn_Node, Formal); + + if Nkind (Original_Node (Parent (E))) = N_Full_Type_Declaration + and then Formal = First_Formal (E) + then + Error_Msg_NE ("\?x?in inherited operation&", Warn_Node, E); + end if; + Error_Msg_N ("\?x?foreign caller must pass bounds explicitly", Warn_Node); Error_Msg_Qual_Level := 0; @@ -7710,7 +7713,7 @@ package body Freeze is elsif Is_Integer_Type (E) then Adjust_Esize_For_Alignment (E); - if Is_Modular_Integer_Type (E) then + if Has_Modular_Operations (E) then -- Standard_Address has been built with the assumption that its -- modulus was System_Address_Size, but this is not a universal -- property and may need to be corrected. @@ -8382,7 +8385,8 @@ package body Freeze is -- and Per-Object Expressions" will suppress the insertion, and the -- freeze node will be dropped on the floor. - if Saved_Ghost_Config.Ghost_Mode = Ignore + if not CodePeer_Mode + and then Saved_Ghost_Config.Ghost_Mode = Ignore and then Ghost_Config.Ghost_Mode /= Ignore and then Present (Ghost_Config.Ignored_Ghost_Region) then @@ -10489,7 +10493,7 @@ package body Freeze is -- For C++ constructors check that their external name has been given -- (either in pragma CPP_Constructor or in a pragma import). - if Is_Constructor (E) + if Is_CPP_Constructor (E) and then Convention (E) = Convention_CPP and then (No (Interface_Name (E)) |
