From 29900c061a6ebbd773cbdfdd86a28df2680dfe8a Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Tue, 2 Nov 2021 15:05:55 +0100 Subject: [PATCH] [Ada] Better error message on missing parentheses gcc/ada/ * par-ch4.adb (P_Primary): Adapt test for getting error message on missing parentheses. --- gcc/ada/par-ch4.adb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb index b6cc1a0729dd..545d83b480b7 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; -- 2.47.2