summaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch2.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/par-ch2.adb')
-rw-r--r--gcc/ada/par-ch2.adb17
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ada/par-ch2.adb b/gcc/ada/par-ch2.adb
index ed96a7275b2..7064c5df578 100644
--- a/gcc/ada/par-ch2.adb
+++ b/gcc/ada/par-ch2.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2002 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -298,7 +298,20 @@ package body Ch2 is
Scan; -- past comma
end loop;
- T_Right_Paren;
+ -- If we have := for pragma Debug, it is worth special casing
+ -- the error message (it is easy to think of pragma Debug as
+ -- taking a statement, and an assignment statement is the most
+ -- likely candidate for this error)
+
+ if Token = Tok_Colon_Equal and then Pragma_Name = Name_Debug then
+ Error_Msg_SC ("argument for pragma Debug must be procedure call");
+ Resync_To_Semicolon;
+
+ -- Normal case, we expect a right paren here
+
+ else
+ T_Right_Paren;
+ end if;
end if;
Semicolon_Loc := Token_Ptr;