From: Ghjuvan Lacambre Date: Wed, 18 Dec 2019 07:14:39 +0000 (+0000) Subject: [Ada] Reject aspect specifications on number constants X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa1072e7255460c43690132ede6f74027bd8d1da;p=gcc.git [Ada] Reject aspect specifications on number constants 2019-12-18 Ghjuvan Lacambre gcc/ada/ * par-ch13.adb: Check if declarations allow aspect specifications. From-SVN: r279509 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0323aad619b..1700070214c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-12-18 Ghjuvan Lacambre + + * par-ch13.adb: Check if declarations allow aspect + specifications. + 2019-12-18 Piotr Trojanek * einfo.ads (Is_Ghost_Entity): Fix typo in comment. diff --git a/gcc/ada/par-ch13.adb b/gcc/ada/par-ch13.adb index 25a0df998fc..e26e83f9450 100644 --- a/gcc/ada/par-ch13.adb +++ b/gcc/ada/par-ch13.adb @@ -956,7 +956,9 @@ package body Ch13 is -- If Decl is Error, we ignore the aspects, and issue a message - elsif Decl = Error then + elsif Decl = Error + or else not Permits_Aspect_Specifications (Decl) + then Error_Msg ("aspect specifications not allowed here", Ptr); -- Here aspects are allowed, and we store them