aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorEtienne Servais <servais@adacore.com>2021-10-26 17:00:24 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-17 08:25:43 +0000
commit83bfddac6feff4dcacc2b93e2357629a3bfa971b (patch)
treebc2ac0e5a2fda358fb6550a2586fd59d7d17d41c /gcc/ada/sem_ch3.adb
parentd678717ab233610588ae15fcddeb20b39ac7daf5 (diff)
downloadgcc-83bfddac6feff4dcacc2b93e2357629a3bfa971b.zip
gcc-83bfddac6feff4dcacc2b93e2357629a3bfa971b.tar.gz
gcc-83bfddac6feff4dcacc2b93e2357629a3bfa971b.tar.bz2
[Ada] Initialize Compiler_State to avoid Constraint_Error
When building gnat1 with `-gnatVa` as we do locally, rules like: `gcc -c -gnatyM79 <any adb file with lines longer than 79>` will throw a constraint error as `lib.compiler_state` is initialized by par.adb, ie after scanning. Therefore any error_msg thrown during scanning will perform this uninitialized read (which raises a Constraint_Error when the compiler was compiled with `-gnatVa`). Initialize this flag to `Parsing`. gcc/ada/ * lib.ads: initialize `Compiler_State` to `Parsing`.
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
0 files changed, 0 insertions, 0 deletions