aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch4.adb
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2021-11-02 15:05:55 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2021-11-10 08:57:37 +0000
commit29900c061a6ebbd773cbdfdd86a28df2680dfe8a (patch)
tree7c1018635b70662a755efb398dade3b7db15e1cf /gcc/ada/par-ch4.adb
parent249b4eeef1fe30237acb4d8e1832243b39d61e7e (diff)
downloadgcc-29900c061a6ebbd773cbdfdd86a28df2680dfe8a.zip
gcc-29900c061a6ebbd773cbdfdd86a28df2680dfe8a.tar.gz
gcc-29900c061a6ebbd773cbdfdd86a28df2680dfe8a.tar.bz2
[Ada] Better error message on missing parentheses
gcc/ada/ * par-ch4.adb (P_Primary): Adapt test for getting error message on missing parentheses.
Diffstat (limited to 'gcc/ada/par-ch4.adb')
-rw-r--r--gcc/ada/par-ch4.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb
index b6cc1a0..545d83b 100644
--- a/gcc/ada/par-ch4.adb
+++ b/gcc/ada/par-ch4.adb
@@ -2892,8 +2892,10 @@ package body Ch4 is
if Token_Is_At_Start_Of_Line
and then not
(Ada_Version >= Ada_2012
- and then Style_Check_Indentation /= 0
- and then Start_Column rem Style_Check_Indentation /= 0)
+ and then
+ (Style_Check_Indentation = 0
+ or else
+ Start_Column rem Style_Check_Indentation /= 0))
then
Error_Msg_AP ("missing operand");
return Error;