diff options
Diffstat (limited to 'gcc/ada/switch-c.adb')
-rw-r--r-- | gcc/ada/switch-c.adb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index a087dd2..cd6b200 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -1268,7 +1268,19 @@ package body Switch.C is Bad_Switch ("-gnatw." & Switch_Chars (Ptr .. Max)); end if; - -- Normal case, no dot + -- Case of underscore switch + + elsif C = '_' and then Ptr < Max then + Ptr := Ptr + 1; + C := Switch_Chars (Ptr); + + if Set_Underscore_Warning_Switch (C) then + Store_Compilation_Switch ("-gnatw_" & C); + else + Bad_Switch ("-gnatw_" & Switch_Chars (Ptr .. Max)); + end if; + + -- Normal case, no dot else if Set_Warning_Switch (C) then |