aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorRonan Desplanques <desplanques@adacore.com>2022-10-24 11:50:06 +0200
committerMarc Poulhiès <poulhies@adacore.com>2022-11-08 09:35:02 +0100
commit45656a992eb18bfefe2e6e20d3b425afe945af28 (patch)
treea72c8da1b7fce47af8249b860cd94deebff9711f /gcc/ada/gcc-interface/decl.c
parent48e2e5b4c2f56b9e3497d57d0974c66604e087a6 (diff)
downloadgcc-45656a992eb18bfefe2e6e20d3b425afe945af28.zip
gcc-45656a992eb18bfefe2e6e20d3b425afe945af28.tar.gz
gcc-45656a992eb18bfefe2e6e20d3b425afe945af28.tar.bz2
ada: Adjust classwide contract expression preanalysis
Before this patch, a classwide contract expression was preanalyzed only when its primitive operation's type was frozen. It caused name resolution to be off in the cases where the freezing took place after the end of the declaration list the primitive operation was declared in. This patch makes it so that if the compiler gets to the end of the declaration list before the type is frozen, it preanalyzes the classwide contract expression, so that the names are resolved in the right context. gcc/ada/ * contracts.adb (Preanalyze_Class_Conditions): New procedure. (Preanalyze_Condition): Moved out from Merge_Class_Conditions in order to be spec-visible. * contracts.ads (Preanalyze_Class_Conditions): New procedure. * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part): Call Preanalyze_Class_Conditions when necessary.
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
0 files changed, 0 insertions, 0 deletions