aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorRonan Desplanques <desplanques@adacore.com>2024-02-02 18:08:57 +0100
committerMarc Poulhiès <poulhies@adacore.com>2024-05-14 10:19:51 +0200
commit821772478bdc8cb52249aa561975e4ff6aa7792f (patch)
tree283d2d229c67b38a77a25ccae00fecb172efaa71 /gcc/expr.cc
parent4dd6f75e35065f2f0732c4cfbaf412b50c51e26e (diff)
downloadgcc-821772478bdc8cb52249aa561975e4ff6aa7792f.zip
gcc-821772478bdc8cb52249aa561975e4ff6aa7792f.tar.gz
gcc-821772478bdc8cb52249aa561975e4ff6aa7792f.tar.bz2
ada: Fix crash with -gnatyB and -gnatdJ
The crash this patch fixes happened because calling the Errout.Error_Msg procedures that don't have an N parameter is not allowed when not parsing and -gnatdJ is on. And -gnatyB style checks are not emitted during parsing but during semantic analysis. This commit moves Check_Boolean_Operator from Styleg to Style so it can call Errout.Error_Msg with a Node_Id parameter. This change of package makes sense because: 1. The compiler is currently the only user of Check_Boolean_Operator. 2. Other tools don't do semantic analysis, and so cannot possibly know when to use Check_Boolean_Operator anyway. gcc/ada/ * styleg.ads (Check_Boolean_Operator): Moved ... * style.ads (Check_Boolean_Operator): ... here. * styleg.adb (Check_Boolean_Operator): Moved ... * style.adb (Check_Boolean_Operator): ... here. Also add node parameter to call to Errout.Error_Msg.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions