r263097 - in /trunk/gcc: ada/ChangeLog ada/exp_...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Tue Jul 31 09:56:00 GMT 2018
Author: pmderodat
Date: Tue Jul 31 09:55:59 2018
New Revision: 263097
URL: https://gcc.gnu.org/viewcvs?rev=263097&root=gcc&view=rev
Log:
[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.
Added:
trunk/gcc/testsuite/gnat.dg/global.adb
trunk/gcc/testsuite/gnat.dg/global.ads
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/exp_ch9.adb
trunk/gcc/ada/sem_prag.adb
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list