Adapt the test to issue a different error message when it is likely that
an if-expression is suspected, but parentheses are missing. This makes
the test more in line with its comment.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch4.adb (P_Primary): Adapt test for getting error message
on missing parentheses.
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb
--- 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;