]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Ada2020: AI12-0117 Restriction No_Tasks_Unassigned_To_CPU
authorBob Duff <duff@adacore.com>
Thu, 11 Jun 2020 18:05:55 +0000 (14:05 -0400)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:18:12 +0000 (13:18 -0300)
commit7e308c68085f1d4a50025363b92be1d0b34c14cb
treef655c6d5dca1cce7f1e006bc2c954c1d49c5ed80
parent3602c33146bb3af5aa4e2b469a0251990bed5404
[Ada] Ada2020: AI12-0117 Restriction No_Tasks_Unassigned_To_CPU

gcc/ada/

* gnatbind.adb (Gnatbind): For No_Tasks_Unassigned_To_CPU, check
that CPU has been set on the main subprogram.
(Restriction_Could_Be_Set): Don't print
No_Tasks_Unassigned_To_CPU if it would violate the
above-mentioned rule. Up to now, all restrictions were checked
by the compiler, with the binder just checking for consistency.
But the compiler can't know which subprogram is the main, so
it's impossible to check this one at compile time.
* restrict.ads, restrict.adb: Misc refactoring. Change Warning
to Warn, for consistency, since most already use Warn.
(Set_Restriction): New convenience routine.
* sem_ch13.adb (Attribute_CPU): Check
No_Tasks_Unassigned_To_CPU.
* sem_prag.adb (Pragma_CPU): Check No_Tasks_Unassigned_To_CPU.
Misc refactoring.
* tbuild.ads, tbuild.adb (Sel_Comp): New functions for building
selected components.
gcc/ada/gnatbind.adb
gcc/ada/restrict.adb
gcc/ada/restrict.ads
gcc/ada/sem_ch13.adb
gcc/ada/sem_prag.adb
gcc/ada/tbuild.adb
gcc/ada/tbuild.ads