aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gnatxref.adb
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2018-07-31 09:55:59 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-07-31 09:55:59 +0000
commit007443a0c1bb11ae55a43d562f070aba88a607c6 (patch)
tree26e10abace19553f3fd5d6ff39ece5add8a893f8 /gcc/ada/gnatxref.adb
parent76ed5f08f4462d7d22bc6cda3624e131e65bdd52 (diff)
downloadgcc-007443a0c1bb11ae55a43d562f070aba88a607c6.zip
gcc-007443a0c1bb11ae55a43d562f070aba88a607c6.tar.gz
gcc-007443a0c1bb11ae55a43d562f070aba88a607c6.tar.bz2
[Ada] Spurious error on the placement of aspect Global
This patch modifies the expansion of stand-alone subprogram bodies that appear in the body of a protected type to properly associate aspects and pragmas to the newly created spec for the subprogram body. As a result, the annotations are properly associated with the initial declaration of the subprogram. 2018-07-31 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * exp_ch9.adb (Analyze_Pragmas): New routine. (Build_Private_Protected_Declaration): Code clean up. Relocate relevant aspects and pragmas from the stand-alone body to the newly created spec. Explicitly analyze any pragmas that have been either relocated or produced by the analysis of the aspects. (Move_Pragmas): New routine. * sem_prag.adb (Find_Related_Declaration_Or_Body): Recognize the case where a pragma applies to the internally created spec for a stand-along subprogram body declared in a protected body. gcc/testsuite/ * gnat.dg/global.adb, gnat.dg/global.ads: New testcase. From-SVN: r263097
Diffstat (limited to 'gcc/ada/gnatxref.adb')
0 files changed, 0 insertions, 0 deletions