summaryrefslogtreecommitdiff
path: root/gcc/ada/styleg.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/styleg.adb')
-rw-r--r--gcc/ada/styleg.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb
index 8bd9f2ee2bd..bf72722cc88 100644
--- a/gcc/ada/styleg.adb
+++ b/gcc/ada/styleg.adb
@@ -813,12 +813,17 @@ package body Styleg is
-- Check_Right_Paren --
-----------------------
- -- In check tokens mode (-gnatyt), right paren must never be preceded by
+ -- In check tokens mode (-gnatyt), right paren must not be immediately
+ -- followed by an identifier character, and must never be preceded by
-- a space unless it is the initial non-blank character on the line.
procedure Check_Right_Paren is
begin
if Style_Check_Tokens then
+ if Identifier_Char (Source (Token_Ptr + 1)) then
+ Error_Space_Required (Token_Ptr + 1);
+ end if;
+
Check_No_Space_Before;
end if;
end Check_Right_Paren;