]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Better error message on missing parentheses
authorYannick Moy <moy@adacore.com>
Tue, 2 Nov 2021 14:05:55 +0000 (15:05 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 10 Nov 2021 08:57:37 +0000 (08:57 +0000)
gcc/ada/

* par-ch4.adb (P_Primary): Adapt test for getting error message
on missing parentheses.

gcc/ada/par-ch4.adb

index b6cc1a0729ddb58c385bd1f4498e65779a6573c3..545d83b480b73400c8945fba948f4b1a9d008e69 100644 (file)
@@ -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;