aboutsummaryrefslogtreecommitdiff
path: root/gcc/function-tests.cc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-02-11 10:40:32 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-12 12:38:40 +0000
commit3707c8feb1b68028d3967f16c9c4b89d86a14488 (patch)
treeb9b8475be4ca771b9e5ee48f015968815a8e2a70 /gcc/function-tests.cc
parentdff98f76fb246e0a0d02ce13f2160c69168c3dc7 (diff)
downloadgcc-3707c8feb1b68028d3967f16c9c4b89d86a14488.zip
gcc-3707c8feb1b68028d3967f16c9c4b89d86a14488.tar.gz
gcc-3707c8feb1b68028d3967f16c9c4b89d86a14488.tar.bz2
[Ada] Fix warning about generic subprograms withed but not instantiated
The compiler should warn when a generic subprogram unit is withed but not instantiated by the current main unit. This warning relies on flag Is_Instantiated, which was wrongly set when the generic unit was also withed and instantiated by some other unit. This change merely reverts a fix done 20 years ago, which worked around some spurious warning emitted with inlining enabled. Now the Is_Instantiated flag is set similarly for generic subprograms and generic packages. gcc/ada/ * atree.adb, atree.ads: Move WITH clause from spec to body; to prevent new warnings stopping the bootstrap. * fmap.adb, fname-sf.adb, libgnat/a-direct.adb, libgnat/s-bignum.adb: Remove unnecessary WITH clauses; to prevent new warnings stopping the bootstrap. * sem_ch12.adb (Analyze_Subprogram_Instantiation): Only set Is_Instantiated flag when the instance is in the extended main source unit.
Diffstat (limited to 'gcc/function-tests.cc')
0 files changed, 0 insertions, 0 deletions