diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-01-31 17:03:54 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-01-31 17:03:54 +0100 |
commit | d66f9f0b1a6139c8871a5a359167c078eb1293e6 (patch) | |
tree | e7601456a3bb8a7e4d3478e0aec16ff0561fe066 | |
parent | f3920a1360919acd091ba23a9566ecfda3dc37f4 (diff) | |
download | gcc-d66f9f0b1a6139c8871a5a359167c078eb1293e6.zip gcc-d66f9f0b1a6139c8871a5a359167c078eb1293e6.tar.gz gcc-d66f9f0b1a6139c8871a5a359167c078eb1293e6.tar.bz2 |
[multiple changes]
2014-01-31 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb: Minor reformatting.
2014-01-31 Emmanuel Briot <briot@adacore.com>
* g-comlin.adb (Set_Command_Line): Take the switches
configuration from the Command_Line_Config.
2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
refinement clause.
2014-01-31 Vincent Celier <celier@adacore.com>
* projects.texi: Add more documentation about others used as an
index in indexed attributes.
From-SVN: r207358
-rw-r--r-- | gcc/ada/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/ada/exp_ch9.adb | 13 | ||||
-rw-r--r-- | gcc/ada/g-comlin.adb | 10 | ||||
-rw-r--r-- | gcc/ada/projects.texi | 3 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 8 |
5 files changed, 45 insertions, 8 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b46a2d5..d17dbbc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,24 @@ 2014-01-31 Robert Dewar <dewar@adacore.com> + * exp_ch9.adb: Minor reformatting. + +2014-01-31 Emmanuel Briot <briot@adacore.com> + + * g-comlin.adb (Set_Command_Line): Take the switches + configuration from the Command_Line_Config. + +2014-01-31 Hristian Kirtchev <kirtchev@adacore.com> + + * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed + refinement clause. + +2014-01-31 Vincent Celier <celier@adacore.com> + + * projects.texi: Add more documentation about others used as an + index in indexed attributes. + +2014-01-31 Robert Dewar <dewar@adacore.com> + * gnat_ugn.texi: Minor update. * gnat_rm.texi: Add example to Restriction_Warnings documentation. * exp_util.adb: Minor reformatting. diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 9467437..88e1ea7 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -6195,6 +6195,7 @@ package body Exp_Ch9 is function Is_Global_Entity (N : Node_Id) return Traverse_Result is E : Entity_Id; S : Entity_Id; + begin if Is_Entity_Name (N) and then Present (Entity (N)) then E := Entity (N); @@ -6213,16 +6214,15 @@ package body Exp_Ch9 is -- this safe. This is a common (if dubious) idiom. elsif S = Scope (Prot) - and then (Ekind (S) = E_Package - or else Ekind (S) = E_Generic_Package) + and then Ekind_In (S, E_Package, E_Generic_Package) and then Nkind (Parent (E)) = N_Object_Declaration and then Nkind (Parent (Parent (E))) = N_Package_Body then null; else - Error_Msg_N ("potentially unsynchronized barrier ?", N); - Error_Msg_N ("!& should be private component of type?", N); + Error_Msg_N ("potentially unsynchronized barrier?", N); + Error_Msg_N ("\& should be private component of type?", N); end if; end if; end if; @@ -6231,8 +6231,9 @@ package body Exp_Ch9 is end Is_Global_Entity; procedure Check_Unprotected_Barrier is - new Traverse_Proc (Is_Global_Entity); - -- Start of processing for Expand_Entry_Barrier + new Traverse_Proc (Is_Global_Entity); + + -- Start of processing for Expand_Entry_Barrier begin if No_Run_Time_Mode then diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb index f11846f..4f84bd9e 100644 --- a/gcc/ada/g-comlin.adb +++ b/gcc/ada/g-comlin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1681,7 +1681,13 @@ package body GNAT.Command_Line is -- the argument. In the second case, the switch matches "*", -- and is then decomposed below. - S := Getopt (Switches => "*", + -- Note: When a Command_Line object is associated with a + -- Command_Line_Config (which is mostly the case for tools + -- that let users chose the command line before spawning + -- other tools, for instance IDEs), the configuration of + -- the switches must be taken from the Command_Line_Config. + + S := Getopt (Switches => "* " & Get_Switches (Cmd.Config), Concatenate => False, Parser => Parser); diff --git a/gcc/ada/projects.texi b/gcc/ada/projects.texi index e0ef989..1040a6d 100644 --- a/gcc/ada/projects.texi +++ b/gcc/ada/projects.texi @@ -3806,6 +3806,9 @@ depending on the platform. For an indexed attribute, if it is allowed to use @b{others} as the index, this is indicated by the words "others allowed". +When @b{others} is used as the index of an indexed attribute, the value of +the attribute indexed by @b{others} is used when no other index would apply. + @end itemize @node Project Level Attributes diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 6e29b8b..fb4ddfc 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -23137,6 +23137,14 @@ package body Sem_Prag is -- Start of processing for Analyze_Refinement_Clause begin + -- A refinement clause appears as a component association where the + -- sole choice is the state and the expressions are the constituents. + + if Nkind (Clause) /= N_Component_Association then + Error_Msg_N ("malformed state refinement clause", Clause); + return; + end if; + -- Analyze the state name of a refinement clause State := First (Choices (Clause)); |