diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-05 12:30:15 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-05 12:30:15 +0200 |
commit | ce417b8f3fd61e8cbf0bc5cbedac464b009458d4 (patch) | |
tree | 9190178a47cd0fd3cb4320d67c4362206056744c /gcc | |
parent | 947430d5feb1e7b6fab4fe22155fcd899f85e3f2 (diff) | |
download | gcc-ce417b8f3fd61e8cbf0bc5cbedac464b009458d4.zip gcc-ce417b8f3fd61e8cbf0bc5cbedac464b009458d4.tar.gz gcc-ce417b8f3fd61e8cbf0bc5cbedac464b009458d4.tar.bz2 |
[multiple changes]
2010-10-05 Robert Dewar <dewar@adacore.com>
* par-ch5.adb (Test_Statement_Required): Allow all pragmas in Ada 2012
mode.
2010-10-05 Pascal Obry <obry@adacore.com>
* gnat_rm.texi: Fix typo.
2010-10-05 Arnaud Charlet <charlet@adacore.com>
* gnat_ugn.texi: Add note about identifiers with same name and
-fdump-ada-spec.
From-SVN: r164983
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 2 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 2 | ||||
-rw-r--r-- | gcc/ada/par-ch5.adb | 32 |
4 files changed, 47 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index db244c2..679a335 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,19 @@ 2010-10-05 Robert Dewar <dewar@adacore.com> + * par-ch5.adb (Test_Statement_Required): Allow all pragmas in Ada 2012 + mode. + +2010-10-05 Pascal Obry <obry@adacore.com> + + * gnat_rm.texi: Fix typo. + +2010-10-05 Arnaud Charlet <charlet@adacore.com> + + * gnat_ugn.texi: Add note about identifiers with same name and + -fdump-ada-spec. + +2010-10-05 Robert Dewar <dewar@adacore.com> + * sem_ch4.adb: Minor reformatting. * a-direct.ads: Minor comment update. diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 49aa1e5..aca8c04 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -5688,7 +5688,7 @@ and implementation of the @code{Bit} attribute. @unnumberedsec Bit_Position @findex Bit_Position @noindent -@code{@var{R.C}'Bit}, where @var{R} is a record object and C is one +@code{@var{R.C}'Bit_Position}, where @var{R} is a record object and C is one of the fields of the record type, yields the bit offset within the record contains the first bit of storage allocated for the object. The value of this attribute is of the diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 2166696..03d0976 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -18107,6 +18107,8 @@ constants. Function macros (macros with arguments) are partially translated as comments, to be completed manually if needed. @item some extensions (e.g. vector types) are not supported @item pointers to pointers or complex structures are mapped to System.Address +@item identifiers with identical name (except casing) will generate compilation + errors (e.g. @code{shm_get} vs @code{SHM_GET}). @end itemize The code generated is using the Ada 2005 syntax, which makes it diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/par-ch5.adb index 30433ef..428dc78 100644 --- a/gcc/ada/par-ch5.adb +++ b/gcc/ada/par-ch5.adb @@ -190,14 +190,40 @@ package body Ch5 is ----------------------------- procedure Test_Statement_Required is + function All_Pragmas return Boolean; + -- Return True if statement list is all pragmas + + ----------------- + -- All_Pragmas -- + ----------------- + + function All_Pragmas return Boolean is + S : Node_Id; + begin + S := First (Statement_List); + while Present (S) loop + if Nkind (S) /= N_Pragma then + return False; + else + Next (S); + end if; + end loop; + + return True; + end All_Pragmas; + + -- Start of processing for Test_Statement_Required + begin if Statement_Required then - -- Check no statement required after label in Ada 2012 + -- Check no statement required after label in Ada 2012, and that + -- it is OK to have nothing but pragmas in a statement sequence. if Ada_Version >= Ada_2012 and then not Is_Empty_List (Statement_List) - and then Nkind (Last (Statement_List)) = N_Label + and then (Nkind (Last (Statement_List)) = N_Label + or else All_Pragmas) then declare Null_Stm : constant Node_Id := @@ -207,6 +233,8 @@ package body Ch5 is Append_To (Statement_List, Null_Stm); end; + -- All pragmas is OK on + -- If not Ada 2012, or not special case above, give error message else |