diff options
author | Ed Schonberg <schonberg@adacore.com> | 2018-08-21 14:47:12 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-08-21 14:47:12 +0000 |
commit | 1bd9b6a5766c03bc6741d5599076476bd1c9d2b0 (patch) | |
tree | f30251a1392f98207e5c5a7932256ed5c8f69d96 | |
parent | dc88759c874104bbf96cb56e44f2ea319541324a (diff) | |
download | gcc-1bd9b6a5766c03bc6741d5599076476bd1c9d2b0.zip gcc-1bd9b6a5766c03bc6741d5599076476bd1c9d2b0.tar.gz gcc-1bd9b6a5766c03bc6741d5599076476bd1c9d2b0.tar.bz2 |
[Ada] Sprint: add guard on printing aspects
2018-08-21 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sprint.adb: Add guard on printing aspects.
From-SVN: r263723
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/sprint.adb | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e9e674b..4afe997 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2018-08-21 Ed Schonberg <schonberg@adacore.com> + + * sprint.adb: Add guard on printing aspects. + 2018-08-21 Javier Miranda <miranda@adacore.com> * exp_cg.adb (Generate_CG_Output): Handle calls removed by the diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index f19629c..7978823 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -3540,8 +3540,10 @@ package body Sprint is -- where the aspects are printed inside the package specification. if Has_Aspects (Node) - and then not Nkind_In (Node, N_Package_Declaration, - N_Generic_Package_Declaration) + and then not Nkind_In (Node, N_Package_Declaration, + N_Generic_Package_Declaration) + and then not Is_Empty_List (Aspect_Specifications (Node)) + and then not Is_Empty_List (Aspect_Specifications (Node)) then Sprint_Aspect_Specifications (Node, Semicolon => True); end if; |