From: Yannick Moy Date: Tue, 2 Nov 2021 14:05:55 +0000 (+0100) Subject: [Ada] Better error message on missing parentheses X-Git-Tag: basepoints/gcc-13~3228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29900c061a6ebbd773cbdfdd86a28df2680dfe8a;p=thirdparty%2Fgcc.git [Ada] Better error message on missing parentheses 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 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;