aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_prag.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r--gcc/ada/sem_prag.adb16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 5a935a5..935a26d 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -16017,9 +16017,23 @@ package body Sem_Prag is
if OK then
Chr := Get_Character (C);
+ -- Dash case: only -Wxxx is accepted
+
+ if J = 1
+ and then J < Len
+ and then Chr = '-'
+ then
+ J := J + 1;
+ C := Get_String_Char (Str, J);
+ Chr := Get_Character (C);
+ if Chr = 'W' then
+ exit;
+ end if;
+ OK := False;
+
-- Dot case
- if J < Len and then Chr = '.' then
+ elsif J < Len and then Chr = '.' then
J := J + 1;
C := Get_String_Char (Str, J);
Chr := Get_Character (C);