diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-01-07 10:31:05 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-01-07 10:31:05 +0100 |
commit | 7d1286f61e043074327839d3f2cd1c8d0039c3dc (patch) | |
tree | f640796aa2e81e149b4358baf593d7121d48a9b7 /gcc | |
parent | 95e0ceefa50376f3135861b8ecfae1c89c540563 (diff) | |
download | gcc-7d1286f61e043074327839d3f2cd1c8d0039c3dc.zip gcc-7d1286f61e043074327839d3f2cd1c8d0039c3dc.tar.gz gcc-7d1286f61e043074327839d3f2cd1c8d0039c3dc.tar.bz2 |
[multiple changes]
2015-01-07 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb: Minor error message change.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
Following AI05-028, the pragam applies legally to any composite type.
From-SVN: r219285
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 5 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 14 |
3 files changed, 22 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 03edfd0..6a752d25 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,12 @@ +2015-01-07 Robert Dewar <dewar@adacore.com> + + * sem_ch3.adb: Minor error message change. + +2015-01-07 Ed Schonberg <schonberg@adacore.com> + + * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization): + Following AI05-028, the pragam applies legally to any composite type. + 2015-01-07 Arnaud Charlet <charlet@adacore.com> * s-osinte-vxworks.adb, s-osinte-vxworks.ads diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 51083e3..ac52f08 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -18981,9 +18981,8 @@ package body Sem_Ch3 is elsif Present (Expression (Discr)) then Error_Msg_N - ("(Ada 2005) access discriminants of nonlimited types", - Expression (Discr)); - Error_Msg_N ("\cannot have defaults", Expression (Discr)); + ("(Ada 2005) access discriminants of nonlimited types " + & "cannot have defaults", Expression (Discr)); end if; end if; end if; diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 59a54ee..acae793 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -17839,17 +17839,25 @@ package body Sem_Prag is then null; + -- Check appropriate type argument + elsif Is_Private_Type (Ent) or else Is_Protected_Type (Ent) or else (Is_Generic_Type (Ent) and then Is_Derived_Type (Ent)) + + -- AI05-0028: The pragma applies to all composite types. Note + -- that we apply this binding intepretation to previous verions + -- of Ada so there is no Ada 2012 guard. Seems a reasonable + -- choice since there are other compilers that do the same. + + or else Is_Composite_Type (Ent) then null; else Error_Pragma_Arg - ("pragma % can only be applied to private, formal derived or " - & "protected type", - Arg1); + ("pragma % can only be applied to private, formal derived, " + & "protected, or composite type", Arg1); end if; -- Give an error if the pragma is applied to a protected type that |