diff options
author | Ghjuvan Lacambre <lacambre@adacore.com> | 2019-12-18 07:14:39 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-12-18 07:14:39 +0000 |
commit | fa1072e7255460c43690132ede6f74027bd8d1da (patch) | |
tree | 851e971327a39644d16678c3dcbd5a133f88baa1 | |
parent | 057aa8d8b7747acbab579ba22213a6c6162fc37f (diff) | |
download | gcc-fa1072e7255460c43690132ede6f74027bd8d1da.zip gcc-fa1072e7255460c43690132ede6f74027bd8d1da.tar.gz gcc-fa1072e7255460c43690132ede6f74027bd8d1da.tar.bz2 |
[Ada] Reject aspect specifications on number constants
2019-12-18 Ghjuvan Lacambre <lacambre@adacore.com>
gcc/ada/
* par-ch13.adb: Check if declarations allow aspect
specifications.
From-SVN: r279509
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/par-ch13.adb | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0323aad..1700070 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-12-18 Ghjuvan Lacambre <lacambre@adacore.com> + + * par-ch13.adb: Check if declarations allow aspect + specifications. + 2019-12-18 Piotr Trojanek <trojanek@adacore.com> * einfo.ads (Is_Ghost_Entity): Fix typo in comment. diff --git a/gcc/ada/par-ch13.adb b/gcc/ada/par-ch13.adb index 25a0df9..e26e83f 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 |