aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/fe.h
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2022-06-21 14:32:37 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2022-07-12 12:24:11 +0000
commit7ce2938ccff9e1cdfcd0ad63d3653dc671335620 (patch)
tree0f794b8f73d9eaa218e623a7c34568fdd642d3be /gcc/ada/fe.h
parent1710ba9e5d09493690c5f474a5c37b5c8f5d7b19 (diff)
downloadgcc-7ce2938ccff9e1cdfcd0ad63d3653dc671335620.zip
gcc-7ce2938ccff9e1cdfcd0ad63d3653dc671335620.tar.gz
gcc-7ce2938ccff9e1cdfcd0ad63d3653dc671335620.tar.bz2
[Ada] Avoid namespace pollution for Next and Previous
This patch renames Next and Previous in a-convec.ads and other containers to be _Next and _Previous, to avoid namespace pollution. The compiler now uses the leading-underscore names to look them up. The scanner is changed to allow this. gcc/ada/ * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use _Next and _Previous in the optimized expansion of "for ... of". No longer need to check parameter profiles for these, because the leading-underscore names are unique. * libgnat/a-convec.ads (_Next, _Previous): Renamings of Next and Previous, to avoid namespace pollution. * libgnat/a-cbdlli.ads, libgnat/a-cbhama.ads, libgnat/a-cbhase.ads, libgnat/a-cbmutr.ads, libgnat/a-cborma.ads, libgnat/a-cborse.ads, libgnat/a-cdlili.ads, libgnat/a-cidlli.ads, libgnat/a-cihama.ads, libgnat/a-cihase.ads, libgnat/a-cimutr.ads, libgnat/a-ciorma.ads, libgnat/a-ciorse.ads, libgnat/a-cobove.ads, libgnat/a-cohama.ads, libgnat/a-cohase.ads, libgnat/a-coinve.ads, libgnat/a-comutr.ads, libgnat/a-coorma.ads, libgnat/a-coorse.ads: Likewise. Also, remove duplicated comments -- refer to one comment about _Next, _Previous, Pseudo_Reference in libgnat/a-convec.ads. DRY. * scng.adb (Scan): Allow leading underscores in identifiers in the run-time library. * snames.ads-tmpl (Name_uNext, Name_uPrevious): New names with leading underscores.
Diffstat (limited to 'gcc/ada/fe.h')
0 files changed, 0 insertions, 0 deletions